You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Dario Tortola (Created) (JIRA)" <ji...@apache.org> on 2011/11/04 14:45:00 UTC
[jira] [Created] (WW-3698) jasperreports plugin's
ValueStackDataSource converts field values in ValueStackDataSource even
when it's not wanted
jasperreports plugin's ValueStackDataSource converts field values in ValueStackDataSource even when it's not wanted
-------------------------------------------------------------------------------------------------------------------
Key: WW-3698
URL: https://issues.apache.org/jira/browse/WW-3698
Project: Struts 2
Issue Type: Bug
Components: Plugin - JasperReports
Affects Versions: 2.2.3.1
Environment: Tomcat 7 application server, Jasperreports 4.1.1
Reporter: Dario Tortola
Priority: Minor
Report A with Subreport B
Subreport B's datasource is a java.util.List field of Report A's datasource's elements
org.apache.struts2.views.jasperreports.ValueStackDataSource.getFieldValue, after locating the value, if org.apache.struts2.util.MakeIterator.isIterable(value) instead of value a new ValueStackDataSource over value is returned.
Since ValueStackDataSource is not a java.util.List, a javax.servlet.ServletException is thrown when the returned ValueStackDataSource fails to be cast to List
To avoid such unwanted conversion it's enough to change this code on ValueStackDataSource.getFieldValue
if (MakeIterator.isIterable(value)) {
return new ValueStackDataSource(this.valueStack, expression);
} else {
return value;
}
replace (MakeIterator.isIterable(value)) with (!field.getValueClass().isInstance(value) && MakeIterator.isIterable(value)) for the new ValueStackDataSource to be returned only if the value is not already what the field asks for
--
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
[jira] [Updated] (WW-3698) jasperreports plugin's
ValueStackDataSource converts field values in ValueStackDataSource even
when it's not wanted
Posted by "Lukasz Lenart (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3698:
------------------------------
Fix Version/s: 2.3.x
> jasperreports plugin's ValueStackDataSource converts field values in ValueStackDataSource even when it's not wanted
> -------------------------------------------------------------------------------------------------------------------
>
> Key: WW-3698
> URL: https://issues.apache.org/jira/browse/WW-3698
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Affects Versions: 2.2.3.1
> Environment: Tomcat 7 application server, Jasperreports 4.1.1
> Reporter: Dario Tortola
> Priority: Minor
> Labels: patch
> Fix For: 2.3.x
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Report A with Subreport B
> Subreport B's datasource is a java.util.List field of Report A's datasource's elements
> org.apache.struts2.views.jasperreports.ValueStackDataSource.getFieldValue, after locating the value, if org.apache.struts2.util.MakeIterator.isIterable(value) instead of value a new ValueStackDataSource over value is returned.
> Since ValueStackDataSource is not a java.util.List, a javax.servlet.ServletException is thrown when the returned ValueStackDataSource fails to be cast to List
> To avoid such unwanted conversion it's enough to change this code on ValueStackDataSource.getFieldValue
> if (MakeIterator.isIterable(value)) {
> return new ValueStackDataSource(this.valueStack, expression);
> } else {
> return value;
> }
> replace (MakeIterator.isIterable(value)) with (!field.getValueClass().isInstance(value) && MakeIterator.isIterable(value)) for the new ValueStackDataSource to be returned only if the value is not already what the field asks for
--
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
[jira] [Updated] (WW-3698) jasperreports plugin's
ValueStackDataSource converts field values in ValueStackDataSource even
when it's not wanted
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3698:
------------------------------
Fix Version/s: (was: 2.3.x)
2.3.6
> jasperreports plugin's ValueStackDataSource converts field values in ValueStackDataSource even when it's not wanted
> -------------------------------------------------------------------------------------------------------------------
>
> Key: WW-3698
> URL: https://issues.apache.org/jira/browse/WW-3698
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Affects Versions: 2.2.3.1
> Environment: Tomcat 7 application server, Jasperreports 4.1.1
> Reporter: Dario Tortola
> Priority: Minor
> Labels: patch
> Fix For: 2.3.6
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Report A with Subreport B
> Subreport B's datasource is a java.util.List field of Report A's datasource's elements
> org.apache.struts2.views.jasperreports.ValueStackDataSource.getFieldValue, after locating the value, if org.apache.struts2.util.MakeIterator.isIterable(value) instead of value a new ValueStackDataSource over value is returned.
> Since ValueStackDataSource is not a java.util.List, a javax.servlet.ServletException is thrown when the returned ValueStackDataSource fails to be cast to List
> To avoid such unwanted conversion it's enough to change this code on ValueStackDataSource.getFieldValue
> if (MakeIterator.isIterable(value)) {
> return new ValueStackDataSource(this.valueStack, expression);
> } else {
> return value;
> }
> replace (MakeIterator.isIterable(value)) with (!field.getValueClass().isInstance(value) && MakeIterator.isIterable(value)) for the new ValueStackDataSource to be returned only if the value is not already what the field asks for
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira