[
{
title : 'Page Title',
properties : [
{
name : 'Property Name',
label : 'Property Label',
type : 'Property Type',
required : 'Mandatory or Not',
//… more property attributes …
}, //… more properties …
],
validators : [
//… properties custom validators …
]
}, //… more properties page …
] |
{
name : 'Property Name',
label : 'Property Label',
description : 'Property Description', //optional, default is NULL
type : 'readonly',
value : 'Property Value', //optional , default is empty string
required : 'true', //optional, boolean value, default is false
}
{
size : '50', //optional , integer value, default is NULL, only for text field and password field
maxlength : '50', //optional, integer value, default is NULL, only for text field and password field
rows : '50', //optional, integer value, default is NULL, only for text area and html editor
cols : '50', //optional, integer value, default is NULL , only for text area and html editor
regex_validation : '^+$', //optional, default is NULL
\[a-zA-Z0-9_\|KB:a-zA-Z0-9_\]
validation_message : 'Error!!' //optional, default is NULL
}
{ *size* : '<span style="color: #0000ff">10</span>', <span style="color: #99cc00">//optional, integer value, default is 4,</span> <span style="color: #008000">only for multi select box</span> *options* : \[<span style="color: #99cc00">//is optional to use this attribute or options_ajax</span> {value: '<span style="color: #0000ff">value1</span>', label : '<span style="color: #0000ff">Value 1</span>'}, {value: '<span style="color: #0000ff">value2</span>', label : '<span style="color: #0000ff">Value 2</span>'}, {value: '<span style="color: #0000ff">value3</span>', label : '<span style="color: #0000ff">Value 3</span>'} \], *options_ajax_on_change* : '<span style="color: #0000ff">property1</span>', <span style="color: #99cc00">//optional, this property name and value will passed as HTTP request parameter to the URL defined in the options_ajax property</span> *options_ajax* : '<span style="color: #0000ff">URL to load options JSON</span>' <span style="color: #99cc00">//optional, URL which returns the JSON Array of a set of Objects that have value & label attribute</span> }
{
name : 'Property Name',
type : 'hidden',
value : 'Property Value'
}
{ *name* : '<span style="color: #0000ff">Property Name</span>', *label* : '<span style="color: #0000ff">Property Label</span>', *description* : '<span style="color: #0000ff">Property Description</span>', <span style="color: #99cc00">//optional, default is NULL</span> *type* : '<span style="color: #ff6600">grid</span>', *columns* : \[<span style="color: #99cc00">// 2 types of column, with and without options attribute</span> {*key* : '<span style="color: #0000ff">col1</span>', *label* : '<span style="color: #0000ff">Col 1</span>'}, {*key* : '<span style="color: #0000ff">col2</span>', *label* : '<span style="color: #0000ff">Col 2</span>', *options* :\[ {*value* :'<span style="color: #0000ff">option1</span>', *label* : '<span style="color: #0000ff">Option 1</span>'}, {*value* :'<span style="color: #0000ff">option2</span>', *label* : '<span style="color: #0000ff">Option 2</span>'} \] }, \],
*value*:\[ <span style="color: #99cc00"> </span><span style="color: #99cc00"><em>//Optional. Default is null. The name of each sub-object must match a key from the columns object above. (e.g. col1 below matches col1 in one of the columns:key names above)</em></span> \{ col1 : '<span style="color: #0000ff">abc</span>', col2 : '<span style="color: #0000ff">option1</span>' }, {col1 : 'def', col2 : 'option2'}
],
required : 'true', //optional, boolean value, default is false
}
{
options_ajax_on_change : 'property1', //optional, this property name and value will passed as HTTP request parameter to the URL defined in the options_ajax property
options_ajax : '/web/property/json/getElements?classname= org.joget.apps.form.model.FormLoadElementBinder', //Load plugin list based on class name given
\[KB:CONTEXT_PATH\]
url : '/web/property/json
\[KB:CONTEXT_PATH\]/getPropertyOptions', //Load plugin properties
\[KB:APP_PATH\]
keep_value_on_change : 'true' //optional, boolean value, default is false. To keep current configuration for the next selected element
}
Attributes for AJAX
{
type : 'ajax',
url : 'URL to validate properties page value' , // All properties in the same page will send to this url to validate, URL return a JSON Object with status (success or fail) & message (JSONArray of String) attribute
default_error_message : 'Error in this page!!' //optional, default is null
}