You need to sign in to do that
Don't have an account?
Keithlars
Simple Visualforce page doesn't display data
I've followed the Chapter 9: Visualforce Pages and Data Sets example (p279) in Developer Guide, Advanced Programming Techniques for Cloud Computing and I'm trying to display contacts instead of Job Applicants in code below:
<apex:page standardController="Contact"
recordSetVar="Contacts" tabstyle="Contact">
<apex:pageBlock id="thePageBlock">
<apex:pageblocktable value="{!Contact}" var="AC" id="acTable">
<apex:column value="{!AC.firstName}"/>
<apex:column value="{!AC.Department}"/>
<apex:column value="{!AC.Title}"/>
<apex:column headerValue="Country" value="{!AC.MailingCountry}"/>
<apex:column value="{!AC.Account}"/>
</apex:pageblocktable>
</apex:pageBlock>
</apex:page>
However, no records are being displayed. I've completed the example which show me the record set so I know there is data, its just not being displayed. I strip out all that extra code to make it simple for debugging. Anyone know what I'm doing wrong?
<apex:page standardController="Contact"
recordSetVar="Contacts" tabstyle="Contact">
<apex:pageBlock id="thePageBlock">
<apex:pageblocktable value="{!Contact}" var="AC" id="acTable">
<apex:column value="{!AC.firstName}"/>
<apex:column value="{!AC.Department}"/>
<apex:column value="{!AC.Title}"/>
<apex:column headerValue="Country" value="{!AC.MailingCountry}"/>
<apex:column value="{!AC.Account}"/>
</apex:pageblocktable>
</apex:pageBlock>
</apex:page>
However, no records are being displayed. I've completed the example which show me the record set so I know there is data, its just not being displayed. I strip out all that extra code to make it simple for debugging. Anyone know what I'm doing wrong?
changed contacts to myContacts and put that into the value of the pageblock table
Keith
in your case you declared Contacts, and used Contact
so i wanted to make it clear that these line up , and changed both.
see the docs for standard set controller
the contacts visible are controlled by sharing, perhaps you have a sharing rule ?
check that filter also, the label may say all contacts but the filters may specify my Contacts, it's happened to me before.