Version 1

    I want to document this here so that anyone that have the same problem as me can find the solution. I had a problem where a4j:jsFunction was not calling its action when passing a parameter. Here's the code I had:


    <a4j:jsFunction id="getBarChartData" name="_getBarChartData" data="#{}" oncomplete="buildBarChart(" action="#{Statistics.getBarChartData}">
        <a4j:param name="parameters" assignTo="#{Statistics.parameters}" />


    It took me quite a while to figure out the problem was the name of the param was parameters. I changed that to something else and it worked. I think the reason for this lies in the generated code. As you can see in the example below, this code creates a "parameters" object. It may be that this causes a name clash elsewhere.


         RichFaces.ajax("pageForm:getBarChartData",null,{"parameters":{"parameters":parameters} ,"incId":"1"} )


    The solution is simple. Don't use "parameters" as the name of the a4j:param.