So this is i donw so far, In this pick list there is two value like active,new. I want to set this both option as pre select by default.
Visua force page
<tr>
<td style="font-weight:bold;">Property Status<br/>
<apex:selectList id="status" size="8" style=" max-height: 250px !important;overflow-y: scroll !important;" multiselect="true" value="{!test7}" onchange="updatebnk7(this.value)" >
<apex:selectOption itemValue="no" itemLabel=" "/>
<apex:selectOptions value="{!status}" />
<apex:actionSupport event="onchange" reRender="results" />
</apex:selectList>
<apex:actionFunction name="updte7" action="{!check7}">
<apex:param assignTo="{!test7}" value="val" name="current"/>
</apex:actionFunction>
</td>
</tr>
Apex controller
public list<SelectOption> status{
get {
Schema.DescribeFieldResult field = REOHQ__REOHQ_Property__c.REOHQ__REOHQ_Property_Status__c.getDescribe();
List<Schema.PicklistEntry> ple = field.getPicklistValues();
for( Schema.PicklistEntry f : ple){
if(n != 1){
optn4.add(new selectOption(f.getValue(),f.getLabel()));
}
}
return optn4;
}
set;
}
updatebnk7
a method in your controller? You have this set for a multi-select list, yet one value is "Active" and the other is "Deactive". Can you actually have "both" conditions at the same time without a conflict? Off-hand, that doesn't seem wise or appropriate considering the values. In general though, the answer would be to set them in your controller extension or custom controller that you're using. – crmprogdev Apr 5 '16 at 16:45