1

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

我这样做:

<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"/>

但过滤器不起作用

Primefaces CRUD 生成器生成的表 I

4

0 回答 0