[Bese-devel] Re: component tree
Marco Baringer
mb at bese.it
Fri Jun 16 08:48:12 UTC 2006
"Marijn Haverbeke" <marijnh at gmail.com> writes:
> That cleared up some things. What exactly is the practical difference between a
> slot in a component that has :component in its slot declaration and one that
> doesn't? Only that the holding object can not influence links created in the
> held object?
the _only_ differences are:
1) when setf'ing (or initializing) a slot defined with :component the
component's parent and place slots are updated automatically (see
(setf slot-value-using-class) in
src/rerl/standard-component/standard-component.lisp).
2) the child-components method only recognizes slots which are
:component and contain a subclass of component.
> The multiple form problem works like this: When two forms on a page both have a
> field with name X, and both register a callback with make-new-callback, the
> second callback will override the first one. This is not usually a real
> problem, but it's somewhat unelegant. I think it would be a good idea to
> organize these callbacks under forms, and only call them when *their* form is
> submitted. This could be done with a dynamic variable that is bound with a let
> by an <ucw:form call.
the make-new-callback method does not create duplicate names (see the
call to new-random-key in src/rerl/stadard-session-frame.lisp), if you
explicitly pass a :name parameter then yes, this is an issue you will
have to worry about. i don't want to tie the callback registration
stuff to <ucw:form tags or form widgets since that then precludes
lower level form generating.
i am open to suggestions though.
> The other problem was that it is impossible to register callbacks that allways
> get executed when a form is submitted, for input fields whose values do not
> correspond 1-to-1 with request parameters (checkbox, multiple select). I'm
> still planning to work on this, but my grasp on the action and frame concepts
> is still a little weak, so I can't really see what would be the best way to do
> this.
yeah, this is an issue. attila is working on something like this in
the ucw_ajax branch. if that isn't enough, or if i'm misunderstanding
what attila is doing, then we should definetly think about how to do
this.
--
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
More information about the bese-devel
mailing list