struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3266) getFieldValue() method of ValueStackDataSource uses getDescription() to get field value may not appropriate
Date Sat, 16 Jan 2016 09:04:40 GMT

    [ https://issues.apache.org/jira/browse/WW-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15103073#comment-15103073
] 

ASF subversion and git services commented on WW-3266:
-----------------------------------------------------

Commit 294394b256d079c098dc04bab6af4ba541d6a71f in struts's branch refs/heads/master from
[~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=294394b ]

WW-3266 Uses getFieldValue() instead of getDescription()


> 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: 2.5
>
>
> Current implementation:
> {code:java}
> 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);
> {code}
> Recommended implementation :
> {code:java}
> String expression = field.getName();
> Object value = valueStack.findValue(expression);
> {code}
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message