Hi, Everyone!
I wrot 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 bu 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-tp20579000p20579000.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]