Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16A9F11A2D for ; Mon, 28 Jul 2014 15:18:42 +0000 (UTC) Received: (qmail 10260 invoked by uid 500); 28 Jul 2014 15:18:40 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 10211 invoked by uid 500); 28 Jul 2014 15:18:40 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 10093 invoked by uid 99); 28 Jul 2014 15:18:40 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2014 15:18:40 +0000 Date: Mon, 28 Jul 2014 15:18:40 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (WW-3266) getFieldValue() method of ValueStackDataSource uses getDescription() to get field value may not appropriate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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: (was: 2.3.18) 2.5 > 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.2#6252)