You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Henner Storch (JIRA)" <ji...@apache.org> on 2008/11/28 17:01:44 UTC
[jira] Updated: (WICKET-1956) on submitting form ModelObject of
TextField is NULL after setEnabled(true)
[ https://issues.apache.org/jira/browse/WICKET-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henner Storch updated WICKET-1956:
----------------------------------
Attachment: quickstart2.zip
Use Java 5 or higher
> on submitting form ModelObject of TextField is NULL after setEnabled(true)
> --------------------------------------------------------------------------
>
> Key: WICKET-1956
> URL: https://issues.apache.org/jira/browse/WICKET-1956
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.3.5
> Environment: Java 6 R10, Jetty Server, WinXP sp3, FF3
> Reporter: Henner Storch
> Attachments: quickstart2.zip
>
>
> This Ajax event handler ist attached to an AbstractAutocompleteTextField via AjaxFormComponentUpdateBehaviour("onchange"):
> @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);
> }
> }
> }
> If the Form containing the AbstractAutocompleteTextField and the TextField after the else-block has been executed the ModelObject of TextField is NULL no matter what Value is filled in. All other fields ModelObjects of the form are filled correctly.
> Form submitting does not fail when else-block was not executed.
> ModelObject of the form is a CompoundPropertyModel of "Obj".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.