function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lucky29Lucky29 

map with vf page

Hi,
I am having small problem with map collection class.


Sample code :

controller name  : cntrl

maps<id,CustomObject__c> map =new maps<id,CustomObject__c>();
                  //some code

public maps<id,CustomObject__c> getmap()
{

for(CustomObject__c  ojb : [select id ,name , email from CustomObject__c])
              //some code

map.put(obj.id,ojb)


}


apex 

<apex:page standardcontroller="contact" controller="cntrl >

//some code

<apex:repeat value="{!map}" var="tst">
.
..
.
.
.
</apex:repeat>

Now what i need is ...I want to fetch all the value from the map in apex:repeat section...like obj.name and obj.email of custom object..
so can any one help on this ..


thanks
Sumitkumar_ShingaviSumitkumar_Shingavi
So, just use below syntax inside your apex:repeat tag for input/output of specific fields like below
<apex:inputField value="{!map[tst].Name}" />

PS: if this answers your question then hit Like and mark it as solution!