【问题标题】:Oracle ADF: richButton.setDisabled(true) not working in 12cOracle ADF:richButton.setDisabled(true) 在 12c 中不起作用
【发布时间】:2015-07-02 19:16:05
【问题描述】:

您好,我正在使用 jdeveloper 12c。我有一个 test.jsf 页面,其中有一个带有按钮的表单。在此页面的支持 bean 中,我有 actionListener 方法 addKPI(ActionEvent e)。当用户单击此按钮时,它会调用 addKPI() 方法。在这种方法中,我正在执行一些操作,之后我尝试使用richButton.setDisable(true) 禁用它。它在 12c 中不起作用。它在 jdeveloper 11.1.2.4 中工作。

请帮助我。我如何做到这一点。我的要求是当用户单击此按钮时,我需要禁用它。表示该按钮只能点击一次。

提前致谢。

【问题讨论】:

    标签: jsf oracle-adf jdeveloper


    【解决方案1】:

    您可以尝试从动作侦听器触发程序化 PPR:

    public void addKPI(ActionEvent e) {
      .........
      richButton.setDisable(true);
      AdfFacesContext.getCurrentInstance().addPartialTarget(richButton);
    
    }
    

    【讨论】:

    • 很棒的马库斯。这是完美的工作。非常感谢。非常感谢。
    猜你喜欢
    • 2021-12-04
    • 2015-07-05
    • 2021-01-10
    • 1970-01-01
    • 2018-04-12
    • 2011-11-06
    • 2018-03-16
    • 1970-01-01
    相关资源
    最近更新 更多