function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<apex:page standardController="Opportunity" extensions="opportunityController"> <apex:form > <apex:selectList value="{!selectedStage }" size="1"> <apex:selectOptions value="{!PLValues}" /> <apex:actionSupport event="onchange" reRender="pb"/> </apex:selectList> <apex:outputText value="{!selectedStage}"></apex:outputText> <apex:pageBlock title="Opportunity details" id="pb"> <apex:outputText value="{!selectedStage}"></apex:outputText> <apex:pageBlockSection id="frstpb" rendered="{!IF(selectedStage =='Qualification',true,false)}"> <apex:inputfield value="{!Opportunity.Name}"/> <apex:inputfield value="{!Opportunity.StageName}"/> <apex:inputfield value="{!Opportunity.CloseDate}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
public class opportunityController{ Opportunity record; public opportunityController(ApexPages.StandardController controller) { record = (Opportunity ) controller.getRecord(); } public string selectedStage {get; set;} public List<SelectOption> getPLValues() { List<SelectOption> plValues = new List<SelectOption>(); Schema.DescribeFieldResult dfr = Opportunity.StageName.getDescribe(); for (Schema.PicklistEntry ple : dfr.getPicklistValues()) { plValues.add(new SelectOption(ple.getValue(), ple.getLabel())); if (ple.isDefaultValue()) { selectedStage = ple.getValue(); } } return plValues; } }
Waqar Hussain,
Thank you soo much for your reply, its hepls a lot. thanks once again.
Guru.