Usages

ตามธรรมเนียม

Abstract Class

ชั้นนามธรรม


org.joget.apps.userview.model.UserviewMenu

Field Detail

รายละเอียดของฟิลด์


Constants

ค่าคงที่

REDIRECT_URL_PROPERTY
public static final java.lang.String REDIRECT_URL_PROPERTY = "userviewRedirectUrl";

Property key to set a url for redirection.

รหัสคุณสมบัติเพื่อตั้งค่า 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.

รหัสคุณสมบัติเพื่อกำหนดเป้าหมายการเปลี่ยนเส้นทางไปที่หน้าต่างหลัก สถานที่ให้บริการคาดหวังว่า "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.

ปุ่มคุณสมบัติเพื่อตั้งค่าข้อความแจ้งเตือนให้แสดงเมื่อโหลดหน้าเว็บ

Method Detail

Abstract Methods
getCategory
public abstract java.lang.String getCategory()

Category to be displayed in Userview Builder palette 

หมวดหมู่ที่จะแสดงในจานสี Userview Builder

getIcon
public abstract java.lang.String getIcon()

Icon path to be displayed in Userview Builder palette

เส้นทางไอคอนที่จะแสดงในจานสีของ Userview Builder

getRenderPage
public abstract java.lang.String getRenderPage()

Get render HTML template for UI

รับเทมเพลต HTML สำหรับ UI

isHomePageSupported
public abstract boolean isHomePageSupported()

Used to determine this menu item can used as home page or not.

ใช้เพื่อกำหนดรายการเมนูนี้สามารถใช้เป็นโฮมเพจหรือไม่

getDecoratedMenu
public abstract java.lang.String getDecoratedMenu()

Get Decorated menu HTML for rendering.

รับเมนูตกแต่ง HTML สำหรับการแสดงผล

Overridable Methods
getMenu
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.

รับ html เมนูเพื่อแสดงผล มันจะเรียกเมธอด getDecoratedMenu เพื่อดึงเมนู HTML หากส่งคืนค่าว่างเปล่า HTML เมนูเริ่มต้นจะถูกสร้างขึ้นโดยยึดตามวิธี getURL และคุณสมบัติ "label"

getJspPage
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:

รับพา ธ ของไฟล์ JSP เพื่อแสดงเทมเพลต HTML หากค่านี้ไม่ใช่ NULL ค่าที่ส่งคืนโดย getRenderPage จะถูกละเว้น มันถูกใช้เพื่อใช้แม่แบบที่กำหนดไว้ล่วงหน้าของระบบสำหรับการแสดงผล ตัวเลือกมีดังนี้:

- userview/plugin/datalist.jsp

- userview/plugin/form.jsp

- userview/plugin/runProcess.jsp

- userview/plugin/unauthorized.jsp

Utility Methods
getUrl
public java.lang.String getUrl()

Gets URL of this menu

รับ URL ของเมนูนี้

setUrl
public void setUrl(java.lang.String url)

Sets URL of this menu

ตั้งค่า URL ของเมนูนี้

getKey
public java.lang.String getKey()

Gets userview key of this menu

รับคีย์ userview ของเมนูนี้

setKey
public void setKey(java.lang.String key)

Sets userview key of this menu

ตั้งค่าคีย์วิวของเมนูนี้

getRequestParameters
public java.util.Map getRequestParameters()

Gets request parameters

รับพารามิเตอร์คำขอ

setRequestParameters
public void setRequestParameters(java.util.Map requestParameters)

Sets request parameters

ตั้งค่าพารามิเตอร์คำขอ

getRequestParameter
public java.lang.Object getRequestParameter(java.lang.String requestParameter)

Convenience method to get a parameter value

วิธีการความสะดวกในการรับค่าพารามิเตอร์

getRequestParameterString
public java.lang.String getRequestParameterString(java.lang.String requestParameter)

Convenience method to get a parameter String value.

Return Empty string instead of NULL.

วิธีการความสะดวกในการรับพารามิเตอร์ค่าสตริง

ส่งคืนสตริงที่ว่างเปล่าแทน 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.

ใช้ระบบเพื่อดึงหน้าไฟล์ 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.

ใช้ระบบเพื่อเรียกข้อมูลเทมเพลต HTML เพื่อหลีกเลี่ยง logic ที่จะทำงานอีกครั้ง มันจะเรียกวิธีการ getRenderPage หนึ่งครั้งเพื่อเริ่มต้นค่า

getUserview
public org.joget.apps.userview.model.Userview getUserview()

Gets the userview which this menu is belongs to.

รับค่า userview ว่าเป็นส่วนใดของเมนูนี้

setUserview
public void setUserview(org.joget.apps.userview.model.Userview userview)

Sets the userview which this menu is belongs to.

ตั้งค่าความคิดเห็นที่เมนูนี้เป็นของ

setRedirectUrl
public void setRedirectUrl(java.lang.String redirectUrl)

Set this property to force the userview to redirect to a specific URL.

ตั้งค่าคุณสมบัตินี้เพื่อบังคับให้ 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.

ตั้งค่าคุณสมบัตินี้เพื่อบังคับให้ userview เปลี่ยนเส้นทางไปยัง URL ที่ระบุพร้อมตัวเลือกเพื่อเปลี่ยนเส้นทางในหน้าต่างหลัก

setAlertMessage
public void setAlertMessage(java.lang.String message)

Set this property to display an alert message/prompt.

ตั้งค่าคุณสมบัตินี้เพื่อแสดงข้อความแจ้งเตือน / สิ่งเตือน

Plugin Properties Options

ตัวเลือกคุณสมบัติปลั๊กอิน

Mandatory Property

คุณสมบัติบังคับ


id

    {
        name : 'id',
        label : 'ID',
        type : 'hidden'
    }

customId

    {
        name : 'customId',
        label : '@@userview.datalistmenu.customId@@',
        type : 'textfield',
        regex_validation : '^[a-zA-Z0-9_]+$',
        validation_message : '@@userview.datalistmenu.invalidId@@'
    }

label

    {
        name : 'label',
        label : '@@userview.datalistmenu.label@@',
        type : 'textfield',
        required : 'True',
        value : 'List'
    }

Userview Menu Plugin Template Sample

ตัวอย่างเทมเพลตปลั๊กอินเมนู 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.

ต่อไปนี้เป็นแม่แบบเมนูตัวอย่างขององค์ประกอบ HTML Page menu มันถูกสร้างขึ้นโดยใช้ไวยากรณ์ FreeMaker เทมเพลตนี้จะถูกใช้และส่งคืนโดยเมธอด getRenderPage

    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);
    }
<div class="ui-html">
    ${element.properties.content!}
</div>

Explanations

"true".equals(getRequestParameterString("isPreview")

โปรดทราบว่าเทมเพลต html ของคุณจำเป็นต้องปิดการทำงานของผู้ใช้ทั้งหมดเมื่ออยู่ในโหมดดูตัวอย่าง คุณตัดสินใจว่าเป็นโหมดดูตัวอย่างหรือไม่โดยใช้รหัสต่อไปนี้: "true" .equals (getRequestParameterString ( "isPreview")


Tutorials

สอน

Related Community Plugins

ปลั๊กอินที่เกี่ยวข้อง