自定义liferay钩子自定义字段

时间:2013-08-11 04:22:00

标签: liferay portlet liferay-6 custom-fields

我需要向网站创建页面添加Custom Field,我转到Portal > Custom Fields > Site并添加了名为“licence”的自定义字段。

我遵循了本教程http://www.liferay.com/pt/community/wiki/-/wiki/Main/Custom+Fields+and+JSP+Hooks

我正在尝试访问details.jsp页面中的此字段。它位于tomcat-7.0.27 \ webapps \ ROOT \ html \ portlet \ sites_admin \ site我尝试这样做:

<liferay-ui:custom-attribute
        label="Licence"
        className="<%= Site.class.getName() %>"
        classPK="<%= 0 %>"
        editable="<%= true %>"
        name="licence"
    />

但这是错的。如何访问我添加的网站自定义字段?

谢谢!

更新 我这样解决了

    <liferay-ui:custom-attribute        
    className="<%= Group.class.getName() %>"
    classPK="<%= (liveGroup != null) ? liveGroup.getGroupId() : 0 %>"
    editable="<%= true %>"
    label="<%= true %>"
    name="tipo-licenca"
/>

0 个答案:

没有答案
相关问题