You need to sign in to do that
Don't have an account?
Dharmendra Pahadiya
Disable vf page save button....
Hi,
I want to disable a vf page save button which is in <apex:pageBlockButtons> block. I have read many articles related to this and tried them but none had helped me.
I have tried the action function from some other post but its posting my data twice to server.
Please see below my code.
<apex:actionStatus id="mySaveStatus1"> <apex:facet name="stop"> <apex:commandButton action="{!saveOverride}" status="mySaveStatus1" value="Save" disabled="false" rerender="pgMsg"/> </apex:facet> <apex:facet name="start"> <apex:commandButton status="mySaveStatus1" value="Saving..." disabled="true"/> </apex:facet>
Please suggest me a way to get this done.
Thanks in advance.
I want to disable a vf page save button which is in <apex:pageBlockButtons> block. I have read many articles related to this and tried them but none had helped me.
I have tried the action function from some other post but its posting my data twice to server.
Please see below my code.
<apex:actionStatus id="mySaveStatus1"> <apex:facet name="stop"> <apex:commandButton action="{!saveOverride}" status="mySaveStatus1" value="Save" disabled="false" rerender="pgMsg"/> </apex:facet> <apex:facet name="start"> <apex:commandButton status="mySaveStatus1" value="Saving..." disabled="true"/> </apex:facet>
Please suggest me a way to get this done.
Thanks in advance.
You can go disable a button through a Boolean value
Button will be still visible after disabling but i wont work.i hope this will help you.
But I have tried both solutions but they are nor working for me.
The problem with my code is just that it is calling the saveOverride method twice.
If i try to save the record considering all the validations then it is working fine.
But if I try to save the record and any custom validation error occurs then the saveOverride method exit but it automatically started again which is causing problem....
Please try to give me answer in this scenerio. What is happening??
The above is the page which we are using on Create and Edit. We are calling a web service from a custom component.
I have checked the debug logs and found that While saving a record if a custom validation error occurs then it will not exit and again save method will be called and throws error.
Why it is calling Save method second time after Validation fires? Please help.