Versions Compared

Key

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

...

  • Plugin Properties Options allow a plugin to gather configuration data from a plugin user.
  • Plugin Properties Options should be returned in the abstract ตัวเลือกคุณสมบัติปลั๊กอินควรส่งคืนใน abstract method "getPropertyOptions" of each pluginของแต่ละปลั๊กอิน.

โครงสร้าง 

  • Plugin Properties Options are in ตัวเลือกคุณสมบัติปลั๊กอินอยู่ในรูปแบบ JSON format.
  • Plugin Properties Options is an array of Properties Page object
  • A Properties Page object has 2 mandatory attributes called "title" and "properties". It also has 2 optional attributes called "validators" and "buttons".

...

กล่องทำเครื่องหมาย (Check Box)

เครื่องมือแก้ไขโค้ด (Code Editor)

  • type ปรเภท : 'CodeEditorแก้ไขโค้ด'
  • mode โหมด : Optional, used for specified highlight mode. Default to 'text', available values are 'text', 'java', 'html', 'javascript', 'css', 'json', 'sql' and 'xml'.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.

...

  • Combine Grid is used to migrate 2 or more single value property fields from old version plugin (etc Text Field & Select Box) to multi values field in Grid View.
  • Combine Grid does not support 'value' attribute.
  • type ประเภท : 'GridCombine'
  • columns คอลัมน์ : A JSON array of 'column' JSON objects which has 2 mandatory 'key' & 'label' attributes and 2 optional 'required' & 'options' attribute. 
    • key คีย์ : Identifier of this column. This value need to be same with the field 'name' that need to migrate from single value field to multiple value field.
    • label : Label of the column header
    • options ตัวเลือก : Optional, an array of JSON object with 'value' and 'label' attributes. A column with 'options' attribute will display the input field as select box.
    • required : Optional, 'true' or 'false'. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
    Code Block
    languagejs
    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%'}
        ]}
    ]
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Combine Grid Field on how to use the value of this field type in the plugin code.

Element Select Box

  • type ประเภท : 'ElementSelect'
  • url : A URL which will return Properties Options JSON object of the selected element. Built-in URL is "[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions" which will return the Properties Options JSON object of a plugin.
  • keep_value_on_change : Optional, 'true' or 'false'. Used to decide whether to keep the configuration of the properties options of previous selected element when a new element is selected.
  • Refer to อ้างอิงถึง Option Field Attributes for extra attributes.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Usually used for select a plugin and configure the properties of the selected plugin.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - ElementSelectBox on how to use the value of this field type in the plugin code.

ไฟล์

  • type ประเภท : 'fileไฟล์',
  • appPath : '[APP_PATH]',
  • allowInput : Optional, 'true' or 'false'. Set to 'true' to allow custom link.
  • isPublic : Optional, 'true' or 'false'. Set to 'true' to auto set the permission to access by anonymous.
  • allowType : Optional, a string of file extension seperated (;). Example: ".jpeg;.jpg;.gif;.png".
  • maxSize ขนาดสูงสุด : Optional, integer value in string format. In kB.
  • Refer to อ้างอิงถึง Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.

Fixed Row Grid

  • type ประเภท : 'GridFixedRow'
  • columns คอลัมน์ : A JSON array of 'column' JSON objects which has 2 mandatory 'key' & 'label' attributes and 2 optional 'required' & 'options' attribute. 
    • key คีย์ : Identifier of this column.
    • label : Label of the column header
    • options ตัวเลือก : Optional, an array of JSON object with 'value' and 'label' attributes. A column with 'options' attribute will display the input field as select box.
    • required : Optional, 'true' or 'false'. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
  • rows แถว : A JSON array of 'row' JSON Object with 'label' attribute and an optional 'required' attribute. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
    • label : Label of a row. Used to populate in the first column or every row.
    • required : Optional, 'true' or 'false'. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
  • 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
languagejs
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'}
]

Grid

  • type ประเภท : 'Grid'
  • columnsคอลัมน์ : A JSON array of 'column' JSON objects which has 2 mandatory 'key' & 'label' attributes and 2 optional 'required' & 'options' attribute. 
    • key คีย์ : Identifier of this column.
    • label : Label of the column header
    • optionsตัวเลือก : Optional, an array of JSON object with 'value' and 'label' attributes. A column with 'options' attribute will display the input field as select box.
    • required : Optional, 'true' or 'false'. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
  • 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
    languagejs
    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'}
    ]
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Grid Field on how to use the value of this field type in the plugin code.

...

ส่วนหัว

  • type ประเภท : 'Headerส่วนหัว'
  • Header does not support 'value' and 'required' attributes.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • This field type is used for separate the fields into different groups. It is not use for capture data. 

ฟิลด์ซ่อน (Hidden Field)

HTML Editor

...

ภาพ

  • typeประเภท : 'file',
  • appPath : '[APP_PATH]',
  • allowInput : Optional, 'true' or 'false'. Set to 'true' to allow custom link.
  • isPublic : Optional, 'true' or 'false'. Set to 'true' to auto set the permission to access by anonymous.
  • allowType : Optional, a string of file extension seperated (;). Example: ".jpeg;.jpg;.gif;.png".
  • maxSize ขนาดสูงสุด : Optional, integer value in string format. In kB.
  • imageSize ขนาดภาพ : Optional, can be integer value in string format or a css expression. Example: '50' or "width:100px;height:70px;".
  • Refer to อ้างอิงถึง Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.

Label

Multi Select Box

ฟิลด์รหัสผ่าน (Password Field)

  • type ประเภท : 'Passwordรหัสผ่าน'
  • size ขนาด : Optional, integer value in string format. Default to '50'. Used to control the length of the input field.
  • maxlength ความยาวสูงสุด :  Optional, integer value in string format. Used to limit the number of characters can be enter in the input field. 
  • Refer to อ้างอิงถึง Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.

...

ปุ่มตัวเลือก (Radio Button)

ฟิลด์ข้อความแบบอ่านอย่างเดียว (Readonly Text Field)

กล่องตัวเลือก (Select Box)

พื้นที่ข้อความ (Text Area)

  • type ประเภท : 'TextAreaพื้นที่ข้อความ'
  • rows แถว : Optional, integer value in string format. Default to '5'. Used to control the height of the input field.
  • cols คอลัมน์ : Optional, integer value in string format. Default to '50'. Used to control the length of the input field.
  • Refer to อ้างอิงถึง Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.

...

ฟิลด์ข้อความ (Text Field)

  • type ประเภท : 'TextFieldฟิลด์ข้อความ'
  • size ขนาด : Optional, integer value in string format. Default to '50'. Used to control the length of the input field.
  • maxlength ความยาวสูงสุด :  Optional, integer value in string format. Used to limit the number of characters can be enter in the input field. 
  • Refer to อ้างอิงถึง Regular Express (Regex) Validation Attributes for extra attributes to do validation using regex.
  • Refer to อ้างอิงถึง Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
  • Refer to อ้างอิงถึง Retrieve Properties Value in Plugin - Single Value Field on how to use the value of this field type in the plugin code.

...