Thanks, Igor. Java maintaining references when serializing makes sense...I should have realized that. Otherwise, deserialization would constantly introduce new instances in place of proper references.
On Tue, Feb 28, 2012 at 4:52 PM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote: > On Tue, Feb 28, 2012 at 2:49 PM, Allen Gilbert <allen.gilb...@doane.edu> > wrote: > > I understand that it's not a good idea to store model bean objects as > > instance variables in a Component, but I'm not clear on this: is it OK to > > store references to child Components as private fields in a parent > > Component (e.g. a Panel)? > > yes, its perfectly fine. > > > It often seems convenient to do so, especially > > when the child components need to be added to an AjaxRequestTarget. > > However, when that Panel is serialized, will its child Components be > > serialized twice, once in the component hierarchy, and again as instance > > variables? > > no, serialization supports references. > > -igor > > > > > -Allen > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >