You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ronak kamdar (JIRA)" <ji...@apache.org> on 2008/05/09 10:49:06 UTC

[jira] Created: (WW-2639) field error displaying property name instead of i18n key

field error displaying property name instead of i18n key
--------------------------------------------------------

                 Key: WW-2639
                 URL: https://issues.apache.org/struts/browse/WW-2639
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.9
         Environment: Web server :  Tomcat 5.5
Struts version : 2.0.9
Operating system :  win xp

            Reporter: Ronak kamdar
            Priority: Trivial


Hi,

Currently I am facing an issue with the default field validation . 
It displays the property name instead of picking up the i18n key associated with it.
The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.

I have added the following enty in struts.xml
    <constant name="struts.custom.i18n.resources" value="Global"/>
and i have a properties file with name as Global.properties with one of the entries as:
intField1=Integer Field


the field currently giving me problem is:
 <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>

if i enter non numeric value in this field it displays the following error:
Invalid field value for field "intField".





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


[jira] Commented: (WW-2639) field error displaying property name instead of i18n key

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44220#action_44220 ] 

Musachy Barroso commented on WW-2639:
-------------------------------------

I can replicate this in showcase, in fieldValidatorsExample.jsp set the 3rd field to:

<s:textfield key="test.i18" maxLength="4" required="true" name="integerValidatorField" />

and add this:

test.i18 = Test i18

to global_messages.properties

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>             Fix For: 2.1.3
>
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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


[jira] Commented: (WW-2639) field error displaying property name instead of i18n key

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44228#action_44228 ] 

Dave Newton commented on WW-2639:
---------------------------------

Another option is to build new error messages that with ${getText(fieldName)} in them; I've done this for nested field names where the "key" tag attribute defines the form element label.

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>             Fix For: 2.1.3
>
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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


[jira] Commented: (WW-2639) field error displaying property name instead of i18n key

Posted by "Bob Tiernay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44218#action_44218 ] 

Bob Tiernay commented on WW-2639:
---------------------------------

Could you please indicate the value of struts.ui.theme?

Thanks

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>             Fix For: 2.1.3
>
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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


[jira] Commented: (WW-2639) field error displaying property name instead of i18n key

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44222#action_44222 ] 

Musachy Barroso commented on WW-2639:
-------------------------------------

I don't think this can be fixed at all. The key is specified in the jsp, when the request is submitted, struts had no way to map the field name(which was submitted and failed to be converted) to the key.

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>             Fix For: 2.1.3
>
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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


[jira] Closed: (WW-2639) field error displaying property name instead of i18n key

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso closed WW-2639.
-------------------------------

    Resolution: Won't Fix

2 possible workarounds are:

1. overwrite the default message so the field name is not included (kind of lame)
2. write a custom type converter 

see  http://struts.apache.org/2.x/docs/type-conversion.html

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>             Fix For: 2.1.3
>
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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


[jira] Updated: (WW-2639) field error displaying property name instead of i18n key

Posted by "Ronak kamdar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ronak kamdar updated WW-2639:
-----------------------------

    Priority: Major  (was: Trivial)

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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


[jira] Updated: (WW-2639) field error displaying property name instead of i18n key

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-2639:
--------------------------

    Fix Version/s: 2.1.3

> field error displaying property name instead of i18n key
> --------------------------------------------------------
>
>                 Key: WW-2639
>                 URL: https://issues.apache.org/struts/browse/WW-2639
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Web server :  Tomcat 5.5
> Struts version : 2.0.9
> Operating system :  win xp
>            Reporter: Ronak kamdar
>             Fix For: 2.1.3
>
>
> Hi,
> Currently I am facing an issue with the default field validation . 
> It displays the property name instead of picking up the i18n key associated with it.
> The key is being picked up when displayingg label so i believe the resource bundle is proeprly set.
> I have added the following enty in struts.xml
>     <constant name="struts.custom.i18n.resources" value="Global"/>
> and i have a properties file with name as Global.properties with one of the entries as:
> intField1=Integer Field
> the field currently giving me problem is:
>  <s:textfield key="intField1" name="intField" maxLength="4" required="true"/>
> if i enter non numeric value in this field it displays the following error:
> Invalid field value for field "intField".

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