【问题标题】:add specific confirmation popup with composant h:commandButton使用组合 h:commandButton 添加特定的确认弹出窗口
【发布时间】:2015-10-23 12:09:34
【问题描述】:

我有一个包含此代码的页面(jsf 2.1.22 和 primefaces 3.5):

    <h:commandButton onclick="if (!confirm('Are you sure ?')) {return false};"
        value="SUP" action="#{utilisateurControleur.supprimerUtilisateur}" type="submit"
        rendered="#{profilModele.profil.codeProfil eq 'ACADMIN' and profilModele.utilisateur.login ne utilisateur.login}">

             <f:setPropertyActionListener target="#{utilisateurModele.utilisateurSelectionne}" value="#{utilisateur}" />
    </h:commandButton> 

以下语句有效:

   onclick="if (!confirm('Are you sure ?')) {return false};"

但我想显示我的弹出窗口,其中有人回答是或否:

   confirmSuppressionUtilisateurDialog.show();

无法找到解决方案,您能帮帮我吗?谢谢

【问题讨论】:

    标签: javascript java jsf jsf-2


    【解决方案1】:

    看看这个:http://www.primefaces.org/showcase/ui/overlay/confirmDialog.xhtml我仍然不明白为什么人们不直接在谷歌上搜索他们的问题而不是直接发布..

    【讨论】:

    • 如果您认为这些问题没有付出任何努力,您可以“否决”这些问题。
    猜你喜欢
    • 2012-09-10
    • 1970-01-01
    • 2015-11-11
    • 1970-01-01
    • 2018-05-23
    • 1970-01-01
    • 2011-03-24
    • 2018-12-03
    • 2011-10-19
    相关资源
    最近更新 更多