You need to sign in to do that
Don't have an account?
dsh210@lehigh.edu
Using <apex:repeat> to create dynamic columns
Hey all,
What I am trying to do here is create dynamic columns based on some attributes. However, I am getting a complaint that <apex:column> needs to be the direct child of <apex:pageTable>. Is there any way I can get those columns to repeat through the object's attributes? I found one solution that uses standard HTML <table>'s, etc, but that loses all the SF formatting, which is very important on this project.
Here is what I was trying:
<apex:repeat value="{!AttrDefs}" var="attr"> <apex:column> <apex:facet name="header">
<apex:outputLabel value="{!attr.Name}"/>
</apex:facet> <apex:inputText value="{!row.col1}" /> </apex:column> </apex:repeat>
Thanks for suggestions!
Unfortunately, it still throws the same direct child error:
Post all your code. (And look at the heaverValue atribute on apex:column which might be used instead of your header facet.
This isn't going to be possible today. We are working on supporting this (as well as some other features to support "dynamic binding") for the Winter '11 release. Stay tuned...
...stephan
Doesn't look like this made it in Winter 11. So.....how about Spring 11, pretty please. :-D
Unfortunately we couldn't get this to GA for Winter '11. We are making it avaialble selectively as a pilot feature, however. After the Winter '11 release, feel free to contact me and I'll see what I can do.
Any updates ? We are maintaining a bunch of very hard to maintain code just because of this