• Kevin Ryan
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I'm working through the Force.com tutorials and i'm tutorial 7 and everything has worked fine so far but on this tutorial i can't get the data table to populate. Can anybody help me out or point me in the right direction? Thanks

 

<apex:page standardStylesheets="false" showHeader="false" sidebar="false" standardController="Merchandise__c" recordSetVar="products">

<apex:stylesheet value="{!URLFOR($Resource.Styles, 'styles.css')}" />
 
<h1>Inventory Count Sheet</h1>
<apex:form >
   <apex:dataTable value="{!products}" var="pitem" rowClasses="odd,even">
   <apex:column headerValue="Product">
      <apex:outputText value="{!pitem.name}"/>
   </apex:column>
   <apex:column headerValue="Inventory">
   <apex:outputField value="{!pitem.Total_Inventory__c}"/>
   </apex:column>
   <apex:column headerValue="Physical Count">
   <apex:inputField value="{!pitem.Total_Inventory__c}"/>
   </apex:column>
</apex:dataTable>

<br/>
<apex:commandButton action="{!quicksave}"  value="Update Counts" />

<apex:commandLink action="{!next}" value="Next" rendered="{!hasNext}" />

</apex:form>

</apex:page>

I'm working through the Force.com tutorials and i'm tutorial 7 and everything has worked fine so far but on this tutorial i can't get the data table to populate. Can anybody help me out or point me in the right direction? Thanks

 

<apex:page standardStylesheets="false" showHeader="false" sidebar="false" standardController="Merchandise__c" recordSetVar="products">

<apex:stylesheet value="{!URLFOR($Resource.Styles, 'styles.css')}" />
 
<h1>Inventory Count Sheet</h1>
<apex:form >
   <apex:dataTable value="{!products}" var="pitem" rowClasses="odd,even">
   <apex:column headerValue="Product">
      <apex:outputText value="{!pitem.name}"/>
   </apex:column>
   <apex:column headerValue="Inventory">
   <apex:outputField value="{!pitem.Total_Inventory__c}"/>
   </apex:column>
   <apex:column headerValue="Physical Count">
   <apex:inputField value="{!pitem.Total_Inventory__c}"/>
   </apex:column>
</apex:dataTable>

<br/>
<apex:commandButton action="{!quicksave}"  value="Update Counts" />

<apex:commandLink action="{!next}" value="Next" rendered="{!hasNext}" />

</apex:form>

</apex:page>