【问题标题】:Cannot make filter on rich:datatable无法对丰富的过滤器进行过滤:数据表
【发布时间】:2015-11-30 18:46:47
【问题描述】:

我正在做一个项目,有些部分我还没有开发。现在我必须在桌子上设置一个过滤器,因为我们使用丰富的面孔,我想使用过滤器,就像exadel 的示例一样。

但是它不起作用,我知道这可能是由于 filterValue 属性,因为我不确定我是否指向正确的 bean。一切看起来都不错,但没有过滤器。

有什么建议吗?我怎样才能知道什么是正确的豆子? 这仅包含我要过滤的列。

<rich:dataTable var="_project"
    value="#{projectController.showDeactivateEmployees? projects : projectController.getViewableProjects(projects)}"
    rendered="#{not empty projectController.getViewableProjects(projects)}"
    styleClass="simpletablestyle" sortMode="single">
    <rich:column filterBy="#{_project.name}" filterValue="#{project.name}">
            <f:facet name="header">#{msg.common_Name}</f:facet>
            <h:outputText value="#{_project.name}"
                style="color:#{_project.usedHours * 100 / _project.maxHours &gt;= 75 and _project.maxHours!=0? '#d20f19' : '#000000'};">
            </h:outputText>
    </rich:column>
<rich:datatable/>

【问题讨论】:

    标签: jsf richfaces richdatatable


    【解决方案1】:

    属性名就是“filterValue”。

    什么是正确的 bean 取决于您,filterValue 只需指向您希望存储值的某个属性。

    【讨论】:

    • 感谢您的指点,但这只是在这篇文章中的拼写错误,我在我的代码上写对了...
    • 我想知道这是怎么回事。我已经更新了答案,你保存值的 bean 的范围是什么?
    猜你喜欢
    • 2011-05-31
    • 2021-07-15
    • 2013-07-01
    • 2013-06-28
    • 1970-01-01
    • 2020-06-19
    • 2015-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多