Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

  1. 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="
{color:
#0000ff
">Property Name</span>
}Property Name{color}',
&nbsp; &nbsp; *label* : '
<span style="
{color:
#0000ff
">Property Label</span>
}Property Label{color}',
&nbsp; &nbsp; *description* : '
<span style="
{color:
#0000ff
">Property Description</span>
}Property Description{color}', 
<span style="
{color:
#99cc00
">
}//optional, default is 
NULL</span>
NULL{color}
&nbsp; &nbsp; *type* : '
<span style="
{color:
#ff6600">grid</span>
#ff6600}grid{color}',
&nbsp; &nbsp; *columns* : \[
<span style="
{color:
#99cc00
">
}// 2 type of column, with and without options 
attribute</span>
attribute{color}
&nbsp; &nbsp; &nbsp; &nbsp; {*key* : '
<span style="
{color:
#0000ff">col1</span>
#0000ff}col1{color}', *label* : '
<span style="
{color:
#0000ff
">Col 1</span>
}Col 1{color}'},
&nbsp; &nbsp; &nbsp; &nbsp; {*key* : '
<span style="
{color:
#0000ff">col2</span>
#0000ff}col2{color}', *label* : '
<span style="
{color:
#0000ff
">Col 2</span>
}Col 2{color}',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *options* :\[
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {*value* :'
<span style="
{color:
#0000ff">option1</span>
#0000ff}option1{color}', *label* : '
<span style="
{color:
#0000ff
">Option 1</span>
}Option 1{color}'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {*value* :'
<span style="
{color:
#0000ff">option2</span>
#0000ff}option2{color}', *label* : '
<span style="
{color:
#0000ff
">Option 2</span>
}Option 2{color}'}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \]
&nbsp; &nbsp; &nbsp; &nbsp; },
&nbsp; &nbsp; \]
&nbsp; &nbsp; *value* : \[
<span style="
{color:
#99cc00
">
}//optional, default is 
NULL</span>
NULL{color}
&nbsp; &nbsp; &nbsp; &nbsp; {col1 : 'abc', col2 : 'option1'},
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;{col1 : 'def', col2 : 'option2'}
&nbsp; &nbsp; \],
&nbsp; &nbsp; *required* : '
<span style="
{color:
#0000ff">true</span>
#0000ff}true{color}', 
<span style="
{color:
#99cc00
">
}//optional, boolean value, default is 
false</span>
false{color}
}
Extra Attributes for Element Select Field

{
    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
Wiki Markup
\[APP_PATH\]
/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
}