Please, have anyone succeed with sort functions?
My XHTML:
Code: Select all
<p:column sortBy="#{item.title}" sortFunction="#{bean.mySort}">
<f:facet name="header">
<h:outputText value="Title"/>
</f:facet>
<h:outputText value="#{item.title}"/>
</p:column>
Code: Select all
public int mySort(String s1, String s2) {
// just print something so I know this function is being invoked:
System.out.println("mySort" + s1 + "/" + s2);
return 0;
}
Can anyone help me? Maybe post some examples that work.
Thanks!
(Primefaces 2.2-RC2 / GlassFish v3)