webwork.view.jasperreports
Class ValueStackDataSource

java.lang.Object
  extended bywebwork.view.jasperreports.ValueStackDataSource
All Implemented Interfaces:
dori.jasper.engine.JRDataSource

public class ValueStackDataSource
extends java.lang.Object
implements dori.jasper.engine.JRDataSource


Constructor Summary
ValueStackDataSource(ValueStack valueStack, java.lang.String dataSource)
          Create a value stack data source on the given iterable property
 
Method Summary
 java.lang.Object getFieldValue(dori.jasper.engine.JRField field)
          Get the value of a given field
 boolean next()
          Is there any more data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueStackDataSource

public ValueStackDataSource(ValueStack valueStack,
                            java.lang.String dataSource)
Create a value stack data source on the given iterable property

Parameters:
valueStack - The value stack to base the data source on
dataSource - The property to iterate over for the report
Method Detail

next

public boolean next()
             throws dori.jasper.engine.JRException
Is there any more data

Specified by:
next in interface dori.jasper.engine.JRDataSource
Returns:
true if there are more elements to iterate over and false otherwise
Throws:
dori.jasper.engine.JRException - if there is a problem determining whether there is more data

getFieldValue

public java.lang.Object getFieldValue(dori.jasper.engine.JRField field)
                               throws dori.jasper.engine.JRException
Get the value of a given field

Specified by:
getFieldValue in interface dori.jasper.engine.JRDataSource
Parameters:
field - The field to get the value for. The expression language to get the value of the field is either taken from the description property or from the name of the field if the description is null.
Returns:
an Object containing the field value or a new ValueStackDataSource object if the field value evaluates to an object that can be iterated over.
Throws:
dori.jasper.engine.JRException - if there is a problem obtaining the value


Copyright © 2001-2003 WebWork All Rights Reserved.