You need to sign in to do that
Don't have an account?
Error: Unknown property 'VisualforceArrayList.Name'
Hi I have added a apex controller to my vf page in which I am trying to return a list of a related objects that I am then going to display in the vf page in a apex:datatable. I'm able to create the controller extension no problem but when I view the vf page I get this error:
Error: Unknown property 'VisualforceArrayList.Name'
Apex Code:
public class event_session {
private SBS_Event__c sbs_event;
public event_session(ApexPages.StandardController controller) {
this.sbs_event =
(sbs_event__c)controller.getRecord();
}
List<event_sessions__c> event_session = new List<event_sessions__c>();
public List<event_sessions__c> EventSession {
get{
event_session = [Select e.Lecture_Event_Period__c, e.Name from Event_Sessions__c e Where e.SBS_Event__c = :sbs_event.id Order by e.CreatedDate];
return event_session;
}
}
}
//vf fragment<apex:page showHeader="false" standardController="SBS_Event__c" extensions="event_session" > <apex:composition template="StdOCEITemplate" > <apex:define name="pagebody"> <apex:pageBlock title="Event Registration Form"> <apex:form > <table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <th width="20%" scope="col"> </th> <th width="80%" scope="col"> </th> </tr> <tr> <th scope="row" style="">Event:</th> <td style="text-align:left;padding-left:10px;"><strong>{!SBS_Event__c.name}</strong></td> </tr>
All Answers
Hi, this was not really a helpfull reply, but a good Question.
The error Message is very confusing, because there is no hint what and where the error could be.
I had the same Problem..
I had the Situation, that I created two Relationsships to the Contact Class, one call Contact, the other called ReportsTo.
So the Statement: [SELECT contact__r.name, reportsTo.name FROM MyObject ...]
was the Problem. The Apex class compiles very well, but when you try to compile a page which accesses this controller, you get this
missleading und not helpfull Error Message.
I'm new to force.com and I know this ist no the Solution but the reason for the message.
I'm still perplexed by this Unknown Property error. I can't resolve it either:
Apex:
Page:
Hi.
Your didi many mistic in class..first mistic is Object name wrong when your r wrting a query in SOQL specify the variable frist