com.opensymphony.webwork.views.jasperreports
Class JasperReportsResult

java.lang.Object
  extended bycom.opensymphony.webwork.dispatcher.WebWorkResultSupport
      extended bycom.opensymphony.webwork.views.jasperreports.JasperReportsResult
All Implemented Interfaces:
JasperReportConstants, com.opensymphony.xwork.Result, Serializable, WebWorkStatics

public class JasperReportsResult
extends WebWorkResultSupport
implements JasperReportConstants

Genreates a JasperReports report using the specified format or PDF if no format is specified. The following parameters are required:

Three optional parameter can also be specified:

This result follows the same rules from WebWorkResultSupport. Specifically, all three parameters will be parsed if the "parse" parameter is not set to false.

Author:
Patrick Lightbody, Rainer Hermanns
See Also:
Serialized Form

Field Summary
protected  String IMAGES_DIR
           
 
Fields inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
DEFAULT_PARAM, parse
 
Fields inherited from interface com.opensymphony.webwork.views.jasperreports.JasperReportConstants
FORMAT_CSV, FORMAT_HTML, FORMAT_PDF, FORMAT_XLS, FORMAT_XML
 
Fields inherited from interface com.opensymphony.webwork.WebWorkStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERLVET_DISPATCHER, SERVLET_CONFIG, SERVLET_DISPATCHER
 
Constructor Summary
JasperReportsResult()
           
 
Method Summary
protected  void doExecute(String finalLocation, com.opensymphony.xwork.ActionInvocation invocation)
          Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed).
 void setContentDisposition(String contentDisposition)
           
 void setDataSource(String dataSource)
           
 void setDocumentName(String documentName)
           
 void setFormat(String format)
           
 
Methods inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
conditionalParse, execute, setLocation, setParse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGES_DIR

protected String IMAGES_DIR
Constructor Detail

JasperReportsResult

public JasperReportsResult()
Method Detail

setDataSource

public void setDataSource(String dataSource)

setFormat

public void setFormat(String format)

setDocumentName

public void setDocumentName(String documentName)

setContentDisposition

public void setContentDisposition(String contentDisposition)

doExecute

protected void doExecute(String finalLocation,
                         com.opensymphony.xwork.ActionInvocation invocation)
                  throws Exception
Description copied from class: WebWorkResultSupport
Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed). Subclasses must implement this class to handle custom logic for result handling.

Specified by:
doExecute in class WebWorkResultSupport
Parameters:
finalLocation - the location (jsp page, action, etc) to go to.
invocation - the execution state of the action.
Throws:
Exception - if an error occurs while executing the result.

WebWork Project Page