You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2010/03/31 11:38:27 UTC
[jira] Resolved: (WW-3424) The new timezone date tag attribute is
not evaluating OGNL expressions
[ https://issues.apache.org/jira/browse/WW-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart resolved WW-3424.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.2.0
Assignee: Lukasz Lenart
Thanks for patch, applied!
> 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
> Assignee: Lukasz Lenart
> Fix For: 2.2.0
>
>
> 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.