API
Component

WindowDialog ($UI/system/components/justep/windowDialog/windowDialog)

使用范围:UI2

Contents

component WindowDialog ($UI/system/components/justep/windowDialog/windowDialog) extends Dialog

<b>使用场景</b>:弹出和父页面有数据关联的对话框; <b>使用方法</b>:添加windowDialog组件,在父页面打开对话框时可以传参,关闭对话框时可以把操作完的数据再传回父页面;

Constructor Top

  WindowDialog ()
  WindowDialog ( options)

Properties Top

string activity

打开.w使用的activity,缺省使用当前环境的

boolean forceRefreshOnOpen

打开.w时强制刷新

string process

打开.w使用的process,缺省使用当前环境的

string src

.w的url,需要使用require.toUrl(...)处理

Attributes Top

string activity

打开.w使用的activity,缺省使用当前环境的

boolean forceRefreshOnOpen

打开.w时强制刷新

string process

打开.w使用的process,缺省使用当前环境的

boolean routable

是否开启路由

string src

.w的url,需要使用require.toUrl(...)处理

Methods Top

Object get (String name)
ModelBase getInnerModel ()
void open (JSON option)
void set (json arg)

Operations Top

void close ()
void open (object option)

Events Top

void onLoad (ViewEvent event)
void onOpen (ViewEvent event)
void onReceive (ReceiveEvent event)
void onReceived (ReceiveEvent event)
void onSend (SendEvent event)

Constructor details Top

public WindowDialog ()

<b>使用场景</b>:弹出和父页面有数据关联的对话框; <b>使用方法</b>:添加windowDialog组件,在父页面打开对话框时可以传参,关闭对话框时可以把操作完的数据再传回父页面;

public WindowDialog ( options)

构造函数

Inherited from ViewComponent

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

Parameters

options

参数选项

Properties Detail Top

public string activity

打开.w使用的activity,缺省使用当前环境的

public boolean forceRefreshOnOpen

打开.w时强制刷新

public string process

打开.w使用的process,缺省使用当前环境的

public string src

.w的url,需要使用require.toUrl(...)处理

Attributes Detail Top

public string activity

打开.w使用的activity,缺省使用当前环境的

public boolean forceRefreshOnOpen

打开.w时强制刷新

public string process

打开.w使用的process,缺省使用当前环境的

public boolean routable

是否开启路由

public string src

.w的url,需要使用require.toUrl(...)处理

Methods Detail Top

public Object get (String name)

获取属性值

Parameters

String name

属性名称,取值范围:"src"、"process"、"activity"、"title"、"showTitle"、"status"、"resizable"、 "width"、"height"、"top"、"left"

Return Value

Object

public ModelBase getInnerModel ()

获取对话框内部的Model,一般用于onReceived事件时获取内部的model,注意:当对话框没有打开过时不能调用

Return Value

ModelBase

public void open (JSON option)

打开对话框

Parameters

JSON option


结构如下:

{ "src" :.w的url "data" : 传入.w的数据部分 }

Return Value

void

public void set (json arg)

设置属性值

Parameters

json arg

属性值对
结构如下:

{ "title" : {string} 对话框标题 "showTitle" : {boolean} 是否显示标题 "status": {string} 对话框显示状态,取值范围:normal,maximize "resizable" : {boolean} 是否允许改变大小 "width": {string} 对话框宽,支持css中所有的长度单位,如:200px、80%,缺省:80% "height": {string} 对话框高,支持css中所有的长度单位,如:200px、80%,缺省:80% "top": {string} 对话框上偏移,支持css中所有的长度单位,如:200px、10%,缺省:居中 "left": {string} 对话框左偏移,支持css中所有的长度单位,如:200px、10%,缺省:居中 "src" : {string} .w的url,需要使用require.toUrl(...)处理 "process" : {string} 打开.w使用的process,缺省使用当前环境的 "activity: {string} 打开.w使用的activity,缺省使用当前环境的 "forceRefreshOnOpen": {boolean} 打开.w时强制刷新,缺省false }

Return Value

void

Operations Detail Top

public void close ()

关闭window对话框

Return Value

void

public void open (object option)

打开window对话框

See Open

Parameters

object option


结构如下:

{ "src" :.w的url "data" : 传入.w的数据部分 }

Return Value

void

Events Detail Top

public void onLoad (ViewEvent event)

[回调型事件].w加载完成后

Parameters

ViewEvent event


结构如下:

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

Return Value

void

public void onOpen (ViewEvent event)

[回调型事件]打开事件

Parameters

ViewEvent event


结构如下:

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

Return Value

void

public void onReceive (ReceiveEvent event)

[回调型事件].w返回数据事件

Parameters

ReceiveEvent event


结构如下:

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

Return Value

void

public void onReceived (ReceiveEvent event)

[回调型事件].w返回数据接收处理完成事件

Parameters

ReceiveEvent event


结构如下:

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

Return Value

void

public void onSend (SendEvent event)

[回调型事件]向.w传递数据事件

Parameters

SendEvent event


结构如下:

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

Return Value

void