xworker.lang.MetaDescriptor3/@attribute/@SwtObject/@inputModel
事物 输入模型(inputModel)点击打开事物点击浏览描述

父事物:
SWT编辑设置
描述者:
子事物
thing
继承:
Model

Model's role is assigned to the edit control, value, and checking and so on.

property editor Model, the definition of this node, if the things, it will be replaced by any other means to create the properties of Model.

字段摘要
           boolean allowDecimals(允许小数)
           False to disallow decimal values (defaults to true)
           boolean allowNegative(允许负数)
           False to prevent entering a negative sign (defaults to true)
           String background(背景色)
           控件色背景色。
           string blankText(为空的提示)
           The error text to display if the allowBlank validation fails (defaults to 'This field is required')
           String dataSource(数据源)
           数据源。
           String dataType(数据类型)
           数据类型,默认是String类型。
           String defaultModify(默认修改事件)
           当控件修改了数据后触发的默认事件。
           String defaultSelection(缺省选择事件)
           控件的默认选择事件处理。
           String defaultValue(默认值)
           如果从数据源取不到值,那么使用默认值。
           String editPattern(编辑样式)
           当Swt控件获得焦点时,数据显示的样式,如果没有设置编辑样式编辑时保持查看样式。
           String focus(获取焦点)
           在初始化是SWT控件是否取得焦点。
           String focusColor(焦点颜色)
           当控件获得焦点时的背景色。
           String foreground(前景色)
           控件的前景色。
           string invalidClass(错误样式)
           The CSS class to use when marking a field invalid (defaults to 'x-form-invalid')
           string invalidText(错误提示)
           
