plightbo  committed e80487e

got parameterized i18n working... added an "action" context to velocity so that calls like "$action.getText('foo', [1, 2, 3])" are possible now. Kinda was annoying to have to do a call to "$stack.findValue("getText('foo', [1, 2, 3])")"


  • Participants
  • Parent commits 4d4ce1f

Comments (0)

Files changed (2)

File lib/core/xwork-1.0-beta.jar

Binary file modified.

File src/java/com/opensymphony/webwork/views/velocity/

 import com.opensymphony.webwork.views.velocity.ui.JSPTagAdapterFactory;
 import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.Action;
+import com.opensymphony.xwork.LocaleAware;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import org.apache.commons.logging.Log;
     public static final String STACK = "stack";
     public static final String OGNL = "ognl";
     public static final String UI = "ui";
+    public static final String ACTION = "action";
     // the parent JSP tag
     public static final String PARENT = "parent";
         context.put(STACK, stack);
         context.put(OGNL, ognlTool);
         context.put(UI, adapterFactory.createJSPTagAdapter(config, servletRequest, servletResponse));
+        context.put(ACTION, ActionContext.getContext().getActionInvocation().getAction());
         return context;