API
Component

ExportExcel ($UI/system/components/justep/restDataExcel/exportExcel)

使用范围:UI2

Contents

component ExportExcel ($UI/system/components/justep/restDataExcel/exportExcel) extends BindComponent

导出excel组件

Constructor Top

  ExportExcel ()
  ExportExcel ( options)

Properties Top

data

导出的Data xid,导出excel的数据来源,目前只支持restData

downloadFilename = download.xls

导出的文件名

from

导出数据来源,取值范围:"UI"/"DB",默认"DB"

Attributes Top

data

导出的Data xid,导出excel的数据来源,目前只支持restData

downloadFilename = download.xls

导出的文件名

from

导出数据来源,取值范围:"UI"/"DB",默认"DB"

xid

xid标识

Methods Top

void exportExcel ()
Object get (String name)
Data getData ()
void set (json arg)

Operations Top

exportExcel ()

Events Top

boolean onBeforeExport (BeforeEvent event)
void onError (ErrorEvent event)
void onSuccess (ViewEvent event)

Constructor details Top

public ExportExcel ()

导出excel组件

public ExportExcel ( options)

构造函数

Inherited from ViewComponent

	
		参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
	 

Parameters

options

参数选项

Properties Detail Top

public data

导出的Data xid,导出excel的数据来源,目前只支持restData

public downloadFilename = download.xls

导出的文件名

public from

导出数据来源,取值范围:"UI"/"DB",默认"DB"

Attributes Detail Top

public data

导出的Data xid,导出excel的数据来源,目前只支持restData

public downloadFilename = download.xls

导出的文件名

public from

导出数据来源,取值范围:"UI"/"DB",默认"DB"

public xid

xid标识

Methods Detail Top

public void exportExcel ()

导出excel

	this.comp("excelExport1").exportExcel();

Return Value

void

public Object get (String name)

获取属性值

Parameters

String name

属性名称,取值范围:"data"、"downloadFilename"

Return Value

Object

public Data getData ()

获取导出的data对象

Return Value

Data

public void set (json arg)

设置属性值

Parameters

json arg

属性值对
结构如下:

{ "data" : {string} data xid, "downloadFilename: {string} 导出的文件名 }

Return Value

void

Operations Detail Top

public exportExcel ()

导出excel

Events Detail Top

public boolean onBeforeExport (BeforeEvent event)

[回调型事件]导出前

Parameters

BeforeEvent event


参数结构如下:

{ "source" : 组件的js对象 "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 "cancel" : 取消导出 }

Return Value

boolean

控制 导出动作是否继续

public void onError (ErrorEvent event)

[回调型事件]导出失败

Parameters

ErrorEvent event


参数结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 "message" : 导出错误信息, "result" : http请求返回 }

Return Value

void

public void onSuccess (ViewEvent event)

[回调型事件]导出成功

Parameters

ViewEvent event


参数结构如下:

{ "source" : 组件的js对象 "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void