方法remove被称为我单击YES或NO。 如何判断是否按下了?
<p:commandLink actionListener="#{mybean.remove}"
ajax="false"
>
<p:confirm header="Confirm" message="Are you sure?" icon="ui-icon-alert"></p:confirm> <h:graphicImage value="images/erasebig.png" />
</p:commandLink>
<p:confirmDialog id="dialog" global="true" showEffect="fade" hideEffect="explode" message="Are you sure?">
<p:commandButton value="Yes" type="button"
styleClass="ui-confirmdialog-yes" icon="ui-icon-check"
/>
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-close" />
</p:confirmDialog>
答案 0 :(得分:1)
将styleClass="ui-confirmdialog-no"
放在无按钮上,不会调用mybean.remove()