[ 
https://issues.apache.org/struts/browse/WW-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42283
 ] 

johana pin  commented on WW-2199:
---------------------------------

First time I put this issue on user list. No answer.
Then, after 1 day, I put it on dev list. No answer.
After another day I put it on this issue list.

Even if it sound like a question it is a nice way to say that is a bug. Maybe I 
was not clear enough, but if you would read and test what I described you would 
noticed that the behaviour is not ok.

The problem that I see is that even the global properties files are loaded 
(tags are working), they can't be used in actions (when I used the message key) 
- this seams to me like a bug. 

And after the call in action of the method 'getText()',  the tag behaviour, in 
same request, is altered and it does not display the message any more, it will 
display the key of the message - this is another bug.

I also asked if there is another way to use the global messages in actions.

Is somethig wrong in what I said ? Or you did not understood the question ?

Thank you,


> can't set action error text from global resource file
> -----------------------------------------------------
>
>                 Key: WW-2199
>                 URL: https://issues.apache.org/struts/browse/WW-2199
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions
>    Affects Versions: 2.0.9
>         Environment: windows, websphere 6.0, java 1.4. - struts 2.0.9 J4 
> distribution + spring
>            Reporter: johana pin 
>
> How can I use a global resource properties file (defined in struts..xml as:
> <constant name="struts.custom.i18n.resources" value="ApplicationResources"/>
> ) for setting an action error text in an action class having an error key ?
> I tried in action class: addActionError(getText("error.business.norights")), 
> but the problem is that the text is not found and the key is returned.
> When I use only in jsp: <s:text name="error.business.norights" /> the text is 
> found - the output is ok.
> When I use in the action the call: 'getText("error.business.norights")' the 
> key is returned and after that in jsp the s: text tag does not output the 
> value of the key anymore. The output is the key: 'error.business.norights'.
> Is this a bug or is there a way to do this ?
> Thank you,

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

Reply via email to