1

I need to add a Custom Field to Site create page, i went to Portal > Custom Fields > Site and added a custom field named "licence".

I followed this tutorial http://www.liferay.com/pt/community/wiki/-/wiki/Main/Custom+Fields+and+JSP+Hooks

I'm trying to access this field in details.jsp page. It's located at of tomcat-7.0.27\webapps\ROOT\html\portlet\sites_admin\site i tryed to do this:

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

but it's wrong. How can I access the Site custom field that i added??

Thanks!!

Update I solved like this

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

0 Answers0