Versions Compared

Key

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

Table of Contents

大多数情况下,Joget提供的插件配置项属性已足够使用,本文档是对未写到的部分进行补充。

1. 引入捷得加载绑定器

Code Block
{
    name : 'optionsBinder',
    label : '@@form.radio.chooseOptionsBinder@@',
    type : 'elementselect',
    options_ajax : '[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadOptionsBinder',
    url : '[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions'
}

2. 引入捷得验证器

Code Block
{
    name : 'validator',
    label : '@@form.radio.validator@@',
    type : 'elementselect',
    options_ajax : '[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormValidator',
    url : '[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions'
}

3. 引入当前表单设计的所有字段

Code Block
{
    name : 'controlField',
    label : '@@form.radio.controlField@@',
    type : 'selectbox',
    options_callback : 'FormBuilder.getFieldOptions'
}


Info

多选可以把type修改为 MultiSelect

4. 引入表单选择和字段选择配置

Code Block
{
    "name" : "formDefId",
    "label" : "@@app.jsontool.formId@@",
    "type" : "selectbox",
    "options_ajax" : "[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options"
},
{
    "name" : "fieldMapping",
    "label" : "@@app.jsontool.fieldMapping@@",
    "type" : "grid",
    "columns" : [{
        "key" : "field",
        "label" : "@@app.jsontool.fieldName@@",
        "options_ajax_on_change" : "formDefId",
        "options_ajax" : "[CONTEXT_PATH]/web/json/console/app[APP_PATH]/form/columns/options"
    },
    {
        "key" : "outputvariable",
        "label" : "@@app.simpletfai.variableName@@"
    }]
}


Info
fieldMapping 默认可以修改为 selectbox , 注意使用 options_ajax 即可;
options_ajax_on_change : 'formDefId:formId', 使用这样的方式可以手动传输 json 配置项的 name(尽管name 不为 formDefId).


5. 更多待补充