Class ValueStackDataSource
java.lang.Object
org.apache.struts2.views.jasperreports7.ValueStackDataSource
- All Implemented Interfaces:
net.sf.jasperreports.engine.JRDataSource,net.sf.jasperreports.engine.JRRewindableDataSource
public class ValueStackDataSource
extends Object
implements net.sf.jasperreports.engine.JRRewindableDataSource
Ported to Struts.
-
Constructor Summary
ConstructorsConstructorDescriptionValueStackDataSource(ValueStack valueStack, String dataSourceParam, boolean wrapField) Create a value stack data source on the given iterable property -
Method Summary
Modifier and TypeMethodDescriptiongetFieldValue(net.sf.jasperreports.engine.JRField field) Get the value of a given fieldvoidMove to the first item.booleannext()Is there any more data
-
Constructor Details
-
ValueStackDataSource
Create a value stack data source on the given iterable property- Parameters:
valueStack- The value stack to base the data source ondataSourceParam- The property to iterate over for the report
-
-
Method Details
-
getFieldValue
Get the value of a given field- Specified by:
getFieldValuein interfacenet.sf.jasperreports.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 isnull.- Returns:
- an
Objectcontaining the field value or a newValueStackDataSourceobject if the field value evaluates to an object that can be iterated over.
-
moveFirst
public void moveFirst()Move to the first item.- Specified by:
moveFirstin interfacenet.sf.jasperreports.engine.JRRewindableDataSource
-
next
public boolean next() throws net.sf.jasperreports.engine.JRExceptionIs there any more data- Specified by:
nextin interfacenet.sf.jasperreports.engine.JRDataSource- Returns:
trueif there are more elements to iterate over andfalseotherwise- Throws:
net.sf.jasperreports.engine.JRException- if there is a problem determining whether there is more data
-