Hello,
I have a case when upon clicking a button I execute an action and depending on the result of that action to either execute an additional action or finish.
The approach I took is to have something like this:
<a:commandButton value="Save"
action="#{actBean.doSomething}"
oncomplete="if(#{list.size>0})
{
//do something
}
else
{
// need to call something else
// such as #{anotherActBean.doSomethingElse}
}
" />My problem is with the else
part. How do I call an action from this javascript? The #{anotherActBean.doSomethingElse}
syntax does not seem to be working here.
Thanks.
Just figured it out myself - using jsFunction