1

I would like to pass a parameter from my component to the controller. Here is the source code:

    <apex:actionFunction name="attachFil" action="{!attachFile}">
    <apex:param name="myImageURL" assignTo="{!pictureurl}" value=""/>
    </apex:actionFunction>

     <Script>attachFil('ok!!!');</script>

The controller have a field named pictureurl, and a function named attachFile. When I debug in the controller attachFile function, I find the pictureurl = null.

1 Answer 1

1

You need to add a rerender param to the actionFunction. This is a quirk of actionFunctions and has been around a while.

the rerender param can be anything - eg rerender="nothing" or rerender="" and it should work.

Also, make sure your variable that you are passing is public and has a setter, eg public String pictureurl {get; set;}

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.