Showing posts with label jsp. Show all posts
Showing posts with label jsp. Show all posts

Wednesday, December 3, 2014

Displaying Custom Fields In Liferay


Displaying Custom Fields In Liferay




displaying custom field attribute in jsp for "ssn"
========================================================

<liferay-ui:custom-attribute

 className="<%= User.class.getName() %>"

 classPK="<%= selUser != null ? selUser.getUserId() : 0 %>"

editable="<%= true %>"

name="ssn" label="true"/>

here name is "ssn" it should be present in language.properties file (key ,name value pair)




Getting the value in controller side for "ssn"
=====================================================

 String ssnValue = (String)PortalUtil.getExpandoValue(actionRequest, "ExpandoAttribute--" + "ssn" + "--", ExpandoColumnConstants.STRING, ExpandoColumnConstants.PROPERTY_DISPLAY_TYPE_TEXT_BOX);