jsf datatable paginator和过滤器冲突

时间:2012-12-20 13:22:57

标签: java ajax jsf primefaces

我有数据表过滤器和分页器的问题。这是我的数据表:

<p:layoutUnit position="center">
            <h:form>  
                <p:dataTable id="dataTable" var="car" value="#{myProjects.projects}" widgetVar="carsTable" emptyMessage="Eşleşme Yok." filteredValue="#{myProjects.filteredProjects}" >  

                    <f:facet name="header">  
                        <p:outputPanel>  
                            <h:outputText value="Dahil Olduğunuz Projeler" />
                            <p:inputText id="globalFilter" onkeyup="carsTable.filter()" style="float: right" />
                                <h:outputText value="Tümünde Ara:" style="font-size: 18px; float: right; height: 28px; margin-top: 5px; margin-right: 5px;"/>  
                        </p:outputPanel>  
                    </f:facet>  

                    <p:column id="sectorColumn" filterBy="#{car.sector}"   
                              headerText="Sektör" footerText="Sektör"  
                              filterMatchMode="contains">  
                        <h:outputText value="#{car.sector}" />  
                    </p:column>

                    <p:column id="projectNameColumn" filterBy="#{car.projectName}"   
                              headerText="Proje Adı" footerText="Proje Adı"  
                              filterMatchMode="contains">  
                        <h:outputText value="#{car.projectName}" />  
                    </p:column>

                    <p:column id="startDateColumn" filterBy="#{car.startDate}"   
                              headerText="Başlangıç Tarihi" footerText="Başlangıç Tarihi"  
                              filterMatchMode="contains">  
                        <h:outputText value="#{car.startDate}" />  
                    </p:column>

                    <p:column id="endDateColumn" filterBy="#{car.endDate}"   
                              headerText="Bitiş Tarihi" footerText="Bitiş Tarihi"  
                              filterMatchMode="contains">  
                        <h:outputText value="#{car.endDate}" />  
                    </p:column>

                    <p:column id="lastStatsColumn"  
                              headerText="Bitiş Tarihi" footerText="Bitiş Tarihi"  
                              >  
                        <h:outputText value="#{car.lastStats}" />  
                    </p:column>



                </p:dataTable>  

            </h:form>  
        </p:layoutUnit>

当我将paginator =“true”添加到我的p:datatable时,在它开头显示,并且过滤也没问题。但是,当我开始删除字母时,它不会回滚到第一个状态。

它没有分页器。但我需要分页器。

0 个答案:

没有答案