You need to sign in to do that
Don't have an account?
PawelW
How to make Picklist (Multi-Select)? Checkbox defaul select.
I would like to use Picklist (Multi-Select) in Salesforce way (unselected on left selected on right) with my own values on visualforce page. How to build this kind of list?
Second:
Now I have group of checkboxes with my values but can't find the way how to set few of them an already checked?
I have varible String selectedCheckedBoxes with contains names of options. How to combine this string with checkboxes?
Page checkbox:
Controller:
public List getItems() {
List options = new List();
options.add(new SelectOption('Automotive','Automotive'));
options.add(new SelectOption('Consumer & Retail','Consumer & Retail'));
options.add(new SelectOption('Technology','Technology'));
options.add(new SelectOption('Industrial','Industrial'));
options.add(new SelectOption('Health Care','Health Care'));
options.add(new SelectOption('Aerospace','Aerospace'));
options.add(new SelectOption('Publishing / Media','Publishing / Media'));
options.add(new SelectOption('Energy','Energy'));
options.add(new SelectOption('Other','Other'));
return options;
}
Message Edited by PawelW on 07-25-2008 03:21 AM
Second:
Now I have group of checkboxes with my values but can't find the way how to set few of them an already checked?
I have varible String selectedCheckedBoxes with contains names of options. How to combine this string with checkboxes?
Page checkbox:
Controller:
public List getItems() {
List options = new List();
options.add(new SelectOption('Automotive','Automotive'));
options.add(new SelectOption('Consumer & Retail','Consumer & Retail'));
options.add(new SelectOption('Technology','Technology'));
options.add(new SelectOption('Industrial','Industrial'));
options.add(new SelectOption('Health Care','Health Care'));
options.add(new SelectOption('Aerospace','Aerospace'));
options.add(new SelectOption('Publishing / Media','Publishing / Media'));
options.add(new SelectOption('Energy','Energy'));
options.add(new SelectOption('Other','Other'));
return options;
}
Message Edited by PawelW on 07-25-2008 03:21 AM
there is no native multi-select picklist component, this is a good idea for the idea exchange. You can also use a mulit-select field on a custom or standard object, then use inputField on your page to draw that picklist.