You need to sign in to do that
Don't have an account?

Simple page on force.com site example NOTdisplaying data
I'm only getting column headers but no data.
The page looks like this:
Customer Conversion Challenge
Name Contact File Number Non Directing Date
page:
<apex:page controller="CustomerChallengeController2">
<apex:form >
<apex:pageBlock title="Customer Conversion Challenge">
<apex:pageBlockTable value="{!chall}" var="c">
<apex:column headervalue="Name" value="{!c.Name}"/>
<apex:column headervalue="Contact" value="{!c.Contact__r.Name}" />
<apex:column headervalue="File Number" value="{!c.File_Number_Non_Directing__c}" />
<apex:column headervalue="Non Directing Date" value="{!c.Transaction_Date_Non_Directing__c}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
controller:
public with sharing class CustomerChallengeController2
{
public list<CustomerChallenge__c> chall{get;set;}
public list<CustomerChallenge__c> CustomerChallengeController2()
{
if(chall == null)
{
chall =
[SELECT Name, AIM_Branch__c, AIM_Division__c, Contact__c, File_Number_Directing__c, File_Number_Non_Directing__c, Transaction_Date_Directing__c, Transaction_Date_Non_Directing__c
FROM CustomerChallenge__c];
}
return chall;
}
}
The page looks like this:
Customer Conversion Challenge
Name Contact File Number Non Directing Date
page:
<apex:page controller="CustomerChallengeController2">
<apex:form >
<apex:pageBlock title="Customer Conversion Challenge">
<apex:pageBlockTable value="{!chall}" var="c">
<apex:column headervalue="Name" value="{!c.Name}"/>
<apex:column headervalue="Contact" value="{!c.Contact__r.Name}" />
<apex:column headervalue="File Number" value="{!c.File_Number_Non_Directing__c}" />
<apex:column headervalue="Non Directing Date" value="{!c.Transaction_Date_Non_Directing__c}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
controller:
public with sharing class CustomerChallengeController2
{
public list<CustomerChallenge__c> chall{get;set;}
public list<CustomerChallenge__c> CustomerChallengeController2()
{
if(chall == null)
{
chall =
[SELECT Name, AIM_Branch__c, AIM_Division__c, Contact__c, File_Number_Directing__c, File_Number_Non_Directing__c, Transaction_Date_Directing__c, Transaction_Date_Non_Directing__c
FROM CustomerChallenge__c];
}
return chall;
}
}
I wrote a test class for the controller and it looks like the SOQL query is returning the correct number of rows (1) so maybe the issue is in the page?
Thanks for your feedback.
Chris