<apex:outputLink onClick="test();">Add </apex:outputLink>
<apex:actionFunction name="test" action="{!add}" rerender="Panel"/>
Am i am doing something wrong because action function is not being called.
Am i am doing something wrong because action function is not being called. |
|||
|
Yes, you can do that. An actionfunction simply associates an action method with a javascript function whose name you specify. You can call that javascript function from anywhere that you can call a regular javascript function. I'd check that there are no validation type errors here - add an apex:pageMessages and rerender that from the actionFunction, otherwise those errors will be swallowed. If you aren't seeing what you expect in the rerendering, turn on debug logging and check your 'add' method is behaving as expected. You could also use the web inspector to confirm that you don't have any other javascript errors that could be interfering with your actionfunction. |
|||||||||||||
|
|
The wrong thing here is, that you don't use
|
||||
|
|
Well you can always call a
Adding a |
|||
|
|
add()not called? If you addoncomplete="alert('test');"to your actionFunction, do you get an alert? – Lex Feb 5 at 10:50