You need to sign in to do that
Don't have an account?
Sujata Tiwari 3
Need help in hiding the button in Visualforce page
Hi,
I want to display my Start button at first and when the user clicks on it then display ShowProducts button.
My Vf page :
<apex:page standardController="Lead" extensions="TrialReController" sidebar="false" showHeader="false">
<apex:form id="frm">
<apex:pageblock>
<apex:pageblockButtons location="bottom">
<apex:commandButton value="Start" action="{!start}" rendered="{!x}" />
<apex:commandButton value="ShowProducts" action="{!ShowProducts}" rendered="{!y}" />
</apex:pageblockButtons>
</apex:pageblock>
</apex:form>
</apex:page>
***************************************
public class TrialReController {
public boolean x{get;set;}
public boolean y{get;set;}
public TrialReController(ApexPages.StandardController controller) {
}
public void start(){
x=true;
check();
}
public void ShowProducts(){
y=true;
check();
}
public void check(){
if(x == true){
y=false;
}
else{
x=false;
}
}
}
When I am previewing my output I can't see any button there.
Many thanks for your help.!!
I want to display my Start button at first and when the user clicks on it then display ShowProducts button.
My Vf page :
<apex:page standardController="Lead" extensions="TrialReController" sidebar="false" showHeader="false">
<apex:form id="frm">
<apex:pageblock>
<apex:pageblockButtons location="bottom">
<apex:commandButton value="Start" action="{!start}" rendered="{!x}" />
<apex:commandButton value="ShowProducts" action="{!ShowProducts}" rendered="{!y}" />
</apex:pageblockButtons>
</apex:pageblock>
</apex:form>
</apex:page>
***************************************
public class TrialReController {
public boolean x{get;set;}
public boolean y{get;set;}
public TrialReController(ApexPages.StandardController controller) {
}
public void start(){
x=true;
check();
}
public void ShowProducts(){
y=true;
check();
}
public void check(){
if(x == true){
y=false;
}
else{
x=false;
}
}
}
When I am previewing my output I can't see any button there.
Many thanks for your help.!!
Is your query solved.if yes mark this thread closed.