...
Grid
- type : 'Grid'
- columns : A JSON array of 'column' JSON objects which has 2 mandatory 'key' & 'label' attributes and 2 optional 'required' & 'options' attribute. 具有2个强制“键”和“标签”属性的“列”JSON对象的JSON数组和2个可选的“必需”和“选项”属性。
- key : Identifier of this column. 此列的标识符。
- label : Label of the column header列标题的标签
- options : Optional, an array of JSON object with 'value' and 'label' attributes. A column with 'options' attribute will display the input field as select box.
- required : Optional, 'true' or 'false'. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
- 可选, 具有“ value”和“label”属性的JSON对象数组。具有'options'属性的列将显示输入字段作为选择框。
- required : 可选,'true'或'false'。“row”和“column”的“required”属性设置为“true”值的网格单元是必填字段。
value : JSON对象格式的JSON列数组,其中所有用作“column”对象的“key”属性用作属性。
Code Block language js columns : [ {key : 'value', label : 'Value', required: 'true'}, {key : 'label', label : 'Label', required: 'true'}, {key : 'width', label : 'Width', options:
value : A JSON array of grid row values in JSON Object format with all the 'key' attribute of 'column' object used as attribute.
Code Block language js columns : [ {keyvalue : 'value10%', label : 'Value10%'}, required: 'true'}, {keyvalue : 'label20%', label : 'Label20%'}, required: 'true'}, {keyvalue : 'width30%', label : 'Width20%'}, options:[ {value : '10%40%', label : '10%20%'}, ]} ], value : [ {valuelabel : '20%Username', labelvalue : '20%username'}, {valuelabel : '30%Status', labelvalue : '20%status'}, {label : 'Message', {value : '40%message', labelwidth : '20%'}, ]} ], value : [ {{label : 'UsernameDate', value : 'usernamedateCreated'}, {label : 'Status', value : 'status'}, {label : 'Message', value : 'message', width : '20%'}, {label : 'Date', value : 'dateCreated'} ] ]
- 参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 参阅 检索插件中的属性值 - 网格字段 中如何在插件代码中使用此字段类型的值。
Header
- type : 'Header'
- 不支持“值”和“必需”属性。
- 参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 字段类型用于将字段分成不同的组。它不适用于捕获数据。
Hidden Field
- type : 'Hidden'
- 参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
HTML Editor
- type : 'HtmlEditor'
- Refer to Dependency Field Attributes for extra attributes to do showRefer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Grid Single Value Field on how to use the value of this field type in the plugin code.
...
Label
- type : 'Header'
- Header does not support 'value' and 'required' attributes.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- This field type is used for separate the fields into different groups. It is not use for capture data.
Hidden Field
- type : 'Hidden'
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
HTML Editor
- type : 'HtmlEditor'
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Label
- type : 'Label'
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Multi Select Box
- type : 'MultiSelect'
- Refer to Option Field Attributes for extra attributes.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Multi Values Field on how to use the value of this field type in the plugin code.
Password Field
- type : 'Password'
- size : Optional, integer value in string format. Default to '50'. Used to control the length of the input field.
- maxlength : Optional, integer value in string format. Used to limit the number of characters can be enter in the input field.
- Refer to Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Radio Button
- type : 'Radio'
- Refer to Option Field Attributes for extra attributes.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Readonly Text Field
- type : 'Readonly'
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Select Box
- type : 'SelectBox'
- Refer to Option Field Attributes for extra attributes.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Text Area
- type : 'TextArea'
- rows : Optional, integer value in string format. Default to '5'. Used to control the height of the input field.
- cols : Optional, integer value in string format. Default to '50'. Used to control the length of the input field.
- Refer to Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Text Field
- type : 'TextField'
- size : Optional, integer value in string format. Default to '50'. Used to control the length of the input field.
- maxlength : Optional, integer value in string format. Used to limit the number of characters can be enter in the input field.
- Refer to Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Regular Express (Regex) Validation Attributes
- Label'
- 参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
Multi Select Box
- type :'MultiSelect'
- 有关额外的属性,请参阅 选项字段属性。
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 多值字段 关于如何在插件代码中使用此字段类型的值。
Password Field
- type:'密码'
- size :可选,字符串格式的整数值。默认为'50'。用于控制输入字段的长度。
- maxlength :可选,字符串格式的整数值。用于限制字符数可以在输入字段中输入。
- 参考 正则表达式(Regex)验证属性 ,使用正则表达式进行验证。
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
Radio Button
- type :'Radio'
- 有关额外的属性,请参阅 选项字段属性。
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
Readonly Text Field
- type : 'Readonly'
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
Select Box
- type : 'SelectBox'
- 有关额外的属性,请参阅 选项字段属性。
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
Text Area
- type : 'TextArea'
- rows:可选,字符串格式的整数值。默认为'5'。用于控制输入字段的高度。
- cols:可选,字符串格式的整数值。默认为'50'。用于控制输入字段的长度。
- 参考 正则表达式(Regex)验证属性 ,使用正则表达式进行验证。
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
Text Field
- type : 'TextField'
- size:可选,字符串格式的整数值。默认为'50'。用于控制输入字段的长度。
- maxlength:可选,字符串格式的整数值。用于限制字符数可以在输入字段中输入。
- 参考 正则表达式(Regex)验证属性 ,使用正则表达式进行验证。
- 请参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 请参阅 检索插件中的属性值 - 单值字段中 关于如何在插件代码中使用此字段类型的值。
正则表达式(Regex)验证属性
- 以下属性是为密码字段,文本区域和文本字段设计的。
- regex_validation:可选,以字符串格式正则表达。
- validation_message:可选,验证失败时显示的错误消息。
- The following attributes are designed for Password Field, Text Area and Text Field.
- regex_validation : Optional, regular express in string format.
- validation_message : Optional, error message to display when validation failure.
Code Block | ||
---|---|---|
| ||
{ regex_validation : '^[a-zA-Z0-9_]+$', validation_message : 'Invalid ID!!' } |
Dependency Field Attributes
依赖字段属性
- 以下属性可用于所有字段类型。
- 这些属性用于根据另一个字段的值显示/隐藏一个字段。
- 这些属性隐藏的字段的值在保存期间将被忽略。
- control_field:可选,用于控制当前字段的显示/隐藏的另一个字段的'name'。
- control_value:字符串格式的可选,值或正则表达式(正则表达式)。该值需要匹配控制字段的值才能使该字段可见。
- The following attributes are available for all field types.
- These attributes are used to show/hide a field based on the value of another field.
- The value of a field hidden by these attributes will be ignore during save.
- control_field : Optional, 'name' of another field used to control the show/hide of current field.
- control_value : Optional, value or regular expression (regex) in string format. This value need to match the value of the controlling field in order to make the field visible.
- control_use_regex : Optional, 'true' or 'false'. Default to 'false'. Set to 'true' to use regular expression (regex) in matching the value.:可选,'true'或'false'。默认为“false”。设置为“true”以使用正则表达式(正则表达式)来匹配该值。
Code Block | ||
---|---|---|
| ||
{ control_field: 'chartType', control_value: 'bar|xy|area|bubble|line|candlestick|ohlc', control_use_regex: 'true', } |
Options Field Attributes
选项字段 属性
- 以下属性设计用于选项框,如复选框,元素选择框,多选框,单选按钮和选择框。
- 您可以选择使用以下属性之一“选项”,“options_ajax”,“options_callback”或“options_script”来填充该字段的选项。
- options:可选,具有“ value”和“label”属性的JSON对象数组。
- The following attributes are designed for options fields like Check Box, Element Select Box, Multi Select Box, Radio Button and Select Box.
- You can choose to use one of the following attributes "options", "options_ajax", "options_callback" or "options_script" to populate the options for the field.
- options : Optional, an array of JSON object with 'value' and 'label' attributes.
Code Block | ||
---|---|---|
| ||
options : [ {value: 'value1', label : 'Value 1'}, {value: 'value2', label : 'Value 2'}, {value: 'value3', label : 'Value 3'} ] |
- options_ajax :Optional, a URL which will return an array of JSON object with 可选,一个返回带有'value' and 和'label' attributes.属性的JSON对象数组的URL。
Code Block | ||
---|---|---|
| ||
options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/datalist/options' |
- options_ajax_on_change : Optional, name of a property field. Used together with 可选,属性字段的名称。与'options_ajax' attribute. The field name and its value will passed as HTTP request parameter to the URL.属性一起使用。字段名称及其值将作为HTTP请求参数传递到URL。
Code Block | ||
---|---|---|
| ||
options_ajax_on_change : 'type' options_ajax : '[CONTEXT_PATH]/web/json/app[APP_PATH]/plugin/org.joget.plugin.enterprise.SamplePlugin/service?action=getJson' |
- options_callback : Optional, a javascript function name. All attributes in the field will passed as a single JSON object parameter to this function. The function should return an array of JSON object with options_callback : 可选,一个javascript函数。该字段中的所有属性将作为单个JSON对象参数传递给此函数。该函数应该返回一个带有'value' and 和'label' attributes.属性的JSON对象数组。
Code Block | ||
---|---|---|
| ||
options_callback: 'DatalistBuilder.getColumnOptions' |
- options_script :Optional, a string of javascript which will return an array of JSON object with 可选,一个javascript字符串,它将返回带有'value' and 和'label' attributes.属性的JSON对象数组。
Code Block | ||
---|---|---|
| ||
options_script: 'var tempArray = [{\'label\':\'\',\'value\':\'\'}]; for(ee in DatalistBuilder.availableColumns){ var temp = { \'label\' : UI.escapeHTML(DatalistBuilder.availableColumns[ee].label), \'value\' : DatalistBuilder.availableColumns[ee].id}; tempArray.push(temp);}tempArray;' |
...
内置JSON API for 'options_ajax'
- [CONTEXT_PATH]/web/json/console/app/[APP_PATH]/forms/options
Return all available forms of current app.返回当前应用的所有可用forms。 - [CONTEXT_PATH]/web/json/console/app/[APP_PATH]/datalist/options
Return all available datalists of current app.返回当前应用的所有可用datalist。 - [CONTEXT_PATH]/web/json/console/app/[APP_PATH]/userview/options
Return all available userviews of current app.返回当前应用的所有可用userviews。 - [CONTEXT_PATH]/web/property/json/getElements?classname={plugin interface/abstract class name, optional}
Return all available plugins based on the classname filter.
...