function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Leon SolleveldLeon 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];
Nayana KNayana 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