I am unable to display multiselect picklist values using bootstrap library.Can anyone check wht wrong i am doing.
Below is the class and vf page -
Class -
public class testcon {
public string check {get;set;}
public Product2 changer{get;set;}
public testcon(ApexPages.StandardController controller) {
this.changer = (Product2)controller.getRecord();
}
public List<selectOption> getPax() {
List<selectOption> options = new List<selectOption>();
String fullName;
for (Product2 p : [SELECT Id,Name from Product2 ]) {
fullName = p.Name;
options.add(new selectOption(fullName, fullName));
}
return options;
}
}
Vf page -
<apex:page standardstylesheets="false" showHeader="true" extensions="testcon" standardController="Product2">
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<html>
<head>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" />
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://davidstutz.github.io/bootstrap-multiselect/dist/js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="https://davidstutz.github.io/bootstrap-multiselect/dist/css/bootstrap-multiselect.css" type="text/css"/>
<meta charset="utf-8"/>
</head>
<apex:form>
<select id="example-multiple-selected" multiple="multiple" >
<apex:repeat value="{!changer.Name}" var="stage">
<option value="{!pax}">{!pax}</option>
</apex:repeat>
</select>
<script type="text/javascript">
$('#example-multiple-selected').multiselect();
</script>
</apex:form>
</html>
</apex:page>
Regards