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/24 15:08:44 UTC

[jira] Created: (WICKET-1956) on submitting form ModelObject of TextField is NULL after setEnabled(true)

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.


[jira] Commented: (WICKET-1956) on submitting form ModelObject of TextField is NULL after setEnabled(true)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (WICKET-1956) on submitting form ModelObject of TextField is NULL after setEnabled(true)

Posted by "Henner Storch (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Resolved: (WICKET-1956) on submitting form ModelObject of TextField is NULL after setEnabled(true)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1956.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

your quickstart is against wicket-1.2.7 which is no longer supported. please reopen when you provide a quickstart against wicket-1.3.5.

> 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
>            Assignee: Igor Vaynberg
>         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.