John Krasnay wrote:
> 
> AddressFormComponent should extend Panel, not FormComponentPanel.
> 

Thank you for yout help! Now AddressFormComponent extends from Panel and
fixed the wrong chainigs. I also asserted that the address is NOT null right
before I submit the form in my test-case. But after submission I still get
the following Exception:
 
org.apache.wicket.WicketRuntimeException: Attempted to set property value on
a null object. Property expression: street Value: Straße
        at
org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:125)
        at
org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169)
        at 
org.apache.wicket.Component.setDefaultModelObject(Component.java:3021)
        at
org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1141)
        at
org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223)
        at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488)
        at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467)
        at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467)
        at
org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439)
        at
org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1970)
        at
org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1938)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:960)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:908)
        at 
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876)
-- 
View this message in context: 
http://www.nabble.com/Example-for-FormComponentPanel-best-practice-for-reusable-form-components-tp23391811p23395642.html
Sent from the Wicket - User 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