SortBy not working
pzelenka00 Apr 16, 2012 4:57 AMHi,
I have problem with dataTable sorting. If I click on any sortable column I always get empty table (zero rows). The reklamaceBean backing bean is request scope. I tried to use a4j:keepAlive but it didn't help.
Any Idea what is wrong?
Thank
Pavel
<rich:dataTable id="reklamacetable" value="#{reklamaceBean.reklamaceList}" binding="#{reklamaceBean.htmlDataTable}" var="rekl" rows="20"> <f:facet name="caption"> <h:outputText value="Toto uvidí inspektor"/> </f:facet> <rich:column sortBy="#{rekl.reklamaceDatum}"> <f:facet name="header"> <h:outputLabel value="Datum"/> </f:facet> <h:outputText value="#{rekl.reklamaceDatum}"> <f:convertDateTime timeZone="Europe/Prague" pattern="dd.MM.yyyy" /> </h:outputText> </rich:column> <rich:column sortBy="#{rekl.id}"> <f:facet name="header"> <h:outputLabel value="ID"/> </f:facet> <h:commandLink value="#{rekl.id}" action="detail"> <f:setPropertyActionListener value="#{rekl}" target="#{sessionBean.reklamace}"/> </h:commandLink> </rich:column> <rich:column> <f:facet name="header"> <h:outputLabel value="Divize"/> </f:facet> <h:outputText value="#{rekl.okrsek.divize.zkratka}"/> </rich:column> <rich:column> <f:facet name="header"> <h:outputLabel value="Okrsek"/> </f:facet> <h:outputText value="#{rekl.okrsek.okrsekKod}"/> </rich:column> <rich:column sortBy="#{rekl.reklamaceKod.CReklamaceNazev}"> <f:facet name="header"> <h:outputLabel value="Typ"/> </f:facet> <h:outputText value="#{rekl.reklamaceKod.CReklamaceNazev}"/> </rich:column> <rich:column> <f:facet name="header"> <h:outputLabel value="Stav"/> </f:facet> <h:outputText value="#{rekl.reklamaceStav.reklamaceStavNazev}"/> </rich:column> <rich:column> <f:facet name="header"> <h:outputLabel value="Adresa"/> </f:facet> <h:outputText value="#{rekl.adresa.fullText}"/> </rich:column> <rich:column> <f:facet name="header"> <h:outputLabel value="Popis"/> </f:facet> <h:outputText value="#{rekl.reklamaceText}"/> </rich:column> <rich:column> <f:facet name="header"> </f:facet> <h:commandLink action="#{reklamaceBean.createVyjadreni}"> <f:setPropertyActionListener value="#{rekl}" target="#{sessionBean.reklamace}"/> <h:graphicImage url="/images/edit.gif" style="border: 0" title="Vyjádření"/> </h:commandLink> </rich:column> <f:facet name="footer"> <rich:datascroller for="reklamacetable" id="ds" page="#{sessionBean.reklamacePage}"/> </f:facet> </rich:dataTable>