3 Replies Latest reply on Apr 15, 2010 4:37 AM by Ilya Shaikovsky

    passing params within a4j:jsFunction

    nimo stephan Master

      I have two properties within a action which is called by invoking jsFunction:

       

      <h:form>

      <a4j:jsFunction name="invokeAction" action="#{myBean.doAction(_prop1, _prop2)}" reRender=".." limitToList="true">
              <a4j:actionparam name="param1" assignTo="#{_prop1}" />
              <a4j:actionparam name="param2" assignTo="#{_prop2}" />
      </a4j:jsFunction>

      <h:form>

       

       

      and want to call that by

       

      ...onclick="invokeAction(hobby, 'hello');"

       

      However, there a js-error is thrown:

       

      hobby is not defined

       

      So I guess, hobby (a valid java-object) is not passed right into the param1-property of my action. What is wrong?