Versions Compared

Key

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

...

Mandatory Property

id

  • All Userview Menu Plugin must has this property appear in the Properties Options JSON. 
  • This is used by the system to store the dynamic generated UUID.
Code Block
    {
        name : 'id',
        label : 'ID',
        type : 'hidden'
    }

customId

  • All Userview Menu Plugin must has this property appear in the Properties Options JSON. 
  • This is used for admin user to key in a desired menu id.
Code Block
    {
        name : 'customId',
        label : '@@userview.datalistmenu.customId@@',
        type : 'textfield',
        regex_validation : '^[a-zA-Z0-9_]+$',
        validation_message : '@@userview.datalistmenu.invalidId@@'
    }

label

  • All Userview Menu Plugin must has this property appear in the Properties Options JSON. 
  • This is used for admin user to key in a display label for the menu.
Code Block
    {
        name : 'label',
        label : '@@userview.datalistmenu.label@@',
        type : 'textfield',
        required : 'True',
        value : 'List'
    }

Userview Menu Plugin Template Sample

Following is a sample menu template of a HTML Page menu element. It is constructed using FreeMaker syntax. This template will be used and returned by getRenderPage method.

Code Block
languagejava
    public String getRenderPage() {
        PluginManager pluginManager = (PluginManager) AppUtil.getApplicationContext().getBean("pluginManager");

        Map dataModel = new HashMap();
        dataModel.put("element", this);
    
        return pluginManager.getPluginFreeMarkerTemplate(dataModel, getClassName(), "/templates/htmlPageMenu.ftl", null);
    }
Code Block
languagexml
<div class="ui-html">
    ${element.properties.content!}
</div>

Explanations

    • There are no specify format need to follow.
    • Please take note that your html template need to disable all user action when it is in preview mode. You decide it is preview mode or not by following code:
"true".equals(getRequestParameterString("isPreview")

Tutorials

  • Not available right now

...