You need to sign in to do that
Don't have an account?
Leon Solleveld
Pass apex:repeat var to other apex:repeat
I would like to pass the variable 'company' to the second repeat function so i can use the variable in the second query of the controller. Is that possible?
<apex:repeat value="{!company }" var="co" >
<apex:variable value="{!co.Name__c}" var="comp" />
<apex:repeat value="{!customer}" var="cu" >
Class:
comp = ApexPages.currentPage().getParameters().get('comp');
company = [Select Name FROM Company];
customer = [Select Name FROM Customer where Company =:comp];
<apex:repeat value="{!company }" var="co" >
<apex:variable value="{!co.Name__c}" var="comp" />
<apex:repeat value="{!customer}" var="cu" >
Class:
comp = ApexPages.currentPage().getParameters().get('comp');
company = [Select Name FROM Company];
customer = [Select Name FROM Customer where Company =:comp];
Nayana K
Could you please explain more about the requirement? Seems like you just need wrapper class to hold each company + customers combination.. But not sure what exactly you are expecting