i do forsee some problems, yes. can we solve them? i don't know yet.

initChildren() would not solve any of the problems at hand. further, making
such a change would complicate things and create its own set of problems.


there are some very nice things about constructors that you are overlooking,
especially for those who are new to wicket or relatively inexperienced. for
one thing, they are self-documenting. there is no need to document or understand
order of initialization in wicket because wicket is leveraging the Java way of
initializing things, which is in the spirit of wicket. it's all intuitive to the user, which
is good.


this change would require a lot of changes very deep in the core and would
throw us pretty far off our ship schedule. and in any case, delaying construction
of components is not a reason to do this. you won't ever actually gain anything
because no wicket page is ever constructed until it is about to be rendered anyway.


Gili wrote:

On Wed, 02 Feb 2005 09:52:30 -0800, Jonathan Locke wrote:



boy, the more i think about this the more i think that add() just has to be super smart and
very involved with the markup... when a call to add() returns, it seems that any intervening
wicket:components should already be parents of the added child... this is most intuitive to
the user and the least likely to cause problems.


in other words, some logic in add() for a container needs to getAssociatedMarkup()
and lazily create some kind of simple "nesting model" of how wicket:components nest in
that container. that model is then used to automatically insert or use any required
wicket:component parents. the whole thing then becomes totally transparent to the user.



That would be ideal. Do you forsee any problems with this approach? Again, I strongly suggest we move add() out of the constructor and into a separate method like initChildren() or something. We shouldn't be configuring the hierarchy until absolutely needed.

Gili



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user





-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to