You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Tamas Ruff (JIRA)" <ji...@apache.org> on 2007/11/02 18:22:40 UTC
[jira] Created: (WW-2287) Conversion error by date fields in
collections for non-english locale
Conversion error by date fields in collections for non-english locale
---------------------------------------------------------------------
Key: WW-2287
URL: https://issues.apache.org/struts/browse/WW-2287
Project: Struts 2
Issue Type: Bug
Components: Core Interceptors
Affects Versions: 2.0.11
Reporter: Tamas Ruff
I have a list of JavaBeans (called textBoxSettingsList) as a field in my action class. The JavaBean (com.myDomain.TTextBoxSettingsBean) contains a field defaultDate of type java.util.Date.
I want to get localized dates from the user, so in the jsp I have
<s:textfield name="textBoxSettingsList[0].defaultDate" theme="simple" ...></s:textfield>
and I've set in the property file <MyActionClass>-conversion.properties:
Element_textBoxSettingsList=com.myDomain.TTextBoxSettingsBean
Each user can choose a local for himself/herself. The converter works nice for English locale (11/02/2007) but it doesn't work for ex. for German (02.11.2007) and Portuguese (02-11-2007) locale. I mean I get conversion error message also when the format of the date according to the currently selected local is correct.
The problem doesn't occur if the field of type java.util.Date is a member field of a bean contained in the action directly (not through a collection).
So for a "single" bean's field of type java.util.Date the converter works correctly but for beans in a collection it seems not to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-2287) Conversion error by date fields in
collections for non-english locale
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown resolved WW-2287.
---------------------------
Resolution: Fixed
Assignee: Don Brown
Agreed, fixed, thanks.
> Conversion error by date fields in collections for non-english locale
> ---------------------------------------------------------------------
>
> Key: WW-2287
> URL: https://issues.apache.org/struts/browse/WW-2287
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.0.11
> Reporter: Tamas Ruff
> Assignee: Don Brown
> Fix For: 2.1.1
>
>
> I have a list of JavaBeans (called textBoxSettingsList) as a field in my action class. The JavaBean (com.myDomain.TTextBoxSettingsBean) contains a field defaultDate of type java.util.Date.
> I want to get localized dates from the user, so in the jsp I have
> <s:textfield name="textBoxSettingsList[0].defaultDate" theme="simple" ...></s:textfield>
> and I've set in the property file <MyActionClass>-conversion.properties:
> Element_textBoxSettingsList=com.myDomain.TTextBoxSettingsBean
> Each user can choose a local for himself/herself. The converter works nice for English locale (11/02/2007) but it doesn't work for ex. for German (02.11.2007) and Portuguese (02-11-2007) locale. I mean I get conversion error message also when the format of the date according to the currently selected local is correct.
> The problem doesn't occur if the field of type java.util.Date is a member field of a bean contained in the action directly (not through a collection).
> So for a "single" bean's field of type java.util.Date the converter works correctly but for beans in a collection it seems not to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2287) Conversion error by date fields in
collections for non-english locale
Posted by "Tamas Ruff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42596 ]
Tamas Ruff commented on WW-2287:
--------------------------------
Sorry, it was a user error: previousely I used the paramsPrepareParamsStack defined in the struts-default.xml. Now I have "overridden" this interceptor-stack in my struts.xml by moving the "i18n" interceptor before the first "params" interceptor and that solved the problem. Maybe it wouldn't be a bad idea to make this small change also in the distributed version of struts-default.xml to avoid such problems in the future.
> Conversion error by date fields in collections for non-english locale
> ---------------------------------------------------------------------
>
> Key: WW-2287
> URL: https://issues.apache.org/struts/browse/WW-2287
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.0.11
> Reporter: Tamas Ruff
>
> I have a list of JavaBeans (called textBoxSettingsList) as a field in my action class. The JavaBean (com.myDomain.TTextBoxSettingsBean) contains a field defaultDate of type java.util.Date.
> I want to get localized dates from the user, so in the jsp I have
> <s:textfield name="textBoxSettingsList[0].defaultDate" theme="simple" ...></s:textfield>
> and I've set in the property file <MyActionClass>-conversion.properties:
> Element_textBoxSettingsList=com.myDomain.TTextBoxSettingsBean
> Each user can choose a local for himself/herself. The converter works nice for English locale (11/02/2007) but it doesn't work for ex. for German (02.11.2007) and Portuguese (02-11-2007) locale. I mean I get conversion error message also when the format of the date according to the currently selected local is correct.
> The problem doesn't occur if the field of type java.util.Date is a member field of a bean contained in the action directly (not through a collection).
> So for a "single" bean's field of type java.util.Date the converter works correctly but for beans in a collection it seems not to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.