net.sf.jasperreports.jsf.renderkit
Class ReportRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by net.sf.jasperreports.jsf.renderkit.ReportRenderer
Direct Known Subclasses:
FrameRenderer, OutputLinkRenderer

public abstract class ReportRenderer
extends javax.faces.render.Renderer

Author:
aalonsodominguez

Constructor Summary
ReportRenderer()
           
 
Method Summary
 void encodeContent(javax.faces.context.FacesContext context, UIReport component)
          Encodes the report contents into the current response.
 String encodeContentDisposition(UIReport component, String encoding)
          Encodes the HTTP CONTENT-DISPOSITION header string.
 void encodeHeaders(javax.faces.context.FacesContext context, UIReport component)
          Encodes the required headers into the current response.
 String encodeReportURL(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Builds the report URL which will trigger the RENDER_REPORT phase of the plugin's lifecycle.
abstract  String getContentDisposition()
          Obtain the specific content disposition for this kind of renderer.
protected  void registerReportView(javax.faces.context.FacesContext context)
          Establishes some flags into the faces' context so the plugin's lifecycle can perform the additional tasks needed to handle the RENDER_REPORT phase.
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, encodeBegin, encodeChildren, encodeEnd, getConvertedValue, getRendersChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportRenderer

public ReportRenderer()
Method Detail

getContentDisposition

public abstract String getContentDisposition()
Obtain the specific content disposition for this kind of renderer.

Returns:
the content disposition.

encodeContent

public void encodeContent(javax.faces.context.FacesContext context,
                          UIReport component)
                   throws IOException
Encodes the report contents into the current response.

Parameters:
context - the faces' context.
component - the report component being rendered.
Throws:
IOException - if something happens when encoding the report.

encodeContentDisposition

public String encodeContentDisposition(UIReport component,
                                       String encoding)
                                throws IOException
Encodes the HTTP CONTENT-DISPOSITION header string.

Parameters:
component - the report component.
encoding - current response encoding.
Returns:
An encoded CONTENT-DISPOSITION header value.
Throws:
IOException - if some error happens when encoding the report file name.

encodeHeaders

public void encodeHeaders(javax.faces.context.FacesContext context,
                          UIReport component)
                   throws IOException
Encodes the required headers into the current response.

Parameters:
context - the faces' context.
component - the report component.
Throws:
IOException - if some error happens writing the headers values.

encodeReportURL

public String encodeReportURL(javax.faces.context.FacesContext context,
                              javax.faces.component.UIComponent component)
Builds the report URL which will trigger the RENDER_REPORT phase of the plugin's lifecycle.

Parameters:
context - the faces' context.
component - the report component.
Returns:
the report URL.

registerReportView

protected final void registerReportView(javax.faces.context.FacesContext context)
Establishes some flags into the faces' context so the plugin's lifecycle can perform the additional tasks needed to handle the RENDER_REPORT phase.

Parameters:
context - the faces' context.


Copyright © 2011 SourceForge.net. All Rights Reserved.