Packagecom.flexicious.export
Classpublic class ExportOptions
InheritanceExportOptions Inheritance PrintExportOptions Inheritance Object
Implements flash.events.IEventDispatcher

Class to export the datagrid, either one page at a time or specific pages, or all pages.



Public Properties
 PropertyDefined By
  availableColumns : ArrayCollection
A list of exportable columns
ExportOptions
  columnsToExport : ArrayCollection
A list of columns to export
ExportOptions
  copyToClipboard : Boolean
Flag to copy the buffer to clipboard, instead of sending it to the server/disk.
ExportOptions
  echoUrl : String
A URL that the export infrastructure uses to trigger a file download.
ExportOptions
  enableLocalFilePersistence : Boolean
Flag to enable local file persistence.
ExportOptions
 InheritedexcludeHiddenColumns : Boolean = false
A flag that will To disable the user from printing or exporting invisible columns altogether .
PrintExportOptions
  exportAllRecords : Boolean
If set to true, exports all the records, irrespective of the filter and paging functions.
ExportOptions
  exportCollapsedRows : Boolean
Ultimate Only.
ExportOptions
  exporter : Exporter
Current exporter from the list of exporters specified by the exporters property
ExportOptions
  exporterName : String
[read-only] Name of the current exporter.
ExportOptions
  exporters : Array
list of exporters that are responsible for handling each of the export formats.
ExportOptions
  exportFileName : String
File name for the download.
ExportOptions
  exportOptionsRenderer : IFactory
The view responsible for rendering the export options Default implementation is provided by com.flexicious.export.ExportOptionsView
ExportOptions
  exportOptionsView : UIComponent
An instance of the exportOptionsRenderer.
ExportOptions
  grid : IExtendedDataGrid
The grid being exported
ExportOptions
 InheritedhideHiddenColumns : Boolean = false
A flag that will hide any columns that are not visible from being printed or exported by default.
PrintExportOptions
  includeFooters : Boolean
Whether or not to include footer cells in the export
ExportOptions
  modalWindows : Boolean
Flag, which defaults to false, launches the preview and options screen in modal mode.
ExportOptions
 InheritedpageFrom : Number = -1
In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES determines which pages of a grid with paging enabled to print.
PrintExportOptions
 InheritedpageTo : Number = -1
In conjunction with printOption/exportOption = PRINT_EXORT_SPECIFIED_PAGES determines which pages of a grid with paging enabled to print.
PrintExportOptions
 InheritedpopupParent : DisplayObject
In scenarios where you are using modules, or are in an AIR application, where you want the window to open up as a child of anything other than the top level application, use this property.
PrintExportOptions
 InheritedprintExportOption : String = Current Page
Specifies what to export, valid options are: EXPORT_CURRENT_PAGE EXPORT_ALL_PAGES EXPORT_SPECIFIED_PAGES EXPORT_SELECTED_RECORDS The All pages and specified pages are only available if paging is enabled and the grid is in client mode.
PrintExportOptions
  printExportParameters : Object
Any custom data that is passed into the print/export mechanism. This will then be available on Print/Export Options when the Print or Export is run. Please note, this is not persisted in preferences.
ExportOptions
 InheritedsaveFileMessage : String = File generated. Download?
To bypass flash player 10 security when filterPageSortMode="server", we need user action to initiate file download.
PrintExportOptions
 InheritedshowColumnPicker : Boolean = true
Flag to control whether or not to show the column picker.
PrintExportOptions
 InheritedshowWarningMessage : Boolean = true
Flag to control whether or not to show the warning message when user changes print layout or page size.
PrintExportOptions
  tableWidth : Number
For HTML/DOC export, we specify this so that the nested export does not look jagged
ExportOptions
  useExcelExporter : Boolean
Instead of using the built in csv exporter, instead exports HTML that Microsoft Excel is able to render.
ExportOptions
  useSaveFileMessage : Boolean
