I debuged some more and realized that only the TextInput ModelObject is null!
Althougt it was not null after filling in a Value (call of onUpdate() of the
TextInput)

Pleas help me someone. This is driving me nuts.


kerim bey wrote:
> 
> Hi, Everyone!
> 
> I wrote this Ajax Event Handler for a AutoCompleteTextField:
> 
> @Override
> protected void onUpdate(AjaxRequestTarget target)
> {
> 
>       ChildObj co = (ChildObj)AutoCompleteTextField.findChoice();
>       if(null != co )
>       {
>               ((Obj)Form.getModelObject()).setChildObject(co);
>               ((Obj)Form.getModelObject()).setPrice(co.getPrice());
>               if(co.isBoolAttribute())
>               {
>                       ((Obj)Form.getModelObject()).setAmount(new Float(1));
>                       TextInput.setEnabled(false);
>                       target.addComponent(TextInput);
>               }
>               else
>               {
>                       ((Obj)Form.getModelObject()).setAmount(new Float(1));
>                       obj.setAmount(new Float(1));
>                       TextInput.setModelObject(new Float(1));
>                       TextInput.setEnabled(true);
>                       target.addComponent(TextInput);
>               }
>       }
> }
> 
> This is working as long as the else-block is not executed but when I
> submit the Form including the AutoCompleteTextField and the TextInput both
> AutoCompleteTextField and TextInput have a NULL value. 
> 
> Someone please help me what's wrong.
> 

-- 
View this message in context: 
http://www.nabble.com/Field-value-null-on-Submit-after-onUpdate%28%29-tp20579000p20657658.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to