You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2008/11/26 19:46:44 UTC

[jira] Commented: (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:comment-tabpanel&focusedCommentId=12651100#action_12651100 ] 

Igor Vaynberg commented on WICKET-1956:
---------------------------------------

we need a quickstart that demonstrates this.

> 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
>
> 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.