【问题标题】:What is limitToList="true" equivalent attribute in primefaces?primefaces 中的 limitToList="true" 等效属性是什么?
【发布时间】:2014-01-29 08:37:31
【问题描述】:

我知道richfaces 3.5 中的属性limitToList="true" 或richfaces 4.x 中的limitRender="true" 允许忽略“ajaxRendered”属性的行为。

现在我正在寻找 primefaces 3.5 中的等效属性来消除 autoUpdate="true" 的行为,因为我不想在每次 ajax 调用时都用autoUpdate="true" 更新我的 p:outputPanel。

非常感谢任何帮助。

提前谢谢各位。

【问题讨论】:

  • @jinxed 感谢您为使问题更具可读性所做的努力。我应该这样做的。从下一篇文章中肯定会记住这一点。

标签: jsf jsf-2 primefaces richfaces jsf-2.2


【解决方案1】:

只是回答我的问题,认为它可能会帮助其他人。

在 primefaces 4.X 中,有一个属性 ignoreAutoUpdate,它等同于 Richfaces 中的 limitToListlimitRender。此属性可用于各种组件,例如 p:ajax、p:commandButton p:commandLink 和 p:poll 和 p:remoteCommand。

【讨论】:

    【解决方案2】:

    没有。

    但是,您可以从另一侧进行。只需将 autoUpdate 本身设为有条件的即可。基本上:

    autoUpdate="#{evaluate true only if you actually need auto update}"
    

    您可以按照通常的方式在此处检查请求参数、按下的按钮或 bean 属性。

    【讨论】:

    • 感谢 BalusC。我可以按照您的建议这样做,但正在寻找像富人面孔这样的属性。无论如何,实施您的建议并不难。
    • 如回答,没有。如果您真的想在 PrimeFaces 中看到等价物,请在 PrimeFaces 中创建问题单。
    • 嗯,是的。从您在本网站的答案中学到了很多东西。非常感谢。
    • 肯定会在此处发布此问题。
    • 这个问题已经有人在primefaces社区发帖了。这是链接forum.primefaces.org/viewtopic.php?f=3&t=13650
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多