dataTable and globalFilter

UI Components for JSF
Post Reply
horkavlna
Posts: 4
Joined: 29 Jun 2010, 13:14

02 Oct 2010, 15:58

Hi, i want implement globalFilter on the my datatabel, but I do not know what I write to the my onkeyup. Can you explain on the example from http://www.primefaces.org/showcase/ui/d ... tering.jsf

callahan
Posts: 768
Joined: 27 May 2010, 22:52

02 Oct 2010, 20:10

Hi,

The p:dataTables widgetVar attribute is missing in the code displayed in the showcase :o , but the "real code" has a widgetVar.

Code: Select all

                <p:dataTable var="car" value="#{tableBean.carsSmall}" widgetVar="carsTable"
                             emptyMessage="No cars found with given criteria">
                    <f:facet name="header">
                        <p:outputPanel>
                            <h:outputText value="Search all fields:" />
                            <h:inputText id="globalFilter" onkeyup="carsTable.filter()" style="width:150px" />
                        </p:outputPanel>
                    </f:facet>
                    ....
                </p:dataTable>
Note that the entire showcase can normally be downloaded here http://repository.prime.com.tr/org/prim ... -SNAPSHOT/, however the current showcase war file is broken :o :o .

horkavlna
Posts: 4
Joined: 29 Jun 2010, 13:14

03 Oct 2010, 02:16

Many thanks ;)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests