You need to sign in to do that
Don't have an account?
Chitral Chadda
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>
render vf page
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">
<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>
You can refer the post:
https://developer.salesforce.com/forums?id=906F0000000972tIAA
Thanks,
Pratik
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
<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;
}