+ Start a Discussion
Ken KoellnerKen Koellner 

apex:dynamicComponent in nested table/repeat

<apex:pageBlockTable value="{!accountWrapperList}" var="rowEntry">
  <apex:repeat value="{!columnList}" var = "colEntry">
     <apex:dymanicComponent value="{!myDynamicColumn}"/>

I'm trying to do something like the above where a pageBlockTable iterates over a list.  Then within the table, the columns are determined via another list that contains a data structure with some info on the column including the label in a String member and the API Name in another string member.  Then a dynamicComponent is included to generate the apex:column which will contain some more complex VF inside it.  (It would be a very lengthy discussion to explain why I want to do that so I'll skip it for now.)

I'm not sure what I'm trying to do can be accomplished.  For the value expression on the element that will contain the value, I think expression would have to be evalated twice.  First an explession needs to be evaluated to get the field name, then an expression is needed for the value.

It's as if what I woud want to code be someting that returns a Component.Apex.Column and either that column or an element within that column would have an element equivelent to --
expressions.value = "{!rowEntry.{!colEntry.apiName}}"
But obviously that makes no sense.

I can't think of anyway to code a getter for the dynamic component I want in this scenario. 

Anyone that has any ideas, feel free to chime in.

Ifeanyi Agu 6Ifeanyi Agu 6
I have a similar issue. Patiently waiting for a solution
krupananda reddykrupananda reddy
I think the above URL can help you folks .