Skip to content

Instantly share code, notes, and snippets.

@sriniind19
Created May 4, 2018 07:28
Show Gist options
  • Select an option

  • Save sriniind19/8f29b2151a1a718a242ecf4cecf97fe0 to your computer and use it in GitHub Desktop.

Select an option

Save sriniind19/8f29b2151a1a718a242ecf4cecf97fe0 to your computer and use it in GitHub Desktop.
apex:variable and apex:pageBlockTable example
<apex:page standardController="obj__c" recordSetVar="records">
<apex:form>
<apex:pageblock title="Records">
<apex:variable var="count" value="{!1}"/>
<apex:pageblockTable value="{!records}" var="rec">
<apex:column headerValue="S.No">
{!count}
<apex:variable value="{!count+1}" var="count"/>
</apex:column>
<apex:column value="{!rec.A__c}"/>
<apex:column value="{!rec.B__c}"/>
<apex:column value="{!rec.C__c}"/>
</apex:pageblockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment