function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
maheshep.ax379maheshep.ax379 

how to disable buttons??

    Can anyone say how to disable and enable apex : commandButton or apex : commandLink in visual force directly.
    Or should i use style???
    Thanks in advance..
TehNrdTehNrd
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=3629
Brijesh KumarBrijesh Kumar
Hi maheshep
u can use this thing for disable buttons
 
<apex:page>
<apex:commandButton action="{!save}" value="<<" disabled="{!backButtonDisabled}" />
<apex:page>
 
 
In controller
u can create
public class POPlan {
   
   
    Boolean backButtonDisabled = true;
 
public Boolean getBackButtonDisabled () {
        return backButtonDisabled ;
    }
 public PageReference save() {  
     
               backButtonDisabled =false;
               return null;      
    }
    
}
 
 
Inside save() method ,according to your conditions u can set backButtonDisabled value true or false.
 
 
I hope this thing helping u
Thanks & Regards
Brijesh Kumar Baser