I have a picklist in my VF page and have set an event.....based on the value that is picked i need to set a percentage field with some value which i think is not happeing....i'm sure there is something i'm missing and need help to fix it please?
my vf code:
<apex:inputfield value="{!Opportunity.StageName}" >
<apex:actionSupport id="oprstage" event="onchange" action="{!setProbability}" rerender="productInfo" immediate="TRUE" />
</apex:inputfield>
<apex:inputfield value="{!Opportunity.Day_Rate__c}" id="oprrate"/>
<apex:inputfield value="{!opr.Probability}" id="oprprob"/>
controller:
public with sharing class OpportunitySave {
public string probability {get;set;}
public Opportunity opr {get;set;}
public OpportunitySave(ApexPages.StandardController controller) {
}
public PageReference setProbability(){
if (Opportunity.StageName == 'Sign-off Deal')
opr.Probability = '30%';
return null;
}
}
since this is my first VF creation pls excuse me for any silly things done in the code or that i have missed