自定义liferay钩子自定义字段
我需要添加一个自定义liferay钩子自定义字段,liferay,portlet,liferay-6,custom-fields,Liferay,Portlet,Liferay 6,Custom Fields,我需要添加一个自定义字段到站点创建页面,我转到门户>自定义字段>站点,添加了一个名为“许可证”的自定义字段 我遵循了这个教程 我试图在details.jsp页面中访问此字段。它位于tomcat-7.0.27\webapps\ROOT\html\portlet\sites\u admin\site的目录下,我尝试这样做: <liferay-ui:custom-attribute label="Licence" className="<%= Site.cl
自定义字段
到站点创建页面,我转到门户>自定义字段>站点
,添加了一个名为“许可证
”的自定义字段
我遵循了这个教程
我试图在details.jsp
页面中访问此字段。它位于tomcat-7.0.27\webapps\ROOT\html\portlet\sites\u 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"
/>
它有什么问题?它是否不起作用或有任何例外?请提供更多关于输出的详细信息。请为classPK字段提供站点的groupId,我解决了问题,@FelixChristy它不起作用,我使用了错误的类名。@PankajKathiriya,tks获取提示。