...
Used to extend types of pages/UI elements available in Userview Builder.
Thai ใช้เพื่อขยายประเภทของหน้า / องค์ประกอบ UI ที่มีอยู่ใน Userview Builder
English A useable Userview Menu plugin must extends org.joget.apps.userview.model.UserviewMenu abstract class. Thai ปลั๊กอินเมนู Userview ที่ใช้งานได้จะต้องขยายคลาสนามธรรม org.joget.apps.userview.model.UserviewMenu
Abstract Class
Thai |
---|
ชั้นนามธรรม |
org.joget.apps.userview.model.UserviewMenu
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
Extended org.joget.plugin.base.ExtDefaultPlugin. Please refer to Plugin Base Abstract Class and Interface.
Thai ขยาย org.joget.plugin.base.ExtDefaultPlugin โปรดอ้างอิงถึง Plugin Base Abstract Class and Interface
Implemented org.joget.plugin.property.model.PropertyEditable. Please refer to Plugin Base Abstract Class and Interface.
Thai ดำเนินการ org.joget.plugin.property.model.PropertyEditable โปรดอ้างอิงถึง Plugin Base Abstract Class and Interface.
A base abstract class to develop a Userview Menu plugin.
Thai คลาสนามธรรมพื้นฐานในการพัฒนาปลั๊กอินเมนู Userview
Field Detail
Thai |
---|
รายละเอียดของฟิลด์ |
Constants
Thai |
---|
ค่าคงที่ |
REDIRECT_URL_PROPERTY
public static final java.lang.String REDIRECT_URL_PROPERTY = "userviewRedirectUrl";
Property key to set a url for redirection.
Thai |
---|
รหัสคุณสมบัติเพื่อตั้งค่า url สำหรับการเปลี่ยนเส้นทาง |
REDIRECT_PARENT_PROPERTY
public static final java.lang.String REDIRECT_PARENT_PROPERTY = "userviewRedirectParent";
Property key to set the redirection target to parent window. The property expecting "true" or "false" as value.
Thai |
---|
รหัสคุณสมบัติเพื่อกำหนดเป้าหมายการเปลี่ยนเส้นทางไปที่หน้าต่างหลัก สถานที่ให้บริการคาดหวังว่า "true" หรือ "false" เป็นค่า |
ALERT_MESSAGE_PROPERTY
public static final java.lang.String ALERT_MESSAGE_PROPERTY = "userviewAlertMessage";
Property key to set a alert message to show when a page loaded.
Thai |
---|
ปุ่มคุณสมบัติเพื่อตั้งค่าข้อความแจ้งเตือนให้แสดงเมื่อโหลดหน้าเว็บ |
Method Detail
Abstract Methods
...
Category to be displayed in Userview Builder palette
Thai |
---|
หมวดหมู่ที่จะแสดงในจานสี Userview Builder |
getIcon
public abstract java.lang.String getIcon()
Icon path to be displayed in Userview Builder palette
Thai |
---|
เส้นทางไอคอนที่จะแสดงในจานสีของ Userview Builder |
getRenderPage
public abstract java.lang.String getRenderPage()
Get render HTML template for UI
Thai |
---|
รับเทมเพลต HTML สำหรับ UI |
isHomePageSupported
public abstract boolean isHomePageSupported()
Used to determine this menu item can used as home page or not.
Thai |
---|
ใช้เพื่อกำหนดรายการเมนูนี้สามารถใช้เป็นโฮมเพจหรือไม่ |
getDecoratedMenu
public abstract java.lang.String getDecoratedMenu()
Get Decorated menu HTML for rendering.
Thai |
---|
รับเมนูตกแต่ง HTML สำหรับการแสดงผล |
Overridable Methods
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.
Thai |
---|
รับ html เมนูเพื่อแสดงผล มันจะเรียกเมธอด getDecoratedMenu เพื่อดึงเมนู HTML หากส่งคืนค่าว่างเปล่า HTML เมนูเริ่มต้นจะถูกสร้างขึ้นโดยยึดตามวิธี getURL และคุณสมบัติ "label" |
getJspPage
public java.lang.String getJspPage()
...
It is used to use the system predefined template for rendering. Options are as following:
Thai |
---|
รับพา ธ ของไฟล์ JSP เพื่อแสดงเทมเพลต HTML หากค่านี้ไม่ใช่ NULL ค่าที่ส่งคืนโดย getRenderPage จะถูกละเว้น มันถูกใช้เพื่อใช้แม่แบบที่กำหนดไว้ล่วงหน้าของระบบสำหรับการแสดงผล ตัวเลือกมีดังนี้: |
- userview/plugin/datalist.jsp
...
public java.lang.String getUrl()
Gets URL of this menu
Thai |
---|
รับ URL ของเมนูนี้ |
setUrl
public void setUrl(java.lang.String url)
Sets URL of this menu
Thai |
---|
ตั้งค่า URL ของเมนูนี้ |
getKey
public java.lang.String getKey()
Gets userview key of this menu
Thai |
---|
รับคีย์ userview ของเมนูนี้ |
setKey
public void setKey(java.lang.String key)
Sets userview key of this menu
Thai |
---|
ตั้งค่าคีย์วิวของเมนูนี้ |
getRequestParameters
public java.util.Map getRequestParameters()
Gets request parameters
Thai |
---|
รับพารามิเตอร์คำขอ |
setRequestParameters
public void setRequestParameters(java.util.Map requestParameters)
Sets request parameters
Thai |
---|
ตั้งค่าพารามิเตอร์คำขอ |
getRequestParameter
public java.lang.Object getRequestParameter(java.lang.String requestParameter)
Convenience method to get a parameter value
Thai |
---|
วิธีการความสะดวกในการรับค่าพารามิเตอร์ |
getRequestParameterString
...
Return Empty string instead of NULL.
Thai |
---|
วิธีการความสะดวกในการรับพารามิเตอร์ค่าสตริง ส่งคืนสตริงที่ว่างเปล่าแทน NULL |
getReadyJspPage
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.
Thai |
---|
ใช้ระบบเพื่อดึงหน้าไฟล์ JSP เพื่อหลีกเลี่ยง logic ที่จะทำงานอีกครั้ง มันจะเรียกวิธีการ getJspPage หนึ่งครั้งเพื่อเริ่มต้นค่า |
getReadyRenderPage
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.
Thai |
---|
ใช้ระบบเพื่อเรียกข้อมูลเทมเพลต HTML เพื่อหลีกเลี่ยง logic ที่จะทำงานอีกครั้ง มันจะเรียกวิธีการ getRenderPage หนึ่งครั้งเพื่อเริ่มต้นค่า |
getUserview
public org.joget.apps.userview.model.Userview getUserview()
Gets the userview which this menu is belongs to.
Thai |
---|
รับค่า userview ว่าเป็นส่วนใดของเมนูนี้ |
setUserview
public void setUserview(org.joget.apps.userview.model.Userview userview)
Sets the userview which this menu is belongs to.
Thai |
---|
ตั้งค่าความคิดเห็นที่เมนูนี้เป็นของ |
setRedirectUrl
public void setRedirectUrl(java.lang.String redirectUrl)
Set this property to force the userview to redirect to a specific URL.
Thai |
---|
ตั้งค่าคุณสมบัตินี้เพื่อบังคับให้ userview เปลี่ยนเส้นทางไปยัง URL ที่ระบุ |
setRedirectUrl
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.
Thai |
---|
ตั้งค่าคุณสมบัตินี้เพื่อบังคับให้ userview เปลี่ยนเส้นทางไปยัง URL ที่ระบุพร้อมตัวเลือกเพื่อเปลี่ยนเส้นทางในหน้าต่างหลัก |
setAlertMessage
public void setAlertMessage(java.lang.String message)
Set this property to display an alert message/prompt.
Thai |
---|
ตั้งค่าคุณสมบัตินี้เพื่อแสดงข้อความแจ้งเตือน / สิ่งเตือน |
Plugin Properties Options
Thai |
---|
ตัวเลือกคุณสมบัติปลั๊กอิน |
Please refer to Plugin Properties Options for more information.
Thai โปรดดู Plugin Properties Options สำหรับข้อมูลเพิ่มเติม
Mandatory Property
Thai |
---|
คุณสมบัติบังคับ |
id
All Userview Menu Plugin must has this property appear in the Properties Options JSON.
Thai ปลั๊กอินเมนู Userview ทั้งหมดต้องมีคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON
This is used by the system to store the dynamic generated UUID.
Thai สิ่งนี้ถูกใช้โดยระบบเพื่อเก็บ UUID ที่สร้างขึ้นแบบไดนามิก
Code Block |
---|
{ name : 'id', label : 'ID', type : 'hidden' } |
customId
All Userview Menu Plugin must has this property appear in the Properties Options JSON.
Thai ปลั๊กอินเมนู Userview ทั้งหมดต้องมีคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON
This is used for admin user to key in a desired menu id.
Thai สิ่งนี้ใช้สำหรับผู้ใช้ของผู้ดูแลระบบในการป้อนรหัสเมนูที่ต้องการ
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.
Thai ปลั๊กอินเมนู Userview ทั้งหมดต้องมีคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON
This is used for admin user to key in a display label for the menu.
Thai สิ่งนี้ใช้สำหรับผู้ใช้ที่เป็นผู้ดูแลระบบเพื่อพิมพ์รหัสป้ายกำกับสำหรับเมนู
Code Block |
---|
{ name : 'label', label : '@@userview.datalistmenu.label@@', type : 'textfield', required : 'True', value : 'List' } |
Userview Menu Plugin Template Sample
Thai |
---|
ตัวอย่างเทมเพลตปลั๊กอินเมนู Userview |
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.
Thai |
---|
ต่อไปนี้เป็นแม่แบบเมนูตัวอย่างขององค์ประกอบ HTML Page menu มันถูกสร้างขึ้นโดยใช้ไวยากรณ์ FreeMaker เทมเพลตนี้จะถูกใช้และส่งคืนโดยเมธอด getRenderPage |
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> |
Explanations
There are no specify format need to follow.
Thai ไม่จำเป็นต้องระบุรูปแบบที่ต้องการ
- 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")
Thai |
---|
โปรดทราบว่าเทมเพลต html ของคุณจำเป็นต้องปิดการทำงานของผู้ใช้ทั้งหมดเมื่ออยู่ในโหมดดูตัวอย่าง คุณตัดสินใจว่าเป็นโหมดดูตัวอย่างหรือไม่โดยใช้รหัสต่อไปนี้: "true" .equals (getRequestParameterString ( "isPreview") |
Tutorials
Thai |
---|
สอน |
Related Community Plugins
Thai |
---|
ปลั๊กอินที่เกี่ยวข้อง |
- List Menu
org.joget.apps.userview.lib.DataListMenu (wflow-core) - Form Menu
org.joget.apps.userview.lib.FormMenu (wflow-core) - HTML Page
org.joget.apps.userview.lib.HtmlPage (wflow-core) - Inbox
org.joget.apps.userview.lib.InboxMenu (wflow-core) - Link
org.joget.apps.userview.lib.Link (wflow-core) - Run Process
org.joget.apps.userview.lib.RunProcess (wflow-core)