I've got the following button:
<a4j:commandButton value="#{AppMessages['general.action.cancel']}"
disabled="#{!entityBB.expandState.editable}"
actionListener="#{entityBB.cancel}"
render="initialServicePanel :messages" status="ajaxStatus"
immediate="true" />
In my case the above button does everything I need (remove the inError state from an uiComponent to rerender it and reset (cancel) everything in the form to its previous state).
When I try to use it as this:
<h:commandButton value="#{AppMessages['general.action.cancel']}"
disabled="#{!entityBB.expandState.editable}" immediate="true">
<a4j:ajax execute="@this" render="initialServicePanel :messages"
listener="#{entityBB.cancel}" status="ajaxStatus" />
</h:commandButton>
it isn't working (the value gets reset but the uiComponent (an inputText) stays red though in error). Why is this? I can't figure out the difference between the two of them since I thought an a4j:commandButton was just an h:commandButton with a4j:ajax in it behind the scenes.
EDIT: Now I've got another situation where the h:commandButton
removes the value but keeps it in error (red border). And the a4j:commandButton
removes it from in error (red border) but keeps the value.. It's the exact same input as above. I can't explain it.. Anyone?