jsf - Using PrimeFaces Global Filter? -
as mentioned in primefaces showcase trying create global filter datatable . there unable understand carstable means, in code fragment
<h:form> <p:datatable var="car" value="#{tablebean.carssmall}" emptymessage="no cars found given criteria"> <f:facet name="header"> <p:outputpanel> <h:outputtext value="search fields:" /> <p:inputtext id="globalfilter" onkeyup="carstable.filter()" style="width:150px"/> </p:outputpanel> </f:facet>
when use my datatableid inplace of carstable iam getting javascript error undefined id.
this looks typo in showcase code display. missing attribute on <p:datatable>
component called widgetvar
. attribute declares unique javascript identifier client side component. code should show this:
<p:datatable var="car" value="#{tablebean.carssmall}" widgetvar="carstable" emptymessage="no cars found given criteria"> ...
for reason client side function filter()
not declared in pf guide 2.2 under client dom datatable, know there , use it.
Comments
Post a Comment