Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2333

ValueStackDataSource implementation leads to class cast exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 2.0.11
    • None
    • Plugin - JasperReports
    • None

    Description

      Assume you have a class Foo that has a Collection of Bar's. Without using Struts, the expected behavior of a report that takes Foo's as input is, that a reference $F

      {bar}

      returns a java.util.Collection (of Bar's). However, this will not be the case when using the ValueStackDataSource implementation; an instance of ValueStackDataSource is returned instead of a collection. If the method "getFieldValue" gets called, it checks if the field value is iteratable (which is true for collections) and then returns a new ValueStackDataSource instead of the field value itself. I assume that this behavior breaks many reports.

      Attachments

        Activity

          People

            Unassigned Unassigned
            thorstenschaefer Thorsten Schäfer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: