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

Compare with Current View Page History

« Previous Version 2 Current »

Description

  • org.joget.apps.userview.service.UserviewUtil
  • Under wflow-core module
  • Utility methods used by userview for rendering

Code Sample

The following script is used in a method of a Userview Theme plugin

import java.util.Map;
import java.util.HashMap;
import org.joget.apps.userview.service.UserviewUtil;
 
//following script is used in a method of userview theme
Map data = new HashMap();
data.put("theme", this);
data.put("message", "hello world!!");
String html = UserviewUtil.getTemplate(this, data, "/templates/userview/test.ftl");

Methods

getTemplate
public static java.lang.String getTemplate(org.joget.apps.userview.model.UserviewTheme theme, java.util.Map data, java.lang.String templatePath)

Method used to retrieve HTML template of an userview theme

getTemplate
public static java.lang.String getTemplate(org.joget.apps.userview.model.UserviewTheme theme, java.util.Map data, java.lang.String templatePath, java.lang.String translationPath)

Method used to retrieve HTML template of an userview theme with i18n supported

getUserviewMenuHtml
public static java.lang.String getUserviewMenuHtml(org.joget.apps.userview.model.UserviewMenu menu) throws java.lang.RuntimeException

Method used to retrieve HTML template of an userview menu

renderJspAsString
public static java.lang.String renderJspAsString(java.lang.String viewName, java.util.Map<java.lang.String, java.lang.Object> modelMap)

Method used to convert a jsp page as HTML template

  • No labels