function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Using Visualforce to represent Map<sObject, List<sObject>>

I've got myself a map like the following.

Map<Page1Task__c, List<Note__c>> this.taskNotes = new Map <Page1Task__c, List<Note__c>>();

 I'd like to represent one Page1Task and a few fields, followed by all of its notes and repeat for each PageTask sObject on a visualforce page. 


I found something similar to this, but I this won't work since I need to just iterate through each one and display it. Here's where I'm at now...



<apex:pageBlockTable id="results" value="{!taskNotes}" var="t" cellPadding="4" border="1">
        <apex:repeat value="{!taskNotes[t]}" var="n">
              <apex:column >



Can you display the List of notes as a selectlist?

if so, you can write code in controller to build a selectlist and have your VF page display that.... even having something like 4-5 lines displayed, and ignoring whatever line is selected.


...Just throwing something out there.



Here's what I ended up learning over the past week and made a visually-appealing VIsualforce application for my organization...


I used a wrapper class a la JimRae's excellent reply to this thread:


I was able to embed a pageblock table for my child object within a dataTable and make some buttons that apply to some reresh/save functions.