延迟加载数据表搜索(过滤)仅在按下ENTER按钮后才能工作

时间:2012-08-31 11:35:33

标签: jsf primefaces

我有一个延迟加载数据表但过滤选项仅在按下ENTER按钮后才能工作。通常,搜索应该与键入每个字母一起进行。但这不会发生。这是怎么造成的,我该如何解决?

<p:dataTable var="monitoringService" value="#{monitoringServiceBean.lazyModel}"
            styleClass="dataTableCSS" paginator="true" rows="5"
            paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
            rowsPerPageTemplate="5,10,15" selectionMode="single"
            id="basic">
            <p:column id="modelHeader" headerText="StudyPlan" sortBy="#{studyPlanList.name}"
                filterBy="#{studyPlanList.name}" width="200">
                <h:outputText value="#{monitoringService.buddhdiedge.name}" />
            </p:column>
            <p:column>
                <f:facet name="header">  
                SpokenTutorial  
           </f:facet>
                <h:outputText
                    value="#{monitoringService.spokenTutorial.studyplanCategory.name}" />
            </p:column>
            <p:column>
                <f:facet name="header">  
                Status  
            </f:facet>
                <h:graphicImage
                    value="../resources/images/monitoringservicedownload.png"
                    style="float:center;height: 18px; width: 20px"
                    rendered="#{monitoringService.status == 100}"
                    title="SYNCING_STARTED" />
                <h:graphicImage
                    value="../resources/images/monitoringserviceupdated.png"
                    style="float:center;height: 18px; width: 20px;"
                    rendered="#{monitoringService.status == 105}" title="SYNC_UPDATED" />
                <h:graphicImage
                    value="../resources/images/monitoringserviceerror.png"
                    style="float:center;height: 18px; width: 20px;"
                    rendered="#{monitoringService.status == 101}" title="SYNC_ERROR" />
                <h:graphicImage value="../resources/images/monitoringserviceok.png"
                    style="float:center;height: 18px;width: 20px"
                    rendered="#{monitoringService.status == 1000 || monitoringService.status == 1005}"
                    title="SYNCED_SUCCESSFULLY" />
            </p:column>

            <p:column>
                <f:facet name="header">  
                Updated Date 
        </f:facet>
                <h:outputText value="#{monitoringService.formatedDate}" />
            </p:column>
        </p:dataTable>

这是数据表的初始代码部分。

0 个答案:

没有答案