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 (Updated) (JIRA)" <ji...@apache.org> on 2011/12/09 11:18:40 UTC
[jira] [Updated] (WW-3266) getFieldValue() method of
ValueStackDataSource uses getDescription() to get field value may not
appropriate
[ https://issues.apache.org/jira/browse/WW-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3266:
------------------------------
Fix Version/s: 3.x
> getFieldValue() method of ValueStackDataSource uses getDescription() to get field value may not appropriate
> -----------------------------------------------------------------------------------------------------------
>
> Key: WW-3266
> URL: https://issues.apache.org/jira/browse/WW-3266
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - JasperReports
> Affects Versions: 2.1.6
> Environment: JasperReports 3.6
> Groovy 1.5.5
> JDK 1.6 (MAC JDK)
> Reporter: Matt Jiang
> Fix For: 3.x
>
>
> Current implementation:
> String expression = field.getDescription();
> if (expression == null) {
> //Description is optional so use the field name as a default
> expression = field.getName();
> }
> Object value = valueStack.findValue(expression);
> Recommended implementation :
> String expression = field.getName();
> Object value = valueStack.findValue(expression);
> Reason:
> In JasperReports, a description of a field is just like a documentation for this field. So it may not good to use it as expression.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira