>         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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to