Can we call apex:actionFunction
on apex:commandButton
's onclick event?
Actually i am trying to do this but controller's method is not being called.
i am doing something like below -
<apex:commandButton title="Apply and Continue" value="Apply and
Continue" onclick="setState()"/>
Action function is declared like below -
<apex:actionFunction id="setState" action="{!checkClick}" name="setState" > <apex:param name="state" assignTo="{!state}" value="update"/> </apex:actionFunction>
Controller Code -
public PageReference checkClick() {
system.assert(false, 'In -' + state);
return null;
}
controller's checkClick
is not being called. Page just get refreshed.