首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >PF DataTable过滤器功能不起作用

PF DataTable过滤器功能不起作用
EN

Stack Overflow用户
提问于 2017-06-02 21:42:36
回答 2查看 1.2K关注 0票数 0

Prime faces : 6.0我尝试在PrimeFaces DataTable中启用全局搜索功能,类似于我在PrimeFaces展示中看到的功能。我输入的任何搜索字符串都返回一个空的结果集。我能够实现分页,但全局搜索是一个问题。下面是我的代码:

代码语言:javascript
运行
复制
<h:form>
    <p:dataTable var="pres" value="#{presBean.presentations}" rows ="10"
    paginator="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
    rowsPerPageTemplate="10,25,100" widgetVar="presTable" **filteredValue="#{presBean.filteredPres}"**>

    <p:column headerText="Title" sortBy="#{pres.title}">
    <!--f:facet name="header" sortBy="#{pres.title}">
        <h:outputText value="Title" />
    </f:facet-->
    <h:outputText value="#{pres.title}" />
</p:column>
<p:column headerText="Presenter" sortBy="#{pres.presenter}">
    <!--f:facet name="header">
        <h:outputText value="Presenter" />
    </f:facet-->
    <h:outputText value="#{pres.presenter}" />
</p:column>
</h:form>
EN

Stack Overflow用户

发布于 2017-06-12 23:24:00

是我的错。我没有对所有字段进行过滤。一旦我将过滤器添加到表的所有字段,它就开始工作了。

票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44330404

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档