Hi My situation is this:
I have a list of different objects and every object has different fields, How can I create N Different Tables in a visualforce page ??
Example.
I have this list in an apex class controller
ObjectName----FieldName <br>
Account---------Name<br>
Account---------LastName<br>
Account---------address<br>
Case------------Name<br>
Case------------Status<br>
So, with this info I have to display two different tables in a visualforce page like this:
Account table<br>
Name----LastName----Address
Case Table<br>
Name----Status
In my project I may have even 10 different objects so, I would need 10 different tables created by themself in the visualforce, with different number of columns.
I have no Idea how to do this.. someone can help me and save my life???
Best Answer
One option would be to use Dynamic Visualforce Components to build up various apex:pageBlockTable in Apex. With this you can programmatically build up the required apex:column's and bindings.
Your Visualforce page will be something like:
With a backing Controller class: