I come across this scenario quite a bit.  Say I have a Container/Fragment/etc
with several (~10) child components, and I'm using Ajax to toggle the
visibility of a small set (~4) of those children.  The other children are
unchanged by the Ajax call.

Are there a performance (or other) considerations between:

target.addComponent(container);

and

target.addComponent(child1);
target.addComponent(child2);
target.addComponent(child3);
target.addComponent(child4);

The first option is much cleaner, but will (I presume) run the
onBeforeRender/onConfigure/etc methods of all 10 the children.  On the other
hand, the second method might have some client-side javacript overhead and
or other Ajax-y overhead that I'm not aware of.

Thoughts?

Thanks!

Jake

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Target-addComponent-Single-Container-vs-Multiple-Components-tp3698864p3698864.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to