I have an component which will display all opportunity records created today and whose amount is greater than 50000.
I am not able to see any data when I preview the visualforce page.
controller code:
public String accID{get;set;}
public List<Opportunity> oppList{get;set;}
public List<Opportunity> getoppList()
{
if (oppList == NULL)
{
accID=ApexPages.currentPage().getParameters().get('ID');
oppList=[select Name,Account.Name,StageName,Amount,CloseDate from
Opportunity
where
AccountID=:accID;
AND
Amount >= 50000
LIMIT 10000];
}
return oppList;
}
The component is as follows:
<apex:component controller="acctTemplate"
access="global">
<apex:attribute assignTo="{!accID}"
name="AccountID"
description="ID of the Account"
type="String"/>
<apex:repeat value="{!oppList}"
var="opp">
<tr>
<td>{!opp.Name}</td>
<td>{!opp.Account.Name}</td>
</apexrepeat>
I am calling this component inside as visualforce page as follows:
<apex:page sidebar="false">
<c:opptylist></c:opptylist>
</apex:page>