• yibong
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
We have a "Add Product" button in the related list of Opportunity Product in Opportunity Tab.
I want to use this button component in other visual force page.

in the standard controller of OpportunityLineItem, componet doesn't work.

Is there any way to use this component?

thanks.
I have "Tender" object as a child for opportunity. Tender again has versions as a child.

I wanted to create VF section in opp detail page that shows a table of all Tenders and Tenders' versions.

I build a opportunity controller extension that queries the Versions. The query is:

Code:
...

public List<FL_Tender__c> getTenders() {
  if(tenders == null) tenders = [select name, (select name, active__c from Versions__r) from FL_Tender__c];
  return tenders;
 }

...

 This class at least saves ok. But when I try to create the table in my VF page with following code:
Code:
<apex:page standardController="Opportunity" showHeader="true" tabStyle="Opportunity" extensions="TenderSectionTableController" >

<apex:dataTable value="{!Tenders}" var="tender" id="theTable" rowClasses="odd,even" styleClass="tableClass">
  <apex:facet name="header">Tenders & Versions</apex:facet>
  <apex:column>
      <apex:facet name="header">FL Tender</apex:facet>
   <apex:outputText value="{!tender.Name}"/>
  </apex:column>
  <apex:column>
   <apex:facet name="header">Version</apex:facet>
   <apex:outputText value="{!tender.Versions__r.Name}"/>
  </apex:column>
 </apex:dataTable>

</apex:page>

I get save error:
Save error: The class 'java.util.ArrayList' does not have the property 'Name'.   

I am not sure how to utilize these fields in VF that I get in Parent - Child SOQL query in my apex controller. Any advice?

 


  • June 08, 2008
  • Like
  • 0