When you want to disable button just after pressing the button the you have to put the code show in bold

<p:commandButton id=”btn1″ value=”Submit”
actionListener=”#{demoBean.action}”
widgetVar=”demoButton” onclick=”demoButton.disable()”
/>

By admin