+ Start a Discussion

Newbie needs help with VF page!

I have 2 custom objects --- Class (parent) and Participants (join object between Contact and Class).  The class object contains fields ClassName and ClassDate.  I would like to allow the user to select a class name and/or enter a class date via input boxes at the top of the form, which will then display a (filtered) list of participants below. The user can then update any of the Participated checkboxes of all individuals who participated in the selected class (or classes, if only an input date was entered).


This is my first VF page.... can anyone offer any suggestions or point me to an easy-to-understand example?




Fairly challenging starting point! I'll throw out a couple thoughts and ideas.


Firstly, I don't fully understand your proposed use case. It sounds as though you want search inputs for class name and class date. When one or both of these is filled in, what happens? Do they see a list of all matching classes? Your discussion suggests that we just see a list of matching participants. Are the participants tagged in any way that shows which class or classes they participated in, if there are multiple classes? Do you want to suppress duplicates if there are multiple instances of the same person? Were you thinkking of some kind of grouped display, where the participants are organized by class?


Once the list is there, what can we do with it? It sounds like you want a checkbox, and I guess if that got turned off, that person would no longer be participating in that class. But how would you ADD a participant to the class using this UI?


Again, this is probably a somewhat compex VF page so I'd stronly encourage you to really clarify the intended behaviors first. Sounds like at a minimum you may want to learn about the AJAX-driven 'rerender' attribute, and you may need to delve into some of the techniques for adding checkboxes to entries and bulk-processing them. All doable, but each bit adds complexity.


Hope this helps somewhat.