簡體   English   中英

如何獲取Liferay自定義頁面屬性列表?

[英]How to get Liferay custom page attribute list?

我已經在Liferay中Page實體創建了自定義字段,並嘗試使用custom-attribute-list在頁面Details中獲取我的自定義字段custom-attribute-list

<% 
   Group liveGroup = (Group)request.getAttribute("site.liveGroup"); 
%>
<liferay-ui:custom-attribute-list
    className="<%= Group.class.getName() %>"
    classPK="<%= (liveGroup != null) ? liveGroup.getGroupId() : 0 %>"
    editable="<%= true %>"
    label="<%= true %>"             
/>

但是我得到了站點屬性列表。 我對getAttribute("page.liveGroup")但無法正常工作。 缺少了什么? 如何獲取頁面實體的自定義字段列表?

謝謝。

Liferay頁面不是Group類型,而是Layout類型。 您應該使用Layout.class.getName()和相關的classPK

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM