Keynote
- Plugin Properties Options allow a
Introduction
- Allow plugin to gather configuration data from the plugin user.
- Plugin properties options Properties Options should be returned in the abstract method "getPropertyOptions" of each plugin.
- Plugin properties options Properties Options are in JSON format.
Basic Properties Options Structure
...
Properties Validator Types
- AJAX - ajax
...
Detail
...
Attributes of Option Types
Common Attributes for All Properties Options
...
Types Except Hidden Field and Grid
{
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
}
...
{
name : 'Property Name',
type : 'hidden',
value : 'Property Value'
}
Attributes for Grid
Wiki Markup |
---|
{
*name* : ' |
<span style=" ">Property Name</span>}Property Name{color}',
*label* : ' |
<span style=" ">Property Label</span>}Property Label{color}',
*description* : ' |
<span style=" ">Property Description</span>}Property Description{color}', |
<span style=" ">NULL</span>NULL{color}
*type* : ' |
<span style=" #ff6600">grid</span>#ff6600}grid{color}',
*columns* : \[ |
<span style=" ">}// 2 type of column, with and without options |
attribute</span>attribute{color}
{*key* : ' |
<span style=" #0000ff">col1</span>#0000ff}col1{color}', *label* : ' |
<span style=" ">Col 1</span>}Col 1{color}'},
{*key* : ' |
<span style=" #0000ff">col2</span>#0000ff}col2{color}', *label* : ' |
<span style=" ">Col 2</span>}Col 2{color}',
*options* :\[
{*value* :' |
<span style=" #0000ff">option1</span>#0000ff}option1{color}', *label* : ' |
<span style=" ">Option 1</span>}Option 1{color}'},
{*value* :' |
<span style=" #0000ff">option2</span>#0000ff}option2{color}', *label* : ' |
<span style=" ">Option 2</span>}Option 2{color}'}
\]
},
\]
*value* : \[ |
<span style=" ">NULL</span>NULL{color}
{col1 : 'abc', col2 : 'option1'},
{col1 : 'def', col2 : 'option2'}
\],
*required* : ' |
<span style=" #0000ff">true</span><span style=" ">}//optional, boolean value, default is |
false</span>
{
options_ajax_on_change : 'property1', //optional, value of this property name will passover to load options from ajax
options_ajax : ' Wiki Markup |
---|
\[CONTEXT_PATH\] |
/web/property/json/getElements?classname= org.joget.apps.form.model.FormLoadElementBinder', //Load plugin list based on class name given
url : ' Wiki Markup |
---|
\[CONTEXT_PATH\] |
/web/property/json/getPropertyOptions', //Load plugin properties
keep_value_on_change : 'true' //optional, boolean value, default is false. To keep current configuration for the next selected element
}
Detail
...
Attributes of Validator Type
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
}