【问题标题】:How to make the <af:column> of a table visible on click of a button?如何在单击按钮时使表格的 <af:column> 可见?
【发布时间】:2015-07-06 14:57:46
【问题描述】:

Jdev 版本 11.1.1.7.1

我是 ADF 的新手。我的 UI 中有一个表格。我已将表的列之一的可见属性设置为 false。现在如何在单击按钮后使该列可见?

任何解决方案都将不胜感激。

谢谢。

【问题讨论】:

    标签: oracle-adf jdeveloper


    【解决方案1】:

    假设您有基于 VO1 的 table1。 VO1 有一个 C1 列,有条件地在 UI 中可见。

    解决方案: a).您可以在您的 VO1 中创建一个瞬态属性 ShowC1Visible (Boolean)。 b).您将在 AM 中创建自定义方法:

    public void showColumn(){ VO1RowImpl 行 = (VO1RowImpl)this.getVO1().getCurrentRow(); row.setShowC1Visible(true);
    }

    c)。在您的 af:column 中,您将有一个 EL 条件

    <af:column  visible="#{row.bindings.ShowC1Visible.inputValue}"
    

    d) 将您的自定义方法拖放到页面中以创建如下按钮:

    <af:commandButton ... actionListener="#{bindings.showColumn.execute"} ...
    

    e) 在 af:column 标记中,添加一个 partialTrigger 指向您的命令按钮。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多