Versions Compared

Key

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

Table of Contents

Description

Thai

ลักษณะ

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

Code Sample

Thai

ตัวอย่างโค้ด

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

สคริปต์ต่อไปนี้ถูกใช้ในเมธอดของปลั๊กอินธีม Userview

Code Block
languagejava
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

Thai

กระบวนการ

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

Thai

วิธีที่ใช้เพื่อเรียกข้อมูลเทมเพลต HTML ของธีม userview

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

Thai

วิธีที่ใช้เพื่อเรียกข้อมูลเทมเพลต HTML ของธีม userview พร้อม i18n

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

Thai

วิธีที่ใช้ในการเรียกแม่แบบ HTML ของเมนู userview

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

Thai

วิธีที่ใช้ในการแปลงหน้า jsp เป็นเทมเพลต HTML