You need to sign in to do that
Don't have an account?
Dhaval Panchal
Action function is not working.
Hi,
Below is my vf page. I have used action function control and java script to call controller method. When I have created this page, it was working perfactly. But today it is not working, I am not able to find any reason for that. If I use action in commandbutton directly then it works fine (that means my controller works fine). But as per my requirement I have to call that action using action function as this is a popup page.
<apex:page id="pg" controller="GeneralSettingsController" sidebar="false" showHeader="false"> <apex:pageMessages id="msg"/> <apex:form id="frm"> <apex:PageBlock id="pb"> <apex:pageBlockButtons > <apex:commandButton value="Save Settings" onclick="SaveSettings();"/> <apex:commandButton value="Cancel" onclick="window.close();"/> </apex:pageBlockButtons> Save Status: <B>{!saveStatus}</B><BR/><BR/> Remove chat history prior to <apex:inputField style="width:30px" value="{!objSetting.Time_Digit__c}"/> <apex:selectList style="width:75px" size="1" multiselect="false" value="{!objSetting.Time_Unit__c}"> <apex:selectOption itemValue="Minutes" itemLabel="Minutes"/> <apex:selectOption itemValue="Hours" itemLabel="Hours"/> <apex:selectOption itemValue="Days" itemLabel="Days"/> </apex:selectList> </apex:PageBlock> <apex:actionFunction oncomplete="window.close();" id="afSaveSettingValues" name="SaveSettingValues" action="{!SaveSettings}"/> </apex:form> <script> function SaveSettings(){ pg:frm:SaveSettingValues(); } </script> </apex:page>
Please give me some suggestion to find out cause.
Why do you need to use the action function component? What is stopping you from doing something like: