Find your content:

Search form

You are here

Can a variable be passed to an apex:repeat

 
Share

In a recent answer I made an assumption that a variable could be passed to an <apex:repeat>. Once I went back and tested I was unable to do this and now I would like to ask the massed knowledge of SFSE if there is a solution to this?

Question: Is there a way to pass a variable into the get function used in an <apex:repeat value="{!myFunction}" var="myOutputVar">

Reference: Splitting up an apex:repeat alphabetically


Attribution to: Jon Hazan

Possible Suggestion/Solution #1

It's not possible to pass a value to a getter.

In the past I did some research in this area and it seems getter methods get executed exactly once and are then cached in the background so if your VF page calls the same getter twice, it will simply receive the data from the first execution and the getter code will not be executed again.


Attribution to: iwerstler
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1507

My Block Status

My Block Content