Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
...
language | js |
---|
Code Block | ||
---|---|---|
| ||
columns : [
{key : 'key', label : 'Columns'},
{key : 'value', label : 'Value |
...
', required: 'true'},
{ |
...
key : ' |
...
label' |
...
, |
...
|
...
label : ' |
...
Label' |
...
, |
...
required: 'true'}, {key : 'width', label : ' |
...
Width', options:[
{value : '10%', label : '10%'},
{value : '20%', label : '20%'},
{value : '30%', label : '20%'},
{value : '40%', label : '20%'}
]}
] |
Code Block | ||
---|---|---|
| ||
{
regex_validation : '^[a-zA-Z0-9_]+$',
validation_message : 'Invalid ID!!'
} |
Code Block | ||
---|---|---|
| ||
{
control_field: 'chartType',
control_value: 'bar|xy|area|bubble|line|candlestick|ohlc',
control_use_regex: 'true',
} |
Code Block | ||
---|---|---|
| ||
options : [
{value: 'value1', label : 'Value 1'},
{value: 'value2', label : 'Value 2'},
{value: 'value3', label : 'Value 3'}
] |
Code Block | ||
---|---|---|
| ||
options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/datalist/options' |
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' |
Code Block | ||
---|---|---|
| ||
options_callback: 'DatalistBuilder.getColumnOptions' |
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;' |
DatalistBuilder.getColumnOptions(properties)
Can be used by plugins related to Datalist Builder. It return all available columns based on binder configuration.
Code Block | ||
---|---|---|
| ||
columns : [
{key : 'key', label : 'Columns'}, // first column will used to populate row label
{key : 'value', label : 'Value', required: 'true'},
{key : 'label', label : 'Label', required: 'true'},
{key : 'width', label : 'Width', options:[
{value : '10%', label : '10%'},
{value : '20%', label : '20%'},
{value : '30%', label : '20%'},
{value : '40%', label : '20%'}
]}
],
rows : [
{label : 'Username', required: 'true'},
{label : 'Status'},
{label : 'Message'},
{label : 'Date'}
],
value : [
{label : 'Username'},
{label : 'Status'},
{label : 'Message', width : '20%'},
{label : 'Date', value : 'dateCreated'}
] |
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 | ||
---|---|---|
| ||
columns : [
{key : 'value', label : 'Value', required: 'true'},
{key : 'label', label : 'Label', required: 'true'},
{key : 'width', label : 'Width', options:[
{value : '10%', label : '10%'},
{value : '20%', label : '20%'},
{value : '30%', label : '20%'},
{value : '40%', label : '20%'}
]}
],
value : [
{label : 'Username', value : 'username'},
{label : 'Status', value : 'status'},
{label : 'Message', value : 'message', width : '20%'},
{label : 'Date', value : 'dateCreated'}
] |
Code Block | ||
---|---|---|
| ||
{
regex_validation : '^[a-zA-Z0-9_]+$',
validation_message : 'Invalid ID!!'
} |
Code Block | ||
---|---|---|
| ||
{
control_field: 'chartType',
control_value: 'bar|xy|area|bubble|line|candlestick|ohlc',
control_use_regex: 'true',
} |
Code Block | ||
---|---|---|
| ||
options : [
{value: 'value1', label : 'Value 1'},
{value: 'value2', label : 'Value 2'},
{value: 'value3', label : 'Value 3'}
] |
Code Block | ||
---|---|---|
| ||
options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/datalist/options' |
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' |
Code Block | ||
---|---|---|
| ||
options_callback: 'DatalistBuilder.getColumnOptions' |
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;' |
DatalistBuilder.getColumnOptions(properties)
Can be used by plugins related to Datalist Builder. It return all available columns based on binder configuration.
Example:
Code Block | ||
---|---|---|
| ||
buttons : [{
name : 'testmail',
label : 'Send Test Email',
ajax_url : '[CONTEXT_PATH]/web/json/app[APP_PATH]/plugin/org.joget.apps.app.lib.EmailTool/service?action=testmail',
fields : ['host', 'port', 'security', 'username', 'password'],
addition_fields : [
{
name : 'from',
label : 'From',
type : 'textfield',
required : 'True'
},
{
name : 'toSpecific',
label : 'To',
type : 'textfield',
required : 'True'
}
]
}] |
Code Block | ||
---|---|---|
| ||
String value = getPropertyString("property_name"); |
Code Block | ||
---|---|---|
| ||
String[] values = getPropertyString("property_name").split(";"); |
Code Block | ||
---|---|---|
| ||
String[] col1_values = getPropertyString("col1_name").split(";");
String[] col2_values = getPropertyString("col2_name").split(";"); |
Code Block | ||
---|---|---|
| ||
Object columns = getProperty("property_name");
if (columns != null) {
for (Object colObj : (Object[]) columns) {
Map col = (Map) colObj;
String col1_value = (String) opt.get("col1_key");
String col2_value = (String) opt.get("col2_key");
}
} |
Code Block | ||
---|---|---|
| ||
import org.joget.plugin.base.PluginManager;
import org.joget.apps.app.service.AppUtil;
import org.joget.plugin.base.ExtDefaultPlugin;
Object element = getProperty("property_name");
if (element != null && element instanceof Map) {
Map elementMap = (Map) element;
String className = (String) elementMap.get("className");
Map<String, Object> properties = (Map<String, Object>) elementMap.get("properties");
//convert it to plugin
PluginManager pm = (PluginManager) AppUtil.getApplicationContext().getBean("pluginManager");
ExtDefaultPlugin plugin = (ExtDefaultPlugin) pm.getPlugin(className);
if (plugin != null) {
plugin.setProperties(properties);
}
} |
...