I tried something like this:
<p:commandButton type="push" value="Ack" disabled="false"
oncomplete="bean.method2()" update=":form:alarmTable"
action="#{bean.method1()}"
But method2 does not invoke, otherwise:
<p:commandButton type="push" value="Ack" disabled="false"
oncomplete="alert('onComplete')" update=":form:alarmTable"
action="#{bean.method1()}"
works as expected.
I want to implement next chain of action: method1 – update – method2.
How do to that?
As everyone else agrees, you probably shouldn’t be trying to call a method in your view. What you should do is call your method2 from method1 in your backer.
example: