Primefaces过滤标记<p:datatable> </p:datatable>

时间:2013-07-05 16:34:20

标签: jsf-2 primefaces filter datatable

请告诉我,如何将过滤器放在标签之外

我这样做:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:p="http://primefaces.org/ui">

<h:form id="InventListForm">
    <p:panel header="#{myBundle.ListInventTitle}">
        <f:facet name="header"> 
            <p:outputPanel> 
                <h:outputText value="Search: " /> 
                <p:inputText id="globalFilter" onkeyup="InventList.filter()" style="width:150px" /> 
            </p:outputPanel> 
        </f:facet>
        <p:dataTable id="datalist" resizableColumns="true" value="#{inventController.items}" var="item"
                     widgetVar="InventList" selectionMode="single" selection="#{inventController.selected}"
                     rowKey="#{item.id}"
                     paginator="true"
                     rows="10"
                     rowsPerPageTemplate="10,20,30"
                     >

            <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
            <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

但过滤器不起作用

表1由Primefaces CRUD生成器生成

0 个答案:

没有答案