You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Koen Molkenboer (JIRA)" <ji...@apache.org> on 2010/10/07 16:38:31 UTC

[jira] Created: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

Value of a TextField is not updated after model changes within a Form
---------------------------------------------------------------------

                 Key: WICKET-3100
                 URL: https://issues.apache.org/jira/browse/WICKET-3100
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.10
         Environment: Mac OS X Snow Leopard, Java 1.6.x
            Reporter: Koen Molkenboer
         Attachments: wicket-bug.zip

I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 

This does not work if those components are part of a Form, without the use of the Form it is working.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

Posted by "Koen Molkenboer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919748#action_12919748 ] 

Koen Molkenboer commented on WICKET-3100:
-----------------------------------------

Hi pedro,

Yes I can do the following:
protected void onSelectionChanged(String newSelection) {
  form.modelChanged();
}

But why is the Label updated without this?
And why does this work without a Form?


> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919390#action_12919390 ] 

Pedro Santos commented on WICKET-3100:
--------------------------------------

Hi Koen, you need to call textField.modelChanged() method to notify the component about the new value at the model

> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919836#action_12919836 ] 

Pedro Santos commented on WICKET-3100:
--------------------------------------

The form is designed to group components. The text field raw input data should be managed only if it is at the submitted form.

> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

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

Koen Molkenboer updated WICKET-3100:
------------------------------------

    Description: 
I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 

This does not work if those components are part of a Form, without the use of the Form it is working.

See the attachment for the source code.

  was:
I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 

This does not work if those components are part of a Form, without the use of the Form it is working.



> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919821#action_12919821 ] 

Pedro Santos commented on WICKET-3100:
--------------------------------------

The DropDownChoice component tests the component structure for some form component. If one is found, it is set to be submitted at the onchange event.
As in your second page the DropDownChoice component is on a form, the textfield component on the same form will receive an empty string on the form submit parameters. This value is maintained as the raw input at the form and presented on the textfield at the next render.

> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

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

Koen Molkenboer updated WICKET-3100:
------------------------------------

    Attachment: wicket-bug.zip

> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

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

Igor Vaynberg resolved WICKET-3100.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>            Assignee: Igor Vaynberg
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3100) Value of a TextField is not updated after model changes within a Form

Posted by "Koen Molkenboer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919830#action_12919830 ] 

Koen Molkenboer commented on WICKET-3100:
-----------------------------------------

I still think it is a strange situation, but apparently it works like this.
Is it possible to change this issue to a 'New feature'? Because I think it should work/act with and without a form.


> Value of a TextField is not updated after model changes within a Form
> ---------------------------------------------------------------------
>
>                 Key: WICKET-3100
>                 URL: https://issues.apache.org/jira/browse/WICKET-3100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.10
>         Environment: Mac OS X Snow Leopard, Java 1.6.x
>            Reporter: Koen Molkenboer
>         Attachments: wicket-bug.zip
>
>
> I have a page with a TextField and a DropDownChoice, when the selection of the DropDownChoice changes I want to update the value of the TextField by changing the model. 
> This does not work if those components are part of a Form, without the use of the Form it is working.
> See the attachment for the source code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.