You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Usage 

  • Plugin Properties Options allow a plugin to gather configuration data from a plugin user.
  • Plugin Properties Options should be returned in the abstract method "getPropertyOptions" of each plugin.

Structure 

  • Plugin Properties Options are in JSON format.

[
    {
        title : 'Page Title',
        properties : [
            {
                name : 'Property Name',
                label : 'Property Label',
                description : 'Property Description', //optional, default is NULL
                type : 'Property Type',
                value : 'Property Value', //optional, default is null
                required : 'Mandatory or Not', //optional, boolean value, default is false
                //… more attributes …
            }, //… more fields …
        ],
        validators : [  //optional
            //… properties custom validators …
        ],
        buttons : [  //optional
            //… custom properties page buttons …
        ]
    }, //… more properties page …
]

 

Field Types

Check Box

type : 'checkbox'

Refer to Option Field Attributes for extra attributes.

Code Editor

Combine Grid

Element Select Box

Fixed Row Grid

Grid

Header

Hidden Field

HTML Editor

Label

Multi Select Box

Password Field

Radio Button

Readonly Field

Select Box

Text Area

Text Field

Dependency Field Attributes

Options Field Attributes

  • 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.

options : [
    {value: 'value1', label : 'Value 1'},
    {value: 'value2', label : 'Value 2'},
    {value: 'value3', label : 'Value 3'}
]

options_ajax : Optional, a JSON URL which will return an array of JSON object with 'value' and 'label' attributes.

 

options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/datalist/options'

 

options_ajax_on_change : Optional, name of a property field. 

options_callback

options_script

Validator Types

AJAX

Page Button

Variable

[CONTEXT_PATH]

  • This variable will be replaced by Context Path of current URL.
  • Usually used in property attribute value which is URL
  • Example : '[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormValidator'
  • Resulted URL : '/jw/web/property/json/getElements?classname=org.joget.apps.form.model.FormValidator'

[APP_PATH]

  • This variable will be replaced by Current App Id and App Version of current URL.
  • Usually used in property attribute value which is URL
  • Example : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/datalist/options'
  • Resulted URL : '/jw/web/json/console/app/crm/3/datalist/options'

 

 

  • No labels