public class SelectOptionController { //String public String getSelectedValue {get; set;} public String bieCunFangDi {get; set;} public String bieBenBu {get; set;} //This method is to create a select option list for given Picklist Entries public static List getSelectOptionListByField() { //Describe field and create a list of select options List listOptions = new List(); //loop throough the picklist entries and populate select list for (Schema.PicklistEntry pE : Schema.getGlobalDescribe().get('Rental_Apply__c').getDescribe().fields.getMap().get('SalesdeptSelect__c').getDescribe().getPickListValues()) { //Populate the select list with values listOptions.add(new SelectOption(pE.getValue() , pE.getLabel())); } //Return list return listOptions; } //别存放地 SelectOption public List getbieCunFangDiOps() { //备品存放地(现在) List opList = FixtureUtil.bieCunFangDiOpsMap.get('备品管理中心'); return opList; } //别本部 SelectOption public List getbieBenBuOps() { //所在地区(本部) 现在 // return FixtureUtil.bieBenBuOpsMap.get(sonObj.Salesdepartment__c); List opList; if (String.isBlank(bieCunFangDi)) { opList = FixtureUtil.bieBenBuOpsMap.get('All'); } else { opList = FixtureUtil.bieBenBuOpsMap.get(bieCunFangDi); } return opList; } }