The error text to use when marking a field invalid and no message is provided (defaults to 'The value in this field i...
           number maxLength(最大长度)
           
Maximum input field length allowed by validation (defaults to Number.MAX_VALUE). This behavior is intended to provide...
           date/string maxValue(最大值)
           
The maximum allowed time. Can be either a Javascript date object with a valid time value or a string time in a valid ...
           number minLength(最小长度)
           Minimum input field length required (defaults to 0)
           date/string minValue(最小值)
           
The minimum allowed time. Can be either a Javascript date object with a valid time value or a string time in a valid ...
           String name(名称)
           Model的名称。
           String propertyName(属性名称)
           如果指定了数据属性,那么是使用Ognl以数据属性为路径从数据源上取值和赋值的。
           regexp regex(正则表达式)
           
A JavaScript RegExp object to be tested against the field value during validation (defaults to null). If the test fai...
           String regexText(正则表达式提示)
           
           String swtControl(SWT控件)
           Model所对应的SWT控件,用于对此控件取值、赋值等操作。
           String validate(是否校验)
           如果选择false那么不校验此数据。
           String validateAllowBlank(允许为空)
           是否允许为空。
           boolean validateOnBlur(失去焦点时校验)
           Whether the field should validate when it loses focus (defaults to true).
           number validationDelay(校验延迟)
           The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
           String viewPattern(查看样式)
           数据查看显示的样式。
 
方法摘要
           create
          

Model的创建动作。

           doValidate
          
           getValue
          
           getValueForValidate
          
           getValuesForSelect
          

当本Model对应的SWT控件是下拉选择、列表、多项选择、单项选择等时,如果编辑控件没有设置供选择的值,那么该方法提供选择的值。

返回List<Thing>,Thing的定义参看属性的value子事物。

           init
          
           initSelf
          
           setValue
          

通过Model设置值的动作。

设置值的过程:

  • 通过dataSource和propertyName和defaultValue得到要设置的值。
    如果dataSource为空那么数据默认从父Model传递,如果propertyName不为空那么取dataSource的属性,否则数据为dataSource,如果通过以上取数据还是为null那么使用defaultValue。
  • 实际调用doSetValue动作设置值。
           validate
          

校验表单中的数据。

 
子事物摘要
           Model
          
           actions(Actions)
          
 
字段详细信息

allowDecimals(允许小数)点击打开事物

False to disallow decimal values (defaults to true)

allowNegative(允许负数)点击打开事物

False to prevent entering a negative sign (defaults to true)

background(背景色)点击打开事物

控件色背景色。


blankText(为空的提示)点击打开事物

The error text to display if the allowBlank validation fails (defaults to 'This field is required')

可以使用Freemarker模板。


dataSource(数据源)点击打开事物

数据源。

如果数据源为空,那么使用父数据源。


dataType(数据类型)点击打开事物

数据类型,默认是String类型。

当从控件取值时会转化为指定的数据类型,从数据源取值时不做类型校验。


defaultModify(默认修改事件)点击打开事物

当控件修改了数据后触发的默认事件。

 可以继承父Model所定义的事件,父Model约定以_parentModelDefaultModify为变量名向下传递。

只接受通用事件。


defaultSelection(缺省选择事件)点击打开事物

控件的默认选择事件处理。

Button的点击和Text回车都会触发此事件,可以实现编辑表单输入回车提交表单的效果。

如果没有输入那么继承父Model的相应属性,父Model的事件约定以_parentModelDefaultSelection为变量名向下传递。

只接受通用事件。


defaultValue(默认值)点击打开事物

如果从数据源取不到值,那么使用默认值。

如果默认值以"号包围那么表示是常量,否则认为是以默认值为名称从变量上下文actionContext中取值。


editPattern(编辑样式)点击打开事物

当Swt控件获得焦点时,数据显示的样式,如果没有设置编辑样式编辑时保持查看样式。


focus(获取焦点)点击打开事物

在初始化是SWT控件是否取得焦点。

可以用于设置一个输入表单的默认取得焦点的控件。


focusColor(焦点颜色)点击打开事物

当控件获得焦点时的背景色。


foreground(前景色)点击打开事物

控件的前景色。


invalidClass(错误样式)点击打开事物

The CSS class to use when marking a field invalid (defaults to 'x-form-invalid')

invalidText(错误提示)点击打开事物

The error text to use when marking a field invalid and no message is provided (defaults to 'The value in this field i...

maxLength(最大长度)点击打开事物

Maximum input field length allowed by validation (defaults to Number.MAX_VALUE). This behavior is intended to provide...

maxValue(最大值)点击打开事物

The maximum allowed time. Can be either a Javascript date object with a valid time value or a string time in a valid ...

minLength(最小长度)点击打开事物

Minimum input field length required (defaults to 0)

minValue(最小值)点击打开事物

The minimum allowed time. Can be either a Javascript date object with a valid time value or a string time in a valid ...

name(名称)点击打开事物

Model的名称。

可以通过此名称在变量上下文actionContext取得本Model。


propertyName(属性名称)点击打开事物

如果指定了数据属性,那么是使用Ognl以数据属性为路径从数据源上取值和赋值的。


regex(正则表达式)点击打开事物

A JavaScript RegExp object to be tested against the field value during validation (defaults to null). If the test fai...

regexText(正则表达式提示)点击打开事物


swtControl(SWT控件)点击打开事物

Model所对应的SWT控件,用于对此控件取值、赋值等操作。

可以是Thing,此时会调用Thing的setValue、getValue和valudate方法赋值、取值和校验等。


validate(是否校验)点击打开事物

如果选择false那么不校验此数据。


validateAllowBlank(允许为空)点击打开事物

是否允许为空。


validateOnBlur(失去焦点时校验)点击打开事物

Whether the field should validate when it loses focus (defaults to true).

validationDelay(校验延迟)点击打开事物

The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)

viewPattern(查看样式)点击打开事物

数据查看显示的样式。


 
方法详细信息

create

Model的创建动作。


doValidate


getValue


getValueForValidate


getValuesForSelect

当本Model对应的SWT控件是下拉选择、列表、多项选择、单项选择等时,如果编辑控件没有设置供选择的值,那么该方法提供选择的值。

返回List<Thing>,Thing的定义参看属性的value子事物。


init


initSelf


setValue

通过Model设置值的动作。

设置值的过程:


validate

校验表单中的数据。


 
子事物详细信息

Model点击打开事物


actions(Actions)点击打开事物