I'm using Bootsfaces, and I've a component defined like:
<b:commandButton type="button" styleClass="btn-sm"
value="ACTION"
update="idC1 idC2" onsuccess="something()"
actionListener="#{myBean.myaction}" />
What I want is that myaction() force an Ajax error, in order to assure that something() is run
void myaction() {
if (condition) {
success();
else
notsuccess();
}
As far as I can see validation errors dont cause ajax error. Right? Onsuccess script is run even if I throw a Faces validation exception. So it must exist another way.
Anybody can help me?