I use an outputText to display a value of a calculation. I added a commandButton to reset the value.
<h:outputText id="lost" value="#{calculation.lost}" ></h:outputText>
<h:commandButton id="resetLost" value="Reset" action="#{calculation.setLost(0.0)}"></h:commandButton>
The setLost method just executes a code insertion like this: lost=lost.
I assumed that the outputText would be updated automatically but the value doesn't change. I tried also to refresh the page automatically without effect. Also I tried to use javascript.
Is it possible that the commandButton action to not be executed? And why? What is wrong in this piece of code?