Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
...
public static final java.lang.String REDIRECT_URL_PROPERTY = "userviewRedirectUrl";
...
public static final java.lang.String REDIRECT_PARENT_PROPERTY = "userviewRedirectParent";
...
public static final java.lang.String ALERT_MESSAGE_PROPERTY = "userviewAlertMessage";
...
public abstract java.lang.String getCategory()
Category to be displayed in Userview Builder palette
public abstract java.lang.String getIcon()
Icon path to be displayed in Userview Builder palette
public abstract java.lang.String getRenderPage()
Get render HTML template for UI
public abstract boolean isHomePageSupported()
Used to determine this menu item can used as home page or not.
public abstract java.lang.String getDecoratedMenu()
Get Decorated menu HTML for rendering.
public java.lang.String getMenu()
Get menu html for rendering. It will call getDecoratedMenu method to retrieve the menu HTML. If empty value is return, a default menu HTML will be generated based on getURL method and "label" property.
public java.lang.String getJspPage()
Get path of JSP file to render the HTML template. If this value is not NULL, value returned by getRenderPage will be ignored.
It is used to use the system predefined template for rendering. Options are as following:
- userview/plugin/datalist.jsp
- userview/plugin/form.jsp
- userview/plugin/runProcess.jsp
- userview/plugin/unauthorized.jsp
public java.lang.String getUrl()
Gets URL of this menu
public void setUrl(java.lang.String url)
Sets URL of this menu
public java.lang.String getKey()
Gets userview key of this menu
public void setKey(java.lang.String key)
Sets userview key of this menu
public java.util.Map getRequestParameters()
...
Return Empty string instead of NULL.
public java.lang.String getReadyJspPage()
Used by the system to retrieve the JSP file page to avoid the logic to run again. It will called the getJspPage method once to initial the value.
public java.lang.String getReadyRenderPage()
Used by the system to retrieve the HTML template to avoid the logic to run again. It will called the getRenderPage method once to initial the value.
public org.joget.apps.userview.model.Userview getUserview()
Gets the userview which this menu is belongs to.
public void setUserview(org.joget.apps.userview.model.Userview userview)
Sets the userview which this menu is belongs to.
public void setRedirectUrl(java.lang.String redirectUrl)
Set this property to force the userview to redirect to a specific URL.
public void setRedirectUrl(java.lang.String redirectUrl, boolean redirectToParent)
Set this property to force the userview to redirect to a specific URL with option to redirect in the parent window.
public void setAlertMessage(java.lang.String message)
Set this property to display an alert message/prompt.
Code Block |
---|
{
name : 'id',
label : 'ID',
type : 'hidden'
} |
Code Block |
---|
{
name : 'customId',
label : '@@userview.datalistmenu.customId@@',
type : 'textfield',
regex_validation : '^[a-zA-Z0-9_]+$',
validation_message : '@@userview.datalistmenu.invalidId@@'
} |
Code Block |
---|
{
name : 'label',
label : '@@userview.datalistmenu.label@@',
type : 'textfield',
required : 'True',
value : 'List'
} |
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
<div class="ui-html">
${element.properties.content!}
</div> |
"true".equals(getRequestParameterString("isPreview")