Today I have spent all day trying to understand why values in xhtml file were not updated after calling a bean from a <p:commandButton>
.
After I changed the p:commandButton for h:commandButton everything worked fine. This is how I declared the commandButton:
<p:commandButton id="b1" style="height: 30px; width: 30px;" value="a"
action="#{turnoController.createTurno('a')}"
onclick="document.getElementById(this.id).disabled=true;"/>
With this command button it refreshes but I dont know how to disable it.
<h:commandButton id="b1" style="height: 30px; width: 30px;" value="a"
action="#{turnoController.createTurno('a')}"/>
I want to ask why is the p:commandButton incompatible with "refreshing" the values of the page???
What I want to do is to turn the buttons disabled after clicking but also to update all values...
How can I make it in xhtml+jsf???