I am trying to display fields and their vlues from salesforce fieldset in html table. I used the code below. I am not sure how to display the field values as I have a query in the constructor of the controller to get the required records.
I tried the below within the td
tag and repeat
tag
<table id="freeze-table">
<tr>
<apex:repeat var="f" value="{!$ObjectType.Adpub__c.FieldSets.checkfieldset}">
<th>
<apex:outputText styleClass="bold" value="{!$ObjectType.Adpub__c.Fields[f].label}"/>
</th>
</apex:repeat>
</tr>
<tr>
<apex:repeat var="f" value="{!$ObjectType.Adpub__c.FieldSets.checkfieldset}">
<!-- <td>
<apex:outputField value="{!adpubs.[f.fieldpath]}" />
</td> -->
</apex:repeat>
</tr>
</table>
Where abclist will contain the queried records.
I received the error message
"Error: Incorrect parameter type for subscript. Expected Number, received Text"
apex:repeat
section would be helpful