Description

ลักษณะ

Code Sample

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

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

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

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

วิธีที่ใช้เพื่อเรียกข้อมูลเทมเพลต 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

วิธีที่ใช้เพื่อเรียกข้อมูลเทมเพลต 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

วิธีที่ใช้ในการเรียกแม่แบบ 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

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