1

我需要添加一个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"
/>
4

0 回答 0