You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Colin Chalmers (JIRA)" <my...@incubator.apache.org> on 2005/08/19 09:29:55 UTC

[jira] Created: (MYFACES-428) InputDate(s) within dataTable submitting incorrect dates

InputDate(s) within dataTable submitting incorrect dates
--------------------------------------------------------

         Key: MYFACES-428
         URL: http://issues.apache.org/jira/browse/MYFACES-428
     Project: MyFaces
        Type: Bug
    Versions: 1.0.9 beta    
 Environment: JDK 1.4.2_08, win XP, Jetty  5
    Reporter: Colin Chalmers
    Priority: Minor


Using InputDate within a dataTable to accept birthDates of clients. The dates are rendered correctly on screen afterwhich one may select the individual dates. After submitting to server all date objects in the individual customer objects are set to the *last* date that was selected.

A workaround I'm using at the moment is to use inputText fields in conjunction with a date pattern which works correctly.

Using the InputDate out with the datatable to accept (for example) a departure date works no problem.

-- 
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-428) InputDate(s) within dataTable submitting incorrect dates

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-428?page=comments#action_12329642 ] 

Martin Marinschek commented on MYFACES-428:
-------------------------------------------

I will need more information about your problem to fully understand what is not working for you.

Can you post JSP file and backing bean?

regards,

Martin

> InputDate(s) within dataTable submitting incorrect dates
> --------------------------------------------------------
>
>          Key: MYFACES-428
>          URL: http://issues.apache.org/jira/browse/MYFACES-428
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: JDK 1.4.2_08, win XP, Jetty  5
>     Reporter: Colin Chalmers
>     Assignee: Martin Marinschek
>     Priority: Minor
>  Attachments: inputdate
>
> Using InputDate within a dataTable to accept birthDates of clients. The dates are rendered correctly on screen afterwhich one may select the individual dates. After submitting to server all date objects in the individual customer objects are set to the *last* date that was selected.
> A workaround I'm using at the moment is to use inputText fields in conjunction with a date pattern which works correctly.
> Using the InputDate out with the datatable to accept (for example) a departure date works no problem.

-- 
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-428) InputDate(s) within dataTable submitting incorrect dates

Posted by "Sharath Reddy (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-428?page=comments#action_12329847 ] 

Sharath Reddy commented on MYFACES-428:
---------------------------------------

Hi Martin,

I had the same problem as the original poster, and have already submitted a patch file (inputdate) along with an explanation of what was wrong. The problem is that if you have:

<t:dataTable>
   <t:inputDate/>
</t:dataTable>

If you have 4 rows in the table, for example, and enter 4 different  values, when the form is submitted all the dates will have the value that was entered for the last date.

Would you like me to submit a war file that reproduces the problem?



> InputDate(s) within dataTable submitting incorrect dates
> --------------------------------------------------------
>
>          Key: MYFACES-428
>          URL: http://issues.apache.org/jira/browse/MYFACES-428
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: JDK 1.4.2_08, win XP, Jetty  5
>     Reporter: Colin Chalmers
>     Assignee: Martin Marinschek
>     Priority: Minor
>  Attachments: inputdate
>
> Using InputDate within a dataTable to accept birthDates of clients. The dates are rendered correctly on screen afterwhich one may select the individual dates. After submitting to server all date objects in the individual customer objects are set to the *last* date that was selected.
> A workaround I'm using at the moment is to use inputText fields in conjunction with a date pattern which works correctly.
> Using the InputDate out with the datatable to accept (for example) a departure date works no problem.

-- 
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-428) InputDate(s) within dataTable submitting incorrect dates

Posted by "Sharath Reddy (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-428?page=all ]

Sharath Reddy updated MYFACES-428:
----------------------------------

    Attachment: inputdate

When an inputDate (or ANY component) is used within a dataTable, the dataTable creates a single instance of the component. When the dataTable iterates through its rows, it uses the same instance of the component, only saving/restoring the submittedValue/value/isValueSet between each row. The inputData was attemping to cache its value (userData). However, since the same instance of the component was used for iteration, the cached value was being updated by each consecutive record, and finally all the rows would have the value assigned to the last row. Hope this explanation is clear!

> InputDate(s) within dataTable submitting incorrect dates
> --------------------------------------------------------
>
>          Key: MYFACES-428
>          URL: http://issues.apache.org/jira/browse/MYFACES-428
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: JDK 1.4.2_08, win XP, Jetty  5
>     Reporter: Colin Chalmers
>     Priority: Minor
>  Attachments: inputdate
>
> Using InputDate within a dataTable to accept birthDates of clients. The dates are rendered correctly on screen afterwhich one may select the individual dates. After submitting to server all date objects in the individual customer objects are set to the *last* date that was selected.
> A workaround I'm using at the moment is to use inputText fields in conjunction with a date pattern which works correctly.
> Using the InputDate out with the datatable to accept (for example) a departure date works no problem.

-- 
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-428) InputDate(s) within dataTable submitting incorrect dates

Posted by "Sharath Reddy (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-428?page=all ]

Sharath Reddy updated MYFACES-428:
----------------------------------

    Attachment: inputDate.zip

Hello,

The attached zip file contains:
1. War file that will help you reproduce the problem (hit http://localhost:8080/blank/table.jsf)
2. Project containing JSP file and backing bean
3. Patch for the tomahawk 'inputDate' component

Hope this issue can finally be closed! Let me know if you have any questions...

> InputDate(s) within dataTable submitting incorrect dates
> --------------------------------------------------------
>
>          Key: MYFACES-428
>          URL: http://issues.apache.org/jira/browse/MYFACES-428
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: JDK 1.4.2_08, win XP, Jetty  5
>     Reporter: Colin Chalmers
>     Assignee: Martin Marinschek
>     Priority: Minor
>  Attachments: inputDate.zip, inputdate
>
> Using InputDate within a dataTable to accept birthDates of clients. The dates are rendered correctly on screen afterwhich one may select the individual dates. After submitting to server all date objects in the individual customer objects are set to the *last* date that was selected.
> A workaround I'm using at the moment is to use inputText fields in conjunction with a date pattern which works correctly.
> Using the InputDate out with the datatable to accept (for example) a departure date works no problem.

-- 
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] Closed: (MYFACES-428) InputDate(s) within dataTable submitting incorrect dates

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-428?page=all ]
     
Martin Marinschek closed MYFACES-428:
-------------------------------------

    Fix Version: Nightly
     Resolution: Fixed

thanks to  Sharath Reddy for his patch

> InputDate(s) within dataTable submitting incorrect dates
> --------------------------------------------------------
>
>          Key: MYFACES-428
>          URL: http://issues.apache.org/jira/browse/MYFACES-428
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: JDK 1.4.2_08, win XP, Jetty  5
>     Reporter: Colin Chalmers
>     Assignee: Martin Marinschek
>     Priority: Minor
>      Fix For: Nightly
>  Attachments: inputDate.zip, inputdate
>
> Using InputDate within a dataTable to accept birthDates of clients. The dates are rendered correctly on screen afterwhich one may select the individual dates. After submitting to server all date objects in the individual customer objects are set to the *last* date that was selected.
> A workaround I'm using at the moment is to use inputText fields in conjunction with a date pattern which works correctly.
> Using the InputDate out with the datatable to accept (for example) a departure date works no problem.

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