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

Compare with Current View Page History

« Previous Version 2 Next »

Take note of the "Post Processing Tool" attribute in a form builder's properties. We can see that it is listing down a list of Process Tool plugin for app desginer to choose.

We can trace this behavior to the property definition file "form.json" - https://github.com/jogetworkflow/jw-community/blob/6.0-SNAPSHOT/wflow-core/src/main/resources/properties/form/form.json#L81

This is the excerpt of the file that is responsible to generate such dropdown selection.

form.json
            {
                name:	'postProcessor',
                label:'@@form.form.postProcessor@@',
                type:'elementselect',
                options_ajax:'[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.plugin.base.ApplicationPlugin',
                url:'[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions',
                default_property_values_url: '[CONTEXT_PATH]/web/property/json[APP_PATH]/getDefaultProperties'
            }

Explanations on the code above

Line 4 - Attribute "type" with the value set to "elementselect" is important to tell the property editor on how to handle the selection. A new tab will be created automatically upon a selection made.

Line 5 - Attribute "options_ajax" with the service URL set is responsible to load all the plugin tied to "org.joget.plugin.base.ApplicationPlugin" (Process Tool) into the selection. You may change the value to load the appropriate type of plugin you want.

[CONTEXT_PATH] is a special variable that will be replaced automatically at runtime with the Joget web app context information. (e.g. http://localhost:8080/jw)

Line 6 - With the value in Line 4 set, the property editor will make a call to this URL, passing along the selection made. (e.g. http://localhost:8080/jw/web/property/json/expenseclaim/1/getPropertyOptions?value=org.joget.apps.app.lib.EmailTool)

[CONTEXT_PATH] is a special variable that will be replaced automatically at runtime with the Joget webapp context information. (e.g. http://localhost:8080/jw)

[APP_PATH] is a special variable that will be replaced automatically at runtime with the Joget App context information. (e.g. /expenseclaim/1)

 

  • No labels