struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JB (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-1983) text tag and action support getText does not resolve properties having a prefix matching the name of a bean on the value stack
Date Wed, 31 Oct 2012 04:35:12 GMT

    [ https://issues.apache.org/jira/browse/WW-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487513#comment-13487513
] 

JB commented on WW-1983:
------------------------

I have tested the behavior above with Struts 2 version 2.3.1-SNAPSHOT and it is working properly
now.

Perhaps this issue can be closed now?
                
> text tag and action support getText does not resolve properties having a prefix matching
the name of a bean on the value stack
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-1983
>                 URL: https://issues.apache.org/jira/browse/WW-1983
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tags
>    Affects Versions: 2.0.6
>            Reporter: Nicolas Chalumeau
>             Fix For: Future
>
>
> Here is a simple example:
> On the value stack I have a bean named currentAccount.
> In a properties resource file I have the following properties defined:
> currentAccount.firstNameLabel=Prénom
> myCurrentAccount.firstNameLabel=Prénom
> In my JSP (result of an action) I have:
> ==============================
> <s:property value="currentAccount.firstName" /> 
> -- Using text tag
> <s:text name="currentAccount.firstNameLabel" />
> <s:text name="myCurrentAccount.firstNameLabel" />
> -- Same test with getText...
> <s:property value="%{getText('currentAccount.firstNameLabel')}" /> 
> <s:property value="%{getText('myCurrentAccount.firstNameLabel')}" /> 
> The output result is:
> =================
> Nicolas 
> -- Using text tag
> firstNameLabel
> Prénom
> -- Same test with getText...
> firstNameLabel 
> Prénom 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message