In regards to my previous question, my actual implementation is to Search contacts and display in the form of Wrapper records (have a checkbox next to each contact to select a few for further processing).
I am trying to convert this List of Wrapper records to a map, so that I can overcome the 1000 rows in List collection variable for <pageBlockTable>
.
Apex:
if(!contWrapperList.isEmpty()){
contWrapperMap = new Map<Boolean, Contact>();
for(contWrapperList conWrapItem: contWrapperList){
conWrapperMap.put(conWrapItem.selected, conWrapItem.con);
}
}
This new map would be of waste of time as I cannot get all the items into it. Thanks to no-duplicate-record policy from Map. So now, how can I get my list contWrapperList
records into a Map, and use at <pageBlockTable>
. So I am not using this map at all.
Visualforce:
<apex:pageBlockTable value="{!contWrapperList}" var="c" id="table">
<apex:column >
<apex:inputCheckbox value="{!c.selected}" id="inputId"/>
</apex:column>
<apex:column headerValue="Contact Id">
<apex:outputLink value="/{!c.con.Id}"><apex:outputField value="{!c.con.Id}" /></apex:outputLink>
</apex:column>
</apex:pageBlockTable>