+ Start a Discussion
subodh chaturvedi 17subodh chaturvedi 17 

How to Put the Header in vf page ,Data is coming from Wrapper class where Data is coming from a single Multiselect Picklist field in Account & also want to filter the Columns values based on Header name

Hello all,
In My account Record I have a multi select picklist field  which have values & in the same detail page i have a custom button so while clicking on that button  a new Vf page will Open which have all the Values of multiselect picklist with checkbox for that wrapper class is written  , My requirement Is i want to show the header  in 4 columns  & filter the values based on header  from Multiselect values (A,B,C,D suppose is the header name  these are not Fields )   how to set the header     

vf code
<apex:page standardController="Account" extensions="SolutionParticipationCategoryController" sidebar="False" > 
   <apex:form >
   <apex:sectionHeader title="Account" subtitle="Key Solutions Inventory "/>
       <apex:pageBlock >
       <apex:pageBlockbuttons >
       <apex:commandButton value="Open Account" action="{!OpenAccount}"/>
        <apex:pageBlockSection columns="3">
        <apex:repeat value="{!PicklistValues}" var="wrapper">     
            <apex:outputPanel layout="block" style="width:100%;float: left;">
                <apex:panelGrid columns="2">
                     <apex:commandLink id="theLink" action="{!solutionList}" target="_blank">
                        <apex:param assignTo="{!solName}" value="{!wrapper.value}" name="solName"/>
                        <apex:inputCheckbox value="{!wrapper.isSelected}" disabled="true"/> 
                        <apex:outputText value="{!wrapper.value}">                            
public with sharing class SolutionParticipationCategoryController 
    public Id acctId{get;set;}
    public String solName{get;set;}
    public Set<String> CategorySelected{get;set;}    
    public SolutionParticipationCategoryController(ApexPages.StandardController stdController) 
        acctId = ApexPages.currentPage().getParameters().get('id');
        System.debug('In Const-->');
        CategorySelected = new Set<String>();
    public class PicklistWrapper {
        public String value {get;set;}
        public Boolean isSelected {get;set;}
        public PicklistWrapper(String value, Boolean isSelected) {
            this.value = value;
            this.isSelected = isSelected;
     public List<PicklistWrapper> getPicklistValues() 
       List<PicklistWrapper> picklistValues = new List<PicklistWrapper>();
       Account a = [SELECT Solution_Participation_Category__c FROM Account WHERE Id =: acctId limit 1];
       if(a.Solution_Participation_Category__c != null)
        Schema.DescribeFieldResult fieldResult = Account.Solution_Participation_Category__c.getDescribe();
        List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        for( Schema.PicklistEntry f : ple)
                   picklistValues.add(new PicklistWrapper(f.getLabel(), true));
                   picklistValues.add(new PicklistWrapper(f.getLabel(), false));          
        return picklistValues;
    public PageReference solutionList()
        PageReference solutionList = new Pagereference('/apex/SolutionList');
        solutionList.getParameters().put('Id', acctId);
        solutionList.getParameters().put('solName', solName);
        return solutionList;      
    public PageReference OpenAccount() 
        Pagereference acc = new Pagereference('/'+acctId);
        return acc;