• Ifeanyi Agu 6
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 1
    Replies
<apex:pageBlockTable value="{!accountWrapperList}" var="rowEntry">
  <apex:repeat value="{!columnList}" var = "colEntry">
     <apex:dymanicComponent value="{!myDynamicColumn}"/>
  </apex:repeat>
</apex:pageBlockTable>

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.


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

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.