Hi,

The transient object in LoginUserModel is null because it was set to null in LoadableDetachableModel.detach(). You need to reload it in the LoadableDetachableModel.load() method.

For form submit examples, see http://www.wicket-library.com/wicket-examples/forminput/

I think the answer is yes to your last question, but I'm not sure I understand it.

Bertrand

On 18/07/2012 4:07 PM, jam.ntk wrote:
Here is the hierarchy

Parent WebPage contains Panel. Webpage has a form

add(this.form = new Form("form", new CompoundPropertyModel<LoginUser>(new
LoginUserModel(user))) {

@Override protected void onSubmit() { .....

Now on webpage form submit, in the Panel I need to get the updated LoginUser
from form updates. I tried to pass LoginUserModel (which is
LoadableDetachableModel) to the panel constructor, the transient object
<LoginUser>  is there during Panel initialization, *however on submit when in
the Panel, the transientobject is null in LoginUserModel* why is it null? I
have passed to the Panel constructor like PagePanel(...., final
IModel<LoginUser>  smodel).

Also there are memeber fields which represents propertyfields like :
private String email;

this.form.add(dataContainer = new WebMarkupContainer("dataContainer"));
dataContainer.add(new DropDownChoice<Data>("data", Data.selectAll(), new
ChoiceRenderer<Data>("name", "id")).setNullValid(true));

would the updated value of dropdown be also available in Panel as part of
Model being passed to constructor. Please provide directions/examples.
Thanks in advance

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-can-wicket-Page-form-model-be-accessed-from-child-panel-tp4650608.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to