You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "David Green (JIRA)" <de...@myfaces.apache.org> on 2006/02/10 19:54:56 UTC

[jira] Created: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

DataTable values do not reflect a form submission is an action is performed with immediate=true
-----------------------------------------------------------------------------------------------

         Key: MYFACES-1109
         URL: http://issues.apache.org/jira/browse/MYFACES-1109
     Project: MyFaces
        Type: Bug
  Components: Implementation  
    Versions: Nightly, 1.1.0    
    Reporter: David Green


Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true

Perform the following actions:

Failure Scenario:
1. load the page in your browser Test.jsp
2. Press the "Add" button once to add a row to the data table.
3. Enter some data in the text field in the added row.
4. Press "Add" again to add a second row to the data table.
5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.

Success Scenario:
1. Repeat steps 1 to 4 of the failure scenario (above).
2. Now press "Delete" on the second row in the data table.
3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.

This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1109) UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488114 ] 

Mike Kienenberger commented on MYFACES-1109:
--------------------------------------------

I just tested this with subForm and t:dataTable.   I wasn't able to get it to work.  subForms still cause the data to be lost.


> UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true
> ----------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1109
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1109
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-252
>    Affects Versions: 1.1.0, 1.1.1, 1.1.2-SNAPSHOT, 1.1.2, 1.1.3
>            Reporter: David Green
>         Attachments: FaceletsTestExampleByMikeKienenberger.zip, TestExampleByDavidGreen.zip
>
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

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


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "Anonymous (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

 updated MYFACES-1109:
----------------------


> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces Core
>         Type: Bug
>   Components: General
>     Versions: 1.1.2-SNAPSHOT, 1.1.0
>     Reporter: David Green
>  Attachments: FacesUtil.java, Test.java, Test.jsp, TestBean.java, TestRow.java
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1109) UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true

Posted by "Mathias Broekelmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474659 ] 

Mathias Broekelmann commented on MYFACES-1109:
----------------------------------------------

I can't see how we can fix this in h:datatable for jsf 1.1 or 1.2. The spec clearly states what should happen if a UIData component encodeBegin method is called:

In addition to the default behavior, ensure that any saved per-row state for our child input components is discarded unless it is needed to rerender the current page with errors.

see Javadoc for 1.1: http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/component/UIData.html#encodeBegin(javax.faces.context.FacesContext) 
see Javadoc for 1.2: http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/component/UIData.html#encodeBegin(javax.faces.context.FacesContext)

There is an important reason why this must be handled in this way . The invoked action could modify the datamodel source in a way which is not compatible to the saved state. For instance if an action removes a row in the dataset and the per- row state is not discarded restoring the state will either produce currupt rendering or will result in an exception. There is no link between a row in the datamodel and it's saved state but the row index.

But I think it should be able to add that support to t:datatable.

> UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true
> ----------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1109
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1109
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-252
>    Affects Versions: 1.1.0, 1.1.1, 1.1.2-SNAPSHOT, 1.1.2, 1.1.3
>            Reporter: David Green
>         Attachments: FaceletsTestExampleByMikeKienenberger.zip, TestExampleByDavidGreen.zip
>
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

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


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

Mike Kienenberger updated MYFACES-1109:
---------------------------------------


> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces Core
>         Type: Bug
>   Components: General
>     Versions: 1.1.2-SNAPSHOT, 1.1.0
>     Reporter: David Green
>  Attachments: FacesUtil.java, Test.java, Test.jsp, TestBean.java, TestRow.java
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "David Green (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

David Green updated MYFACES-1109:
---------------------------------

    Attachment: TestRow.java

backing bean model (row)

> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: Nightly, 1.1.0
>     Reporter: David Green
>  Attachments: FacesUtil.java, Test.java, Test.jsp, TestRow.java
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "David Green (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

David Green updated MYFACES-1109:
---------------------------------

    Attachment: FacesUtil.java

helper class for the backing bean

> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: Nightly, 1.1.0
>     Reporter: David Green
>  Attachments: FacesUtil.java, Test.java, Test.jsp, TestRow.java
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "David Green (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

David Green updated MYFACES-1109:
---------------------------------

    Attachment: Test.jsp

JSP used in the test

> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: Nightly, 1.1.0
>     Reporter: David Green
>  Attachments: Test.jsp
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1109) UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1109?page=comments#action_12420133 ] 

Mike Kienenberger commented on MYFACES-1109:
--------------------------------------------

For some history on the issue in JSF RI, see these bugs:

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=140
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=73

See this spec issue:

https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=153


> UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true
> ----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces Core
>         Type: Bug

>   Components: General
>     Versions: 1.1.0, 1.1.1, 1.1.2-SNAPSHOT, 1.1.2, 1.1.3
>     Reporter: David Green
>  Attachments: TestExampleByDavidGreen.zip
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "David Green (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

David Green updated MYFACES-1109:
---------------------------------

    Attachment: TestBean.java

backing bean used by the Test.jsp

> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: Nightly, 1.1.0
>     Reporter: David Green
>  Attachments: FacesUtil.java, Test.java, Test.jsp, TestBean.java, TestRow.java
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1109) UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474777 ] 

Mike Kienenberger commented on MYFACES-1109:
--------------------------------------------

I no longer remember the details of this issue.

However, as a workaround, someone (who cares) could try replacing the "immediate=true" components with a sandbox:subForm and see if that works any better.


> UIInputs in DataTable (UIData) lose submitted values when UICommands are set to immediate=true
> ----------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1109
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1109
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General, JSR-252
>    Affects Versions: 1.1.0, 1.1.1, 1.1.2-SNAPSHOT, 1.1.2, 1.1.3
>            Reporter: David Green
>         Attachments: FaceletsTestExampleByMikeKienenberger.zip, TestExampleByDavidGreen.zip
>
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

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


[jira] Updated: (MYFACES-1109) DataTable values do not reflect a form submission is an action is performed with immediate=true

Posted by "David Green (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1109?page=all ]

David Green updated MYFACES-1109:
---------------------------------

    Attachment: Test.java

backing bean model

> DataTable values do not reflect a form submission is an action is performed with immediate=true
> -----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-1109
>          URL: http://issues.apache.org/jira/browse/MYFACES-1109
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: Nightly, 1.1.0
>     Reporter: David Green
>  Attachments: FacesUtil.java, Test.java, Test.jsp, TestRow.java
>
> Similar to MYFACES-335, DataTable values do not reflect a form submission is an action is performed with immediate=true
> Perform the following actions:
> Failure Scenario:
> 1. load the page in your browser Test.jsp
> 2. Press the "Add" button once to add a row to the data table.
> 3. Enter some data in the text field in the added row.
> 4. Press "Add" again to add a second row to the data table.
> 5. Notice that the rendered page now has two rows in the data table, however text entered into the text field in the first row is now lost.
> Success Scenario:
> 1. Repeat steps 1 to 4 of the failure scenario (above).
> 2. Now press "Delete" on the second row in the data table.
> 3. Notice that the rendered page now has only one row and it is containing text entered in step 3 as expected.
> This test confirms that data tables work as expected when immediate=true is not used, but that data tables fail to work as expected when immediate=true is used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira