No Filter or Sort with Lazy Dynamic DataTable ?

UI Components for JSF
Post Reply
gbayfield
Posts: 27
Joined: 02 Nov 2010, 15:53

06 Dec 2010, 16:42

Hi, i have the p:dataTable configured as dynamic and lazy, tested in a stable Spring Faces application environment running over Mojarra 2.0.3. I can run the lazy p:dataTable and successfully load data and have the Paginator fuctioning correctly, however i have not been able to setup the filter fields in each column nor the column sort capability. I have referenced the Prime Faces Showcase examples and have tried running Primefaces 2.2.M1-SNAPSHOT and 2.2.RC2 but can not mimic the shopwcase Complex dataTable example in the required Dynamic, Lazy mode ? Is this supported ?

Code: Select all

<p:dataTable var="accountItem" value="#{accountsReceivableItems}" rows="6" paginator="true" dynamic="true" lazy="true"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
....
Tried

Code: Select all

<p:column filterBy="{accountItem.auditNumberDisplay}" sortBy="{accountItem.auditNumberDisplay}">
<f:facet name="header">
 <h:outputText value="Audit Number" />
</f:facet>
<h:outputText value="#{accountItem.auditNumberDisplay}" />
</p:column>
but no filter field in header nor sort icon so tried

Code: Select all

<p:column filterBy="{accountItem.cashJournalTypeCode}" sortBy="{accountItem.cashJournalTypeCode}" headerText="Cash Jnl" footerText="contains" filterMatchMode="contains">
<h:outputText value="#{accountItem.cashJournalTypeCode}" />
</p:column>
but still nothing in the dataTable column header except the header text, does anyone have a working eexmaple of the current dynamic lazy p:dataTable support filtering and sorting ?

Also the Paginator buttons have the e.g. "First" and "<" labels overlapping each other, the firstPageLinkLabel is deprecated now, apparently replaced by the use of Icons, but the current User Guide is out of date, is there a current example of how to fix the Paginator Button Labels or do we have to wait for the 2.2 User Guide to be released ?

All help and comments appreciated !

JMilnes
Posts: 110
Joined: 12 Feb 2010, 20:03

08 Dec 2010, 16:12

Looks like you forgot the #

<p:column filterBy="#{accountItem.cashJournalTypeCode}" sortBy="#{accountItem.cashJournalTypeCode}" headerText="Cash Jnl" footerText="contains" filterMatchMode="contains">
<h:outputText value="#{accountItem.cashJournalTypeCode}" />
</p:column>
JSF 2.3.0-FCS Mojarra
Prime faces 3.0.M4
Tomcat 7.0.20
IE 8

gbayfield
Posts: 27
Joined: 02 Nov 2010, 15:53

21 Dec 2010, 18:58

Do'h yes my dynamic lazy table does filter and searcn, thanks for your insight !

inxsible
Posts: 53
Joined: 07 Dec 2010, 21:30

21 Dec 2010, 19:08

I had a similar issue where one of the filterBy variables was misspelt and due to that none of the filters worked. It would have been better if it errored out so we can debug. I got no errors, so I had to manually look at each column and when I found the wrong variable name and corrected it, everything started working again.


Quirky !
PF-2.2.1 || Mojarra 2.0.3-FCS || Eclipse 3.6.1 (Helios) || Weblogic 11gR1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests