views:

175

answers:

1

I have a javascript that is calling a function addData(param1,param2,param3,param4) which is calling addClip at the end

And I need to pass those to a backing bean.

<a4j:form>
    <a4j:jsFunction name="addClip" action="#{backingBean.goGo}">
        <a4j:actionparam name="param1" assignTo="#{backingBean.param1}"/>
    </a4j:jsFunction>
</a4j:form>

But I can't seem to pass any values to the backingbean. I've even tried setting a static value for the actionparam. But when I try to do a Systemout on the setParam1 method it only prints out null. Have I missed anything important?

A: 

Your function defines one parameter, but is called with 4. I assume there is a javascript error (check your JS console (firefox)).

Get rid of the 3 unused parameters, and call it addClicp(param1)

Bozho
I've added 4 parameters to the JSF code and from the console it seems to print out setting all params but the first. But I can't seem to push values from the javascript to the backingbean. Calling the function goes well but not setting parameters from the JS call.
bananmuffins
how about giving all the code in question, instead of having me guess what's happening? ;)
Bozho