• Andrew Shakalov
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I have a problem: Unknown Property  'PencilsNBoxesController.Pensil_box__c'

Here is a code.

<apex:page controller="PencilsNBoxesController">
  <apex:form> 
    <apex:pageBlock title="Pencil List" id="Pencil_Box_list"> 

    <apex:pageBlockTable value="{!Pencil_Box__c}" var="pb"> 
      <apex:column value="{!pb.Name}"/> 
      <apex:column value="{!pb.CreatedBy}"/> 

    </apex:pageBlockTable> 
    </apex:pageBlock> 
  </apex:form> 
</apex:page>

Controller 

public class PencilsNBoxesController {
public class PencilBoxListController {
private String sortOrder = 'CreatedBy'; 
public List<Pencil_Box__c> getPencil() { 
List<Pencil_Box__c> results = Database.query( 
 'SELECT Id, Name, CreatedBy FROM Pencil_Box__c'); 
return results; 

}
}
I have a problem: Unknown Property  'PencilsNBoxesController.Pensil_box__c'

Here is a code.

<apex:page controller="PencilsNBoxesController">
  <apex:form> 
    <apex:pageBlock title="Pencil List" id="Pencil_Box_list"> 

    <apex:pageBlockTable value="{!Pencil_Box__c}" var="pb"> 
      <apex:column value="{!pb.Name}"/> 
      <apex:column value="{!pb.CreatedBy}"/> 

    </apex:pageBlockTable> 
    </apex:pageBlock> 
  </apex:form> 
</apex:page>

Controller 

public class PencilsNBoxesController {
public class PencilBoxListController {
private String sortOrder = 'CreatedBy'; 
public List<Pencil_Box__c> getPencil() { 
List<Pencil_Box__c> results = Database.query( 
 'SELECT Id, Name, CreatedBy FROM Pencil_Box__c'); 
return results; 

}
}