function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Force.platformForce.platform 

display data on vf

Hello All.
   i want to display record on vf using pageblocktable:
vf page:
<apex:page controller="EComm_Bucket_Controller" >
<apex:form >
  <apex:pageBlock title="My Bucket" >
  <apex:pageblockSection >
  <apex:pageBlockTable value="{!itemInBucket}" var="i">
    <apex:column value="{!i.name}"/>
    <apex:column value="{!i.Product_Name__c}"/>
  </apex:pageBlockTable> 
  </apex:pageblockSection> 
  </apex:pageBlock>
  <apex:commandLink value="Previous Page" style="float:right;" action="{!redirect}"/>
  </apex:form>
</apex:page>

Controller:
public class EComm_Bucket_Controller 
{  
Public List<EOrder_Item__c> itemInBucket{get; set;}

  public pageReference itemInMyBucket()
  {
     itemInBucket=[select id, Quantity__C,Product_Name__c from EOrder_Item__c];
     System.debug('list=='+itemInBucket);
     return null;
  }

 public PageReference redirect()
    {
   PageReference pr = new PageReference('/apex/EComm_Landing_Page');
   return pr;
   }
}
but it is not showing any table or data on vf.
Balayesu ChilakalapudiBalayesu Chilakalapudi
Add name field to your query. it will be like
[select id, Name,Quantity__C,Product_Name__c from EOrder_Item__c];