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 controller="testController" > <apex:form > <apex:pageBlock > <apex:pageBlockSection > <apex:outputPanel> <apex:selectList id="ddlOpt" multiselect="false" size="1" value="{!proceedYN}"> <apex:selectOption itemValue="Yes"></apex:selectOption> <apex:selectOption itemValue="No"></apex:selectOption> <apex:actionSupport event="onchange" reRender="btnProceed" status="status" action="{!checkProceedToPay}"/> </apex:selectList> <apex:actionStatus id="status" startText="Loading..."/> </apex:outputPanel> <apex:outputPanel id="btnProceed"> <apex:commandButton value="Proceed to Pay" rendered="{!isDisabled}"/> </apex:outputPanel> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
public class testController{ public boolean isDisabled {get;set;} public String proceedYN {get; set;} public testController(){ isDisabled = true; } public void checkProceedToPay(){ if(proceedYN=='Yes'){ isDisabled = true; } else{ isDisabled = false; } } }
You can use below code for your reference:
Hope this will help you.
Please let me know if it helped or you need any more assistance.
Please mark this is as the solution if it solved your purpose.
Thanks,
Sohan Raj Gupta
All Answers
Follow below piece of code .
<apex:page standardController="Opportunity">
<apex:form >
<apex:pageBlock id="pBlock" title="New Opportunity" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
<apex:commandButton value="Won Notes" disabled="{!NOT(opportunity.StageName='Closed Won')}"/>
<apex:actionStatus id="rStatus" startText="Refreshing..."/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Stage"/>
<apex:actionRegion >
<apex:inputField value="{!opportunity.StageName}">
<apex:actionSupport event="onchange" reRender="pBlock" status="rStatus"/>
</apex:inputField>
</apex:actionRegion>
</apex:pageBlockSectionItem>
<apex:inputField value="{!opportunity.Probability}"/>
<apex:inputField value="{!opportunity.Name}"/>
<apex:inputField value="{!opportunity.CloseDate}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Regards,
Raja.
You can use below code for your reference:
Hope this will help you.
Please let me know if it helped or you need any more assistance.
Please mark this is as the solution if it solved your purpose.
Thanks,
Sohan Raj Gupta