无法执行commandButton中的操作

时间:2013-06-14 16:01:19

标签: java java-ee primefaces

我是Primefaces的新手,我遇到了这个问题。除非我移动onclick标签,否则无法执行操作。

    <p:commandButton value="Détail " action="#{Allcar.gethistorique}" onclick="detail();suppcar.disable();modifscar.disable();comptecar.disable();detcar.disable()"
        id="deta" widgetVar="detcar" disabled="true">
</p:commandButton>

1 个答案:

答案 0 :(得分:0)

您最初将commandButton设置为disable =“true”。如果禁用,则不会提交。如果你省略了disabled =“true”,它对我有效(虽然我只在onclick中使用了detcar.disable())

<p:commandButton value="Détail " action="#{Allcar.gethistorique}" onclick="detcar.disable()"
            id="deta" widgetVar="detcar">
    </p:commandButton>