THank you for the suggestion. It prints the MyClass object but nothing has ben set. Not even the converter of the AUtoCompleteTextFiled is being called ... I cannot figure out why ...
On Fri, Feb 22, 2013 at 5:08 PM, duesenklipper [via Apache Wicket] < ml-node+s1842946n4656705...@n4.nabble.com> wrote: > > form.add(new Button("appointButton") { > > > > public void onSubmit() { > > System.out.println("HERE = " + getModelObject() ); > > <------ whatever it is the choice in the autocomplete which is within > > the MyPersonnelPanel this is always null > > > > } > > > > I didn't look at the rest of the code yet since it's pretty late here, > but this definitely won't work. You're calling the Button's > getModelObject(), not the Form's, since at this point you're in the > Button's onSubmit(), so "this" would be the Button. You don't give the > button a model, so you're getting null. If you want to use it in there, > you can for example call form.getModelObject(). > > Carl-Eric > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=4656705&i=0> > For additional commands, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=4656705&i=1> > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-wicket.1842946.n4.nabble.com/shared-models-rules-tp4656700p4656705.html > To unsubscribe from shared models - rules, click > here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4656700&code=R3JhemlhLlJ1c3NvTGFzc25lckBnbWFpbC5jb218NDY1NjcwMHwyMjY4MDg1NDM=> > . > NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/shared-models-rules-tp4656700p4656708.html Sent from the Users forum 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