We need to have specific design upfront on how we can prepare the data and it will dynamically consider rowspan and format the rows accordingly in Visualforce.
For the sake of simplicity I am using Salesforce Contact record to prepare and display those.
Approach in Apex Controller to prepare data
1) Create a ContactWrapper with all the Contact attributes.
getData()method, retrieve the Contact List firing SOQL query and prepare the desired map i.e. mapModule which contains ModuleName as Key and
List<ContactWrapper>. In that method, prepare a List of ModuleNames from
Approach in Visualforce to display data
1) First, repeat through
moduleListwhich contains all the Module Name as key.
2) To determine,
td rowspanget the size by
3) Create an inner repeat which has List of ContactWrapper which we can easily retrieve by
At my DE, it is showing like this.
To get a help on how to use rowspan in HTML, refer td row span
Overall, it's look like a easy to implement functionality but until and unless we make our hands dirty in writing logic, we cant release whats the pain in developing this.
But, it's a charm, working on this type of requirements.