Type 6:Usage of Multi select Dependent picklist in vf & Apex

Dependent MultiSelect PickList

<apex:page controller="dependentone" sidebar="false" showHeader="false">
  <apex:form >
     <b> Dependent MultiSelect PickList</b>
     Select The Picklist Value(s):
    <apex:selectList value="{!myVal}" size="2" multiselect="true" title="Select The Picklist Value(s)">
       <apex:selectOption itemvalue="1s" itemlabel="Ones"/>
       <apex:selectOption itemvalue="2s" itemlabel="Twos"/>
       <apex:selectOption itemvalue="3s" itemlabel="Threes"/>
       <apex:selectOption itemvalue="4s" itemlabel="Fours"/>
       <apex:selectOption itemvalue="5s" itemlabel="Fives"/>
       <apex:actionSupport event="onchange" reRender="one"/>
   <apex:outputpanel id="one"> 
     <b>The selected value(s) are: </b>
      <apex:selectList size="1" value="{!selectedDepval}" >
        <apex:selectOptions value="{!depval}"/>

Apex Code/Controller:

public class dependentone {
public String selecteddepval { get; set; }
public String myVal { get; set; }
 public List<SelectOption> getdepval() {
 List<SelectOption> options = new List<SelectOption>();
 return null;
 options.add(new SelectOption('One','1'));
 options.add(new SelectOption('Two','2'));
 options.add(new SelectOption('Three','3'));
 options.add(new SelectOption('Four','4'));
 options.add(new SelectOption('Five','5'));

 options.add(new SelectOption('Ten','10'));
 options.add(new SelectOption('Twenty','20'));
 options.add(new SelectOption('Thirty','30'));
 options.add(new SelectOption('Fourty','40'));
 options.add(new SelectOption('Fifty','50'));
 options.add(new SelectOption('One Hundreed','100'));
 options.add(new SelectOption('Two Hundreed','200'));
 options.add(new SelectOption('Three Hundreed','300'));
 options.add(new SelectOption('Four Hundreed','400'));
 options.add(new SelectOption('Five Hundreed','500'));
 options.add(new SelectOption('One Thousand','1000'));
 options.add(new SelectOption('Two Thousand','2000'));
 options.add(new SelectOption('Three Thousand','3000'));
 options.add(new SelectOption('Four Thousand','4000'));
 options.add(new SelectOption('Five Thousand','5000'));
 options.add(new SelectOption('Ten Thousand','1000'));
 options.add(new SelectOption('Twenty Thousand','2000'));
 options.add(new SelectOption('Thrty Thousand','3000'));
 options.add(new SelectOption('Fourty Thousand','400,00'));
 options.add(new SelectOption('Fivty Thousand','500,00'));
 return options;

Type 6:Usage of Multi select Dependent picklist in vf & Apex

Type 6:Usage of Multi select Dependent picklist in vf & Apex


One thought on “Type 6:Usage of Multi select Dependent picklist in vf & Apex

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s