Flag to control the download message.
ExportOptions
Public Methods
 MethodDefined By
  
ExportOptions
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void
ExportOptions
  
create(exporterIndex:int = 0):ExportOptions
[static] onvenience method to create an exporter of a specified type
ExportOptions
  
dispatchEvent(event:Event):Boolean
ExportOptions
  
hasEventListener(type:String):Boolean
ExportOptions
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
ExportOptions
  
willTrigger(type:String):Boolean
ExportOptions
Public Constants
 ConstantDefined By
  CSV_EXPORT : int = 0
[static]
ExportOptions
  DOC_EXPORT : int = 1
[static]
ExportOptions
  HTML_EXPORT : int = 2
[static]
ExportOptions
 InheritedPRINT_EXPORT_ALL_PAGES : String = All Pages
[static]
PrintExportOptions
 InheritedPRINT_EXPORT_CURRENT_PAGE : String = Current Page
[static]
PrintExportOptions
 InheritedPRINT_EXPORT_SELECTED_PAGES : String = Selected Pages
[static]
PrintExportOptions
 InheritedPRINT_EXPORT_SELECTED_RECORDS : String = Selected Records
[static]
PrintExportOptions
  TXT_EXPORT : int = 3
[static]
ExportOptions
Property Detail
availableColumnsproperty
availableColumns:ArrayCollection

A list of exportable columns

This property can be used as the source for data binding.


Implementation
    public function get availableColumns():ArrayCollection
    public function set availableColumns(value:ArrayCollection):void
columnsToExportproperty 
columnsToExport:ArrayCollection

A list of columns to export

This property can be used as the source for data binding.


Implementation
    public function get columnsToExport():ArrayCollection
    public function set columnsToExport(value:ArrayCollection):void
copyToClipboardproperty 
copyToClipboard:Boolean

Flag to copy the buffer to clipboard, instead of sending it to the server/disk.

This property can be used as the source for data binding.


Implementation
    public function get copyToClipboard():Boolean
    public function set copyToClipboard(value:Boolean):void
echoUrlproperty 
echoUrl:String

A URL that the export infrastructure uses to trigger a file download. The various exporters (Doc,CSV,TXT,HTML) basically build a string to export and post it to this url along with the content type and the file extension This is the url to a server that simply writes back the content to the client along with the mime type and content disposition headers. C# code to do this follows (Java and PHP would do the same thing). Response.AddHeader("content-disposition", string.Format("attachment; filename=Download.{0}",Request["extension"])); Response.ContentType = Request["contentType"]; Response.Write(Request["body"]); Response.End(); Defaults to: http://www.flexicious.com/Home/Echo It is recommended you provide your own echo URL.

This property can be used as the source for data binding.


Implementation
    public function get echoUrl():String
    public function set echoUrl(value:String):void
enableLocalFilePersistenceproperty 
enableLocalFilePersistence:Boolean

Flag to enable local file persistence. Defaults to true for Flex 4.

This property can be used as the source for data binding.


Implementation
    public function get enableLocalFilePersistence():Boolean
    public function set enableLocalFilePersistence(value:Boolean):void
exportAllRecordsproperty 
exportAllRecords:Boolean

If set to true, exports all the records, irrespective of the filter and paging functions. Please note, for this to work, the dataprovider for the grid MUST be an Array Collection

This property can be used as the source for data binding.


Implementation
    public function get exportAllRecords():Boolean
    public function set exportAllRecords(value:Boolean):void
exportCollapsedRowsproperty 
exportCollapsedRows:Boolean

Ultimate Only. When set to true, this will export all rows in nested grids, even ones that are collapsed.

This property can be used as the source for data binding.


Implementation
    public function get exportCollapsedRows():Boolean
    public function set exportCollapsedRows(value:Boolean):void
exporterproperty 
exporter:Exporter

Current exporter from the list of exporters specified by the exporters property


Implementation
    public function get exporter():Exporter
    public function set exporter(value:Exporter):void
