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

How to use Map in VF page using repeat tag

Hi Friends,


I have requirement like i need to repeat a list to show the label of the field in front end

While user select the field and save the data, only the api name of the field should get stored in DB.




List<String> fieldList = new List<String>(); 

 Map<String, Schema.SObjectField> fMap = Schema.SObjectType.Account.fields.getMap();
         List<Schema.SObjectField> fTokens = fMap.values() ;

            for( Integer i = 0 ; i < fTokens.size() ; i++ )
                     Schema.DescribeFieldResult f = fTokens.get(i).getDescribe();
                     if( f.isAccessible())  { 





VF Page:



 <apex:repeat value="{!matrix}" var="r" id="segId2">
            <td width="10%">
                 <apex:repeat value="{!r}" var="c" id="fldd">
                    <apex:inputCheckbox id="chk"  value="{!c}" onclick="return getValues(this,'{!$Component.fieldVal}','{!$Component.MarSeg}','{!$Component.hidd}');"/> <apex:outputLabel value="{!c}" id="fieldVal">
                    <br />

Here I need to use lable to display in the front end and while click save button i need to save button of the specific field into the DB.


Kindly suggest me a solution for this.

Any help is appreciated.





This is pathetic.  Yet add another cheap work around to the big list of things that should just work out of the box.


Please vote to fix this here