com.opensymphony.webwork.views.jasperreports
Class JasperReportsResult

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

public class JasperReportsResult
extends AbstractHttpHeaderPopulatingResult
implements JasperReportConstants

Generates a JasperReports report using the specified format or PDF if no format is specified.

This result type takes the following parameters:

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

Example:

 <result name="success" type="jasper">
   <param name="location">foo.jasper</param>
   <param name="dataSource">mySource</param>
   <param name="format">CSV</param>
 </result>
 
or for pdf

 <result name="success" type="jasper">
   <param name="location">foo.jasper</param>
   <param name="dataSource">mySource</param>
 </result>
 

Version:
$Date: 2007-11-30 18:45:26 +0800 (Fri, 30 Nov 2007) $ $Id: JasperReportsResult.java 2977 2007-11-30 10:45:26Z tm_jee $
Author:
Patrick Lightbody, Rainer Hermanns, tmjee
See Also:
Serialized Form

Field Summary
protected  String contentDisposition
           
protected  String dataSource
           
protected  String delimiter
           
protected  String documentName
           
protected  String format
           
protected  String imageServletUrl
           
 
Fields inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
DEFAULT_PARAM, encode, location, parse
 
Fields inherited from interface com.opensymphony.webwork.views.jasperreports.JasperReportConstants
FORMAT_CSV, FORMAT_HTML, FORMAT_PDF, FORMAT_RTF, FORMAT_XLS, FORMAT_XML
 
Fields inherited from interface com.opensymphony.webwork.WebWorkStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER
 
Constructor Summary
JasperReportsResult()
           
 
Method Summary
protected  void afterHttpHeadersPopulatedExecute(String finalLocation, ActionInvocation invocation)
          This method is meant for subclass to override, it is called after the http headers have been set into the current http response.
 String getImageServletUrl()
           
 void setContentDisposition(String contentDisposition)
           
 void setDataSource(String dataSource)
           
 void setDelimiter(String delimiter)
           
 void setDocumentName(String documentName)
           
 void setFormat(String format)
           
 void setImageServletUrl(String imageServletUrl)
           
 
Methods inherited from class com.opensymphony.webwork.views.AbstractHttpHeaderPopulatingResult
doExecute, getHeaders
 
Methods inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
conditionalParse, execute, setEncode, setLocation, setParse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected String dataSource

format

protected String format

documentName

protected String documentName

contentDisposition

protected String contentDisposition

delimiter

protected String delimiter

imageServletUrl

protected String imageServletUrl
Constructor Detail

JasperReportsResult

public JasperReportsResult()
Method Detail

getImageServletUrl

public String getImageServletUrl()

setImageServletUrl

public void setImageServletUrl(String imageServletUrl)

setDataSource

public void setDataSource(String dataSource)

setFormat

public void setFormat(String format)

setDocumentName

public void setDocumentName(String documentName)

setContentDisposition

public void setContentDisposition(String contentDisposition)

setDelimiter

public void setDelimiter(String delimiter)

afterHttpHeadersPopulatedExecute

protected void afterHttpHeadersPopulatedExecute(String finalLocation,
                                                ActionInvocation invocation)
                                         throws Exception
Description copied from class: AbstractHttpHeaderPopulatingResult
This method is meant for subclass to override, it is called after the http headers have been set into the current http response.

Specified by:
afterHttpHeadersPopulatedExecute in class AbstractHttpHeaderPopulatingResult
Throws:
Exception

WebWork Project Page