3 Replies Latest reply on May 5, 2011 11:08 AM by snaker

    Conditional call to jsFunction from oncomplete.

    apashkev

      What I am trying to achieve is to call jsFunction only if some condition of my bean is true.

      The code looks like this :

       

      <a4j:jsFunction name="reloadContent"

              action="#{myBean.performSomeAction}" />

      ...

      <a4j:support event="onclick" action="#{myBean.action}" oncomplete="if (#{myBean.getErrorCode != null}) reloadContent();"

       

      however reloadContent(); gets called even if  (myBean.getErrorCode != null) returns false.

       

      Any help will be appreciated.