My Liferay entity Person
has a <column name="mother" type="long" />
which points to the primary key of another instance of Person
. This long shows up as a number in the SearchContainer table I created:
<liferay-ui:search-container-column-text
name="category"
property="category"
/>
Now, instead of showing up as a long I would like to display the name of the person. So I wrote:
<%
String motherName =
PersonLocalServiceUtil.getPerson( person.getMother() )
.getName();
}
%>
<liferay-ui:search-container-column-text
name="mother"
value="<%= motherName %>"
property="mother"
/>
PROBLEM: The values that get displayed in this column are still the long
numbers, not the name. Even after rebuilding and restarting.
What am I doing wrong?
Check the implementation of
SearchContainerColumnTextTag
:As you can see, you can't set both,
property
andvalue
. Just setvalue
and you are fine.