Ajax (1) Apex Class (12) Apex Trigger (2) Community (2) Home Page (1) HTML (4) Integration (3) JS (7) KB (1) Label (1) Licenses (1) Listing (1) Log (1) OOPs (5) Sharing (1) Static Resource (1) Test Class (3) URI (1) Visualforce (10)

Tuesday 4 March 2014

Drop Down List

 <apex:selectList size="1">
         <apex:selectOptions value="{!UserList}"></apex:selectOptions>
      </apex:selectList>
-------------------------------------------------------------------
public List<SelectOption> getUserList() {
       List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('US','US'));
        options.add(new SelectOption('CANADA','Canada'));
        options.add(new SelectOption('MEXICO','Mexico'));

        return options;
   
    }

No comments:

Post a Comment