Make those models private fields within your form. Make sure that you are overriding onDetach in the form and detaching them (even though the PropertyModel should chain the detach down to it's nested model - this is a good habit to get into so that you don't forget somewhere else).
-- Jeremy Thomerson http://www.wickettraining.com On Thu, May 7, 2009 at 9:54 PM, Chris <ch...@carlsoncentral.com> wrote: > I have a form that combines data from multiple pojo's. Currently I am > creating two seperate IModels inside my form, something like this. > > IModel model1 = new LoadableDetachableModel() { > �...@override > protected Object load() { ... } > }; > > IModel model2 = new LoadableDetachableModel() { > �...@override > protected Object load() { ... } > }; > > add(new TextField("foo", new PropertyModel(model1, "foo"))); > add(new TextField("bar", new PropertyModel(model2, "bar"))); > > > When the form is submitted, what's the best way to get the form components > back into their respected object models? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org