RE: AJAX: form components not being updated
I called it on the form, which houses the model and it worked :-) Thanks a bunch Igor! Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 6:02 PM To: users@wicket.apache.org Subject: Re: AJAX: form components not being updated getModel().setObject(foo); on the component that is housing the CompoundPropertyModel instance... -igor On Jan 29, 2008 5:01 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Anyone? All I need to know is how to assign a generated model to my form components. The original (empty) one is a CompoundPropertyModel. Michael -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 3:58 PM To: users@wicket.apache.org Subject: AJAX: form components not being updated I've got something similar to this call: myAutoCompleteTextField.add(new AjaxFormSubmitBehavior(form, onchange) { protected void onSubmit(AjaxRequestTarget target) { String selection = myAutoCompleteTextField.getModelObjectAsString(); MyPOJO backingModel = someFunkyModelFactory(selection); myModel = new CompoundPropertyModel(backingModel); target.addComponent(firstComp); target.addComponent(secondComp); ... } For some reason my form components are not being updated to the new model. What am I doing wrong here? Any pointers would be welcome - thanks! Michael - 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] - 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]
RE: AJAX: form components not being updated
Anyone? All I need to know is how to assign a generated model to my form components. The original (empty) one is a CompoundPropertyModel. Michael -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 3:58 PM To: users@wicket.apache.org Subject: AJAX: form components not being updated I've got something similar to this call: myAutoCompleteTextField.add(new AjaxFormSubmitBehavior(form, onchange) { protected void onSubmit(AjaxRequestTarget target) { String selection = myAutoCompleteTextField.getModelObjectAsString(); MyPOJO backingModel = someFunkyModelFactory(selection); myModel = new CompoundPropertyModel(backingModel); target.addComponent(firstComp); target.addComponent(secondComp); ... } For some reason my form components are not being updated to the new model. What am I doing wrong here? Any pointers would be welcome - thanks! Michael - 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]
Re: AJAX: form components not being updated
getModel().setObject(foo); on the component that is housing the CompoundPropertyModel instance... -igor On Jan 29, 2008 5:01 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Anyone? All I need to know is how to assign a generated model to my form components. The original (empty) one is a CompoundPropertyModel. Michael -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 3:58 PM To: users@wicket.apache.org Subject: AJAX: form components not being updated I've got something similar to this call: myAutoCompleteTextField.add(new AjaxFormSubmitBehavior(form, onchange) { protected void onSubmit(AjaxRequestTarget target) { String selection = myAutoCompleteTextField.getModelObjectAsString(); MyPOJO backingModel = someFunkyModelFactory(selection); myModel = new CompoundPropertyModel(backingModel); target.addComponent(firstComp); target.addComponent(secondComp); ... } For some reason my form components are not being updated to the new model. What am I doing wrong here? Any pointers would be welcome - thanks! Michael - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]