function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kabukabu 

standard Picklist selection with call a controller method

Hi I want to display a picklist on VFpage and call a contrpoller method to refresh part of the VF page.
Suppose Lead.Status selection I wanted to call a controller extension
How can I do that?

Please send me some code to acheive this.
Sonam_SFDCSonam_SFDC
Hi,

YOu can use the apex:selectList and apex:selectOptions to acheive the stated requirement where you can select an option from a drop down and pass the selected value to a method in a controller :

the below link has sample code snippet which will give you an idea as to how to begin with :
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_selectList.htm
kabukabu
public pagereference refreshData() {
   //code to load data

     return null;
    }
on VF Page I am writing

<!-- apex:pageBlockSection >
                <apex:inputField value="{!Lead.Status}" id="vehstate">
                 <apex:actionSupport event="onchange"  action="{!refreshData}"  rerender="myopties"/>
                 </apex:inputField>
            </apex:pageBlockSection-->

This does not work I get the dropdown but it does not help