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
Chitral ChaddaChitral Chadda 

render vf page


User-added image

i reuire that when i click  on edit button (on right hand side) then only it shud show save button  but its showing save button before only.
how to do that.


<apex:commandLink value="Edit" action="{!enabledEditMode1}" style="margin-left: 69%">
     <apex:actionSupport event="onclick" reRender="panel1"/>
     </apex:commandLink>
    
   </div>
   <div class="panel-body">
   Email
  
  
 
    <apex:outputPanel id="panel1">
    <apex:commandButton action="{!save}" value="Save"/>
        <apex:outputfield value="{!account.Email__c}" style="margin-left: 60%"></apex:outputfield>
      <apex:inputField value="{!account.Email__c}"  rendered="{!isEdit1}" style="margin-left: 60%"></apex:inputField>

     </apex:outputPanel>
   </div>
PratikPratik (Salesforce Developers) 
Hi Chitral,

You can refer the post:

https://developer.salesforce.com/forums?id=906F0000000972tIAA

Thanks,
Pratik
Mani RenusMani Renus
Apex

public Boolean showhide{get;set;}
public yourconstructor(){
showhide=false;
//-----
your code
-----//
}

public pagereference enabledEditMode1(){
showhide=true;
//-----
your code
-----//

}


VF

<apex:commandButton action="{!save}" value="Save" rendered="{!showhide}"/>


Hope it helps you
VempallyVempally
<apex:commandLink value="Edit" action="{!enabledEditMode1}" style="margin-left: 69%">
     <apex:actionSupport event="onclick" reRender="panel1"/>
     </apex:commandLink>
   
   </div>
   <div class="panel-body">
   Email
     <apex:outputPanel id="panel1">
    <apex:commandButton action="{!save}" value="Save" rendered={!btnsave_render}/>
        <apex:outputfield value="{!account.Email__c}" style="margin-left: 60%"></apex:outputfield>
      <apex:inputField value="{!account.Email__c}"  rendered="{!isEdit1}" style="margin-left: 60%"></apex:inputField>

     </apex:outputPanel>
   </div>

Controller

public Boolean btnsave_render{get;set;}

public constructor(){
btnsave_render=false;

}

public pagereference enabledEditMode1(){
btnsave_render=true;
}