The new timezone date tag attribute is not evaluating OGNL expressions
----------------------------------------------------------------------
Key: WW-3424
URL: https://issues.apache.org/jira/browse/WW-3424
Project: Struts 2
Issue Type: Bug
Components: Other
Affects Versions: 2.2.0
Environment: any
Reporter: Cristian Peraferrer
If you fill the timezone attribute of the date tag with an OGNL expression, is
not being evaluated at all, fact that makes the attribute almost useless.
Here is a patch to fix it:
--- - 2010-03-30 23:33:27.000000000 +0200
+++ src/core/src/main/java/org/apache/struts2/components/Date.java
2010-03-30 23:28:20.000000000 +0200
@@ -304,6 +304,9 @@
} else {
TimeZone tz = TimeZone.getDefault();
if (timezone != null) {
+ timezone = stripExpressionIfAltSyntax(timezone);
+ String actualTimezone = (String)
getStack().findValue(timezone, String.class);
+ if (actualTimezone != null) timezone = actualTimezone;
tz = TimeZone.getTimeZone(timezone);
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.