You need to sign in to do that
Don't have an account?
Sammy7
Unknown property 'VisualforceArrayLisy.description'
Hi,
Im new to visualforce and Im trying to understand why I cant iterate through the quote line items using the apex:repeat tag in the below SOQL:
Im new to visualforce and Im trying to understand why I cant iterate through the quote line items using the apex:repeat tag in the below SOQL:
<apex:page controller="myquote" showHeader="false" sidebar="false" > <apex:stylesheet value="{!URLFOR($Resource.advancedpdfresource, 'qstyles.css')}"/> <apex:repeat value="{!quote}" var="qli"> <apex:dataTable value="{!qli}" var="q" > <apex:column style="border: 1px"> <apex:facet name="header">Quote Line Item</apex:facet> <apex:outputText value="{!q.quotelineitems.description}"/> </apex:column> </apex:dataTable> </apex:repeat> </apex:page> <!----Controller-----> public class myquote { List <Quote> quote= [Select id, name, BillingAddress, BillingName, quotenumber,(SELECT id, Description, ListPrice, PricebookEntry.name, PricebookEntry.ProductCode, TotalPrice, Quantity FROM quotelineitems) from QUOTE WHERE id=: ApexPages.CurrentPage().Getparameters().get('id')]; public List<Quote> getquote () { return quote;} }
to iterate over child records you need to do this
<apex:repeat value="{!quote}" var="qli">
<apex:dataTable value="{!qli.quotelineitems}" var="q" >
Hope it helps
All Answers
to iterate over child records you need to do this
<apex:repeat value="{!quote}" var="qli">
<apex:dataTable value="{!qli.quotelineitems}" var="q" >
Hope it helps
The inner query returns list of all child quotelineitems.Since its a list you have to iterate over the list and cannot directly access it from outputText component,