Quickform : render-widget system broken ?

29 views
Skip to first unread message

Fred

unread,
Oct 16, 2014, 4:46:36 PM10/16/14
to webl...@googlegroups.com
Hi,

After an update of weblocks, i found the render-widget system that
loop over the childrens of the root widget, broken in the Dataform widget.

In my code, i put some childrens in the Quickform widget
(Quickform inherits from Dataform).

On 4 Jul 2013, appears a update of dataform code
that cause the trouble :
https://github.com/skypher/weblocks/commit/af617413a1ca22e6891b34b93fa81e936209d702

Why a new "widget-children" method in this class (Dataform) that breaks the render-widget engine ?

Thanks.

Best Regards
--
Fred

o_z

unread,
Oct 17, 2014, 3:36:31 AM10/17/14
to webl...@googlegroups.com


четверг, 16 октября 2014 г., 23:46:36 UTC+3 пользователь Fred написал:
This is needed to add widgets as view fields for dataform.
There is a bug, but it doesn't break render-widget system. 

Fred

unread,
Oct 17, 2014, 5:44:21 AM10/17/14
to webl...@googlegroups.com
Hello,

I apologize, my previous post is not accurate enough.

Quickform is a widget, so it should have childrens.

But in the following example render a quickform
with childrens do not seems to works :

The children is never rendered.


(defview qfview (:type form
                       :persistp nil)
  (name :requiredp t
        :required-indicator nil
        :label "Name"))

(defun make-page ()
  (let ((qf (make-quickform 'qfview)))
    (setf (widget-children qf)       
           (make-widget
            (lambda (&rest args)
              (declare (ignore args))
              (with-html (:p "Children)))))
    qf))
            
(defun init-user-session (root)
  (setf (widget-children root)
        (make-page)))

Thanks.

o_z

unread,
Oct 27, 2014, 4:10:20 AM10/27/14
to webl...@googlegroups.com
I haven't used children for dataform widget.
Only when using widget as form field.
So you can either use widget-presentation for child widgets or override widget-children

пятница, 17 октября 2014 г., 12:44:21 UTC+3 пользователь Fred написал:
Reply all
Reply to author
Forward
0 new messages