[
https://issues.apache.org/struts/browse/WW-2539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43495#action_43495
]
Sami Dalouche commented on WW-2539:
-----------------------------------
Hmm...
OK, so I progressively removed everything in my app (All interceptors, reverted
to the basic stack, removed ZeroConf, removed all my filters, cleaned up my
spring context, etc.. until I found this code in a CustomFreemarkerManager :
protected void populateContext(ScopesHashModel model, ValueStack stack,
Object action, HttpServletRequest request,
HttpServletResponse response) {
super.populateContext(model, stack, action, request, response);
stack.set("lkjlkjkj", "lkjlkjlkj");
}
and you can change the key and value by anything, it seems to screw up i18n...
The rest of the app seems fine.
So, it seems that this simple stack.set() that makes i18n not pop() its value.
Does it make any sense ???
> @s.i18n kills the Action's I18n keys
> ------------------------------------
>
> Key: WW-2539
> URL: https://issues.apache.org/struts/browse/WW-2539
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.1.1
> Reporter: Sami Dalouche
>
> Let's say the current action's properties file (not the global
> messages.properties one) contains :
> MyAction.properties:
> myKey = "text"
> And the view of the actions contains :
> <@s.text name="myKey" /> <#-- This will work -->
> <@s.i18n name="my.package.MyMessages">
> <@s.text name="whatever.key" />
> </@s.i18n>
> <@s.text name="myKey" /> <#-- This won't work -->
> => What happens is that before @s.i18n pushes the properties, everything
> works as expected, but after the end of the tag,
> the action i18n keys are not resolvable anymore.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.