【问题标题】:How to check two conditions inside rendered attribute?如何检查渲染属性中的两个条件?
【发布时间】:2013-02-18 11:54:02
【问题描述】:

我试过下面的代码

   <h:form rendered="{#{cars.enabled} and #{cars.enabledEdit}}">

但这不起作用。

【问题讨论】:

    标签: jsf el multiple-conditions rendered-attribute


    【解决方案1】:

    这是一个正确的 EL 表达式

    <h:form rendered="#{cars.enabled and cars.enabledEdit}">
    

    不需要(甚至在 #{} 中使用 #{} 也是非法的)

    【讨论】:

    • 可能应该提到,如果这是 OP 的最终目标,那么 ajax 更新该表单的机会可能会失败
    猜你喜欢
    • 1970-01-01
    • 2017-05-31
    • 1970-01-01
    • 2021-03-02
    • 2018-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多