I've this piece of code:
Code: Select all
<p:column sortFunction="#{csPage.compareByName}" sortBy="#{control.control_name}">
<f:facet name="header">Control Name</f:facet>
<h:commandLink action="view-control"
value="#{control.control_name}" />
</p:column>
Code: Select all
public int compareByName(Object o1, Object o2)
{
ControlEntity goal1 = (ControlEntity) o1;
ControlEntity goal2 = (ControlEntity) o2;
return goal1.getControl_name().compareTo(goal2.getControl_name());
}
Any guesses what I might be doing wrong?
Thanks!
-Haroon