myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabrielle Crawford (JIRA)" <...@myfaces.apache.org>
Subject [jira] Resolved: (TRINIDAD-1967) DateTimeRangeValidator gives false failure if server specifies timezone attribute or timezone specified in trinidad-config.xml
Date Sat, 04 Dec 2010 01:06:11 GMT

     [ https://issues.apache.org/jira/browse/TRINIDAD-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gabrielle Crawford resolved TRINIDAD-1967.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0.4-core 

> DateTimeRangeValidator gives false failure if server specifies timezone attribute or
timezone specified in trinidad-config.xml
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1967
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1967
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Yee-Wah Lee
>             Fix For: 2.0.0.4-core 
>
>         Attachments: 12123_1967.diff, trunk_1967.diff
>
>
> This is a regression caused by Trinidad-1920.  In that fix, an ISO-Date format was used
to create minISO/maxISO strings on the validator so the min/maxDate could be sent down without
loss of information. However the DateFormat was not created with the timezone of the component
converter, so it would send down strings that specified different values causing false validation.

> 1. Modify the following example in trinidad-demo/clientConvert.jspx and run it (this
example uses Europe/Stockholm timezone, any TZ different from server JDK timezone will suffice).
>               <tr:inputText id="mdf5" value="#{date.date2}"
>                                     label="date converter and a validator that sets a
maximum date of tonight">
>                 <tr:convertDateTime type="both" timezone="Europe/Stockholm"/>
>                 <tr:validateDateTimeRange maximum="#{date.tonightNearMidnight}"/>
>               </tr:inputText>
> 2. If you have a hint on the validator, it would display max with the timezone of the
converter. For example, if server is PST, and I'm running on 2010-12-2, the maxDate created
is 2010-12-2 11:59 pm PST which converts to 2010-12-3 8:59am  (GMT+1).  So the maximum I can
enter on the client is 12/3/2010 8:59am. 
> 3. In the input box, type in the max  and Submit.   Get an error about failing validation
although it is within bounds. 

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


Mime
View raw message