I have a p:commnandButton as follows
<p:commandButton id="previouscat"
value="Go to #{categoryBean.getPreviousCategory().name}"
style="margin:0px;" icon="ui-icon-back" update="@all"
action="#{categoryBean.selectPreviousCat}"/>
which is inside a form. Now my problem is that when clicking on the button, the action doesn't execute cause then it should change the value of the button. I've tryed with setting the action function like categoryBean.selectPreviousCat & categoryBean.selectPreviousCat() with no success.
public void selectPreviousCat(){
this.selectedCategory = this.getPreviousCategory();
}