Table of Contents | ||
---|---|---|
|
Usage
Thai |
---|
การใช้ |
English Plugin Properties Options allow a plugin to gather configuration data from a plugin user. Thai ตัวเลือกคุณสมบัติปลั๊กอินอนุญาตให้ปลั๊กอินรวบรวมข้อมูลการกำหนดค่าจากผู้ใช้ปลั๊กอิน
Plugin Properties Options should be returned in the abstract method "getPropertyOptions" of each plugin.
Thai ตัวเลือกคุณสมบัติปลั๊กอินควรส่งคืนในเมธอด abstract "getPropertyOptions" ของแต่ละปลั๊กอิน
...
type : 'Readonly'
Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
Thai อ้างถึง Dependency Field Attributes สำหรับแอททริบิวพิเศษที่ต้องแสดง / ซ่อนฟิลด์นี้ตามค่าฟิลด์อื่น
Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Thai อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field เกี่ยวกับวิธีใช้ค่าของฟิลด์นี้พิมพ์ในรหัสปลั๊กอิน
...
Repeater (New)
Thai |
---|
เลือกได้หลายแบบในส่วนต่อประสานกริด (ใหม่) |
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This is a new feature in Joget DX.
|
type : 'Repeater'
fields : A JSON array of 'fields' JSON objects which can support any properties field types and its attributes.
Refer to Field Types for the attributes of the fields.
Code Block language js fields : [ {name : 'value', label : 'Value', required: 'true', type: 'checkbox', options: [{ value: 'true', label: ''}]}, {name : 'label', label : 'Label', required: 'true', type: 'textfield'} ]
Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
Thai อ้างถึง Dependency Field Attributes สำหรับแอททริบิวพิเศษที่ต้องแสดง / ซ่อนฟิลด์นี้ตามค่าฟิลด์อื่น
Refer to Retrieve Properties Value in Plugin - Repeater Field on how to use the value of this field type in the plugin code.
Thai อ้างอิงถึง Retrieve Properties Value in Plugin - Repeater Field เกี่ยวกับวิธีใช้ค่าของฟิลด์ชนิดนี้ในรหัสปลั๊กอิน
Multiselect in Grid Interface (New)
Thai |
---|
เลือกได้หลายแบบในส่วนต่อประสานกริด (ใหม่) |
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This is a new feature in Joget DX.
|
type : 'elementmultiselect'
Refer to Option Field Attributes for extra attributes.
Thai type : 'elementmultiselect'
Refer to Option Field Attributes for extra attributes.
Thai อ้างถึง Option Field Attributes สำหรับแอตทริบิวต์เพิ่มเติม
...
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This is a new feature in Joget DX.
|
type : 'elementmultiselectnumber'
Select Box
Thai |
---|
เลือกกล่อง |
type : 'SelectBox'
Refer to Option Field Attributes for extra attributes.
Thai อ้างถึง Option Field Attributes สำหรับแอตทริบิวต์เพิ่มเติม
Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
Thai อ้างถึง Dependency Field Attributes สำหรับแอททริบิวพิเศษที่ต้องแสดง / ซ่อนฟิลด์นี้ตามค่าฟิลด์อื่น
Refer to Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.
Thai อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field เกี่ยวกับวิธีใช้ค่าของฟิลด์นี้พิมพ์ในรหัสปลั๊กอิน
...
The following attributes are designed for Auto Complete, Password Field, Text Area and Text Field.
Thai คุณลักษณะต่อไปนี้ได้รับการออกแบบมาสำหรับ Auto Complete, Password Field, Text Area และ Text Field
regex_validation : Optional, regular express in string format.
validation_message : Optional, error message to display when validation failurevalidation failure.
Code Block | ||
---|---|---|
| ||
{
regex_validation : '^[a-zA-Z0-9_]+$',
validation_message : 'Invalid ID!!'
} |
Javascript Function Validation Attributes
The following attributes are designed for all field type.
js_validation : Optional, Javascript function name in string format or a function.
Code Block | ||
---|---|---|
| ||
{ regexjs_validation : '^[a-zA-Z0-9_]+$',functionName' } |
Code Block | ||
---|---|---|
| ||
{ js_validation_message : 'Invalid ID!!' function(fieldName, fieldValue) { if (fieldValue.indexOf("#") > 0) { return "Error! Value contains #"; } return null; } } |
Dependency Field Attributes
...
The following attributes are available for all field types.
Thai แอททริบิวต่อไปนี้ใช้ได้กับฟิลด์ทุกประเภท
These attributes are used to show/hide a field based on the value of another field.
Thai แอ็ตทริบิวต์เหล่านี้ใช้เพื่อแสดง / ซ่อนฟิลด์ตามค่าของฟิลด์อื่น
The value of a field hidden by these attributes will be ignore during save.
Thai ค่าของฟิลด์ที่ถูกซ่อนโดยแอตทริบิวต์เหล่านี้จะถูกละเว้นในระหว่างการบันทึก
control_field : Optional, 'name' of another field used to control the show/hide of current field.
control_value : Optional, value or regular expression (regex) in string format. This value need to match the value of the controlling field in order to make the field visible.
control_use_regex : Optional, 'true' or 'false'. Default to 'false'. Set to 'true' to use regular expression (regex) in matching the value.
Code Block | ||
---|---|---|
| ||
{ control_field: 'chartType', control_value: 'bar|xy|area|bubble|line|candlestick|ohlc', control_use_regex: 'true', } |
...
All the plugin must extends the "org.joget.plugin.base.ExtDefaultPlugin" abstract class. We can use the "Object getProperty(String)" and "String getPropertyString(String)" method to retrieve the configured properties.
Thai ปลั๊กอินทั้งหมดจะต้องขยายคลาสนามธรรม "org.joget.plugin.base.ExtDefaultPlugin" เราสามารถใช้วิธี "Object getProperty (String)" และ "String getPropertyString (String)" วิธีการเพื่อดึงคุณสมบัติที่กำหนดค่าไว้
Single Value Field
(String)" and "String getPropertyString(String)" method to retrieve the configured properties.
Thai ปลั๊กอินทั้งหมดจะต้องขยายคลาสนามธรรม "org.joget.plugin.base.ExtDefaultPlugin" เราสามารถใช้วิธี "Object getProperty (String)" และ "String getPropertyString (String)" วิธีการเพื่อดึงคุณสมบัติที่กำหนดค่าไว้
Single Value Field
Thai |
---|
เขตข้อมูลค่าเดียว |
Code Block | ||
---|---|---|
| ||
String value = getPropertyString("property_name"); |
Multi Values Field
Thai |
---|
ฟิลด์ค่าหลายค่า |
Code Block | ||
---|---|---|
| ||
String[] values = getPropertyString("property_name").split(";"); |
Combine Grid Field
Thai |
---|
รวมเขตข้อมูลกริด |
Thai |
เขตข้อมูลค่าเดียว |
Code Block | ||
---|---|---|
| ||
String valueString[] col1_values = getPropertyString("col1_name").split(";"); String[] col2_values = getPropertyString("propertycol2_name").split(";"); |
...
Grid Field
Thai |
---|
ฟิลด์ค่าหลายค่าฟิลด์กริด |
Code Block | ||
---|---|---|
| ||
String[]Object valuescolumns = getPropertyStringgetProperty("property_name").split(";"); |
Combine Grid Field
Thai |
---|
รวมเขตข้อมูลกริด |
Code Block | ||
---|---|---|
| ||
String[] col1_values = getPropertyString("col1_name").split(";");
String[] col2_values = getPropertyString("col2_name").split(";"); |
Grid Field
Thai |
---|
ฟิลด์กริด |
);
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");
}
} |
Repeater Field
Code Block | ||
---|---|---|
| ||
Object columnsfields = getProperty("property_name"); if (columnsfields != null) { for (Object colObjfieldObj : (Object[]) columnsfields) { Map colfield = (Map) colObjfieldObj; String col1field1_value = (String) optfield.get("col1field1_key"); String col2field2_value = (String) optfield.get("col2field2_key"); } } |
Element Select Box
...