com.webmethods.caf.faces.data.export
Class ExportActionHelper

java.lang.Object
  extended by com.webmethods.caf.faces.data.export.ExportActionHelper
Direct Known Subclasses:
PortletExportActionHelper

public class ExportActionHelper
extends Object

Helper utils for export actions.


Nested Class Summary
static interface ExportActionHelper.IExportFileHandler
           
 
Field Summary
static String PARAM_CHARACTER_ENCODING
           
static String PARAM_FILE_NAME
           
static String PARAM_FORCE_DOWNLOAD
           
static String PARAM_SETTINGS
           
static String PARAM_TARGET
           
static String PARAM_TYPE
           
static String PARAM_VIEW
           
static Pattern RE_ADD_BOM
           
 
Constructor Summary
ExportActionHelper()
           
 
Method Summary
static void exportControl(FacesContext context, UIComponent target, UIComponent settings, String type, String characterEncoding, String fileName, String forceDownload)
          Exports the specified target control, optionally using the settings specified by the settings control.
static void exportFile(FacesContext context, IFileExportBean exportBean)
          Exports the specified file.
static void registerExportFileHandler(ExportActionHelper.IExportFileHandler handler, boolean highPriority)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_VIEW

public static final String PARAM_VIEW
See Also:
Constant Field Values

PARAM_TARGET

public static final String PARAM_TARGET
See Also:
Constant Field Values

PARAM_SETTINGS

public static final String PARAM_SETTINGS
See Also:
Constant Field Values

PARAM_TYPE

public static final String PARAM_TYPE
See Also:
Constant Field Values

PARAM_CHARACTER_ENCODING

public static final String PARAM_CHARACTER_ENCODING
See Also:
Constant Field Values

PARAM_FILE_NAME

public static final String PARAM_FILE_NAME
See Also:
Constant Field Values

PARAM_FORCE_DOWNLOAD

public static final String PARAM_FORCE_DOWNLOAD
See Also:
Constant Field Values

RE_ADD_BOM

public static Pattern RE_ADD_BOM
Constructor Detail

ExportActionHelper

public ExportActionHelper()
Method Detail

registerExportFileHandler

public static void registerExportFileHandler(ExportActionHelper.IExportFileHandler handler,
                                             boolean highPriority)

exportControl

public static void exportControl(FacesContext context,
                                 UIComponent target,
                                 UIComponent settings,
                                 String type,
                                 String characterEncoding,
                                 String fileName,
                                 String forceDownload)
Exports the specified target control, optionally using the settings specified by the settings control.

Parameters:
context - Current faces context.
target - Control to export.
settings - Control with export settings.
type - Type of export (ie "csv" or "atom").
characterEncoding - Optional export character encoding.
fileName - Optional export file name.
forceDownload - Optional forceDownload setting: "true" to force, "false" to allow display in browser; null if no default.

exportFile

public static void exportFile(FacesContext context,
                              IFileExportBean exportBean)
Exports the specified file.

Parameters:
context - Current faces context.
exportBean - File to export.