exporterNameproperty 
exporterName:String  [read-only]

Name of the current exporter.


Implementation
    public function get exporterName():String
exportersproperty 
exporters:Array

list of exporters that are responsible for handling each of the export formats. Defaults to an array of CsvExporter, DocExporter, HtmlExporter and TxtExporter.

This property can be used as the source for data binding.


Implementation
    public function get exporters():Array
    public function set exporters(value:Array):void

See also

exportFileNameproperty 
exportFileName:String

File name for the download. Defaults to download.xxx where xxx is the extension.

This property can be used as the source for data binding.


Implementation
    public function get exportFileName():String
    public function set exportFileName(value:String):void
exportOptionsRendererproperty 
exportOptionsRenderer:IFactory

The view responsible for rendering the export options Default implementation is provided by com.flexicious.export.ExportOptionsView

This property can be used as the source for data binding.


Implementation
    public function get exportOptionsRenderer():IFactory
    public function set exportOptionsRenderer(value:IFactory):void
exportOptionsViewproperty 
exportOptionsView:UIComponent

An instance of the exportOptionsRenderer. Please note, this is only instantiated when you call the export method on the controller.

This property can be used as the source for data binding.


Implementation
    public function get exportOptionsView():UIComponent
    public function set exportOptionsView(value:UIComponent):void
gridproperty 
grid:IExtendedDataGrid

The grid being exported

This property can be used as the source for data binding.


Implementation
    public function get grid():IExtendedDataGrid
    public function set grid(value:IExtendedDataGrid):void
includeFootersproperty 
includeFooters:Boolean

Whether or not to include footer cells in the export

This property can be used as the source for data binding.


Implementation
    public function get includeFooters():Boolean
    public function set includeFooters(value:Boolean):void
modalWindowsproperty 
modalWindows:Boolean

Flag, which defaults to false, launches the preview and options screen in modal mode.

This property can be used as the source for data binding.


Implementation
    public function get modalWindows():Boolean
    public function set modalWindows(value:Boolean):void
printExportParametersproperty 
printExportParameters:Object

Any custom data that is passed into the print/export mechanism. This will then be available on Print/Export Options when the Print or Export is run. Please note, this is not persisted in preferences.

This property can be used as the source for data binding.


Implementation
    public function get printExportParameters():Object
    public function set printExportParameters(value:Object):void
tableWidthproperty 
tableWidth:Number

For HTML/DOC export, we specify this so that the nested export does not look jagged

This property can be used as the source for data binding.


Implementation
    public function get tableWidth():Number
    public function set tableWidth(value:Number):void
useExcelExporterproperty 
useExcelExporter:Boolean

Instead of using the built in csv exporter, instead exports HTML that Microsoft Excel is able to render. Generates a file with an XLS extension.

This property can be used as the source for data binding.


Implementation
    public function get useExcelExporter():Boolean
    public function set useExcelExporter(value:Boolean):void
useSaveFileMessageproperty 
useSaveFileMessage:Boolean

Flag to control the download message. Defaults to true.

This property can be used as the source for data binding.


Implementation
    public function get useSaveFileMessage():Boolean
    public function set useSaveFileMessage(value:Boolean):void
Constructor Detail
ExportOptions()Constructor
public function ExportOptions()



Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
weakRef:Boolean (default = false)

create()method 
public static function create(exporterIndex:int = 0):ExportOptions

onvenience method to create an exporter of a specified type

Parameters

exporterIndex:int (default = 0)

Returns
ExportOptions
dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Parameters

type:String

Returns
Boolean
removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

willTrigger()method 
public function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean
Constant Detail
CSV_EXPORTConstant
public static const CSV_EXPORT:int = 0

DOC_EXPORTConstant 
public static const DOC_EXPORT:int = 1

HTML_EXPORTConstant 
public static const HTML_EXPORT:int = 2

TXT_EXPORTConstant 
public static const TXT_EXPORT:int = 3