API
Component

BaasData ($UI/system/components/justep/data/baasData)

使用范围:UI2

Contents

component BaasData ($UI/system/components/justep/data/baasData) extends Data

[rich]BaaS绑定data,继承Data的所有属性和方法

Constructor Top

  BaasData ()

Properties Top

$UI/system/components/justep/data/js/filter filters

数据过滤条件控制对象

Object queryParam

[readonly]data的刷新参数,为queryAction准备的action请求参数

Object saveParam

[readonly]data的保存参数,为saveAction准备的action请求参数

Attributes Top

calculateRelation

[attribute]计算关系

filter

过滤

boolean isTree

是否树形数据

string orderBy

数据查询排序,如:sLastModifyTime:desc;sName:asc

string queryAction

获取数据的action,通常指定概念的queryAction

string saveAction

保存数据的action,当保存或者删除数据提交时执行的action,通常指定概念的saveAction,当data数据不需要保存时可以不指定

treeOption

树参数

Methods Top

string getQueryAction ()
string getSaveAction ()

Events Top

void onDeleteError ($UI/system/components/justep/data/data#ErrorEvent event)
void onRefreshCreateParam (RefreshCreateParamEvent event)
void onRefreshError ($UI/system/components/justep/data/data#ErrorEvent event)
void onSaveCreateParam (SaveCreateParamEvent event)
void onSaveError ($UI/system/components/justep/data/data#ErrorEvent event)

Constructor details Top

public BaasData ()

[rich]BaaS绑定data,继承Data的所有属性和方法

Properties Detail Top

public $UI/system/components/justep/data/js/filter filters

数据过滤条件控制对象

public Object queryParam

[readonly]data的刷新参数,为queryAction准备的action请求参数

public Object saveParam

[readonly]data的保存参数,为saveAction准备的action请求参数

Attributes Detail Top

public calculateRelation

[attribute]计算关系

	包括属性:
		relation [attribute] 关系名

type [attribute] 数据类型

xml格式: <calculateRelation relation="calculateRelation" type="string"/>

public filter

过滤

	包括属性:
		name [attribute] 过滤名称
		
		filter [attribute] 过滤表达式
	
	xml格式:
	
		<filter name="filter1">sName="aaa"</filter>
	

public boolean isTree

是否树形数据

public string orderBy

数据查询排序,如:sLastModifyTime:desc;sName:asc

public string queryAction

获取数据的action,通常指定概念的queryAction

public string saveAction

保存数据的action,当保存或者删除数据提交时执行的action,通常指定概念的saveAction,当data数据不需要保存时可以不指定

public treeOption

树参数

	包括属性:
		parentRelation [attribute] 父关系,形成父子树的父关系
		rootFilter [attribute] 根过滤条件,当设置时树形数据将按节点加载数据
		delayLoad [attribute] 延迟数据加载,默认值为true
		nodeKindRelation [attribute] 节点类型关系,data操作时使用指定relation自动记录是否叶子节点信息
	xml格式:
	
		<treeOption parentRelation="" delayLoad="" rootFilter=""
			nodeKindRelation=""
			nodeLevelRelation="" />
	

See GetTreeOption

Methods Detail Top

public string getQueryAction ()

获取查询baas action 名,对应reader属性

See QueryAction

Return Value

string

public string getSaveAction ()

获取保存baas action 名,对应writer属性

See SaveAction

Return Value

string

Events Detail Top

public void onDeleteError ($UI/system/components/justep/data/data#ErrorEvent event)

[回调型事件]直接删除数据失败

Parameters

$UI/system/components/justep/data/data#ErrorEvent event


结构如下:

{ "source" : 组件的js对象, "errorType" : 'server', "errorNode" : 错误信息, "httpError" : http请求失败(true/false), "httpState" : http请求返回码 }

Return Value

void

public void onRefreshCreateParam (RefreshCreateParamEvent event)

[回调型事件]业务刷新数据创建刷新参数事件,可以增加和修改用户自定义的参数

Parameters

RefreshCreateParamEvent event


结构如下:

{ "source" : 组件的js对象, "options" {Object} 新增传入的参数,如果是tree时可以使用options.parent获取父行对象 "param" : {Object} 刷新参数对象 "offset" : 取数据的偏移 "limit" : 取数据的条数 }

Return Value

void

public void onRefreshError ($UI/system/components/justep/data/data#ErrorEvent event)

[回调型事件]刷新数据失败

Parameters

$UI/system/components/justep/data/data#ErrorEvent event


结构如下:

{ "source" : 组件的js对象, "errorType" : 'server', "errorNode" : 错误信息, "httpError" : http请求失败(true/false), "httpState" : http请求返回码 }

Return Value

void

public void onSaveCreateParam (SaveCreateParamEvent event)

[回调型事件]业务数据保存创建保存参数事件,可以增加和修改用户自定义的参数

Parameters

SaveCreateParamEvent event


结构如下:

{ "source" : 组件的js对象, "param" : {Object} 保存参数对象 }

Return Value

void

public void onSaveError ($UI/system/components/justep/data/data#ErrorEvent event)

[回调型事件]保存数据失败

Parameters

$UI/system/components/justep/data/data#ErrorEvent event


结构如下:

{ "source" : 组件的js对象, "errorType" : 'server', "errorNode" : 错误信息, "httpError" : http请求失败(true/false), "httpState" : http请求返回码 }

Return Value

void