I am new to Salesforce and trying to make a new VF page. I have three custom objects:

  1. Students (list of students)
  2. Course Details (course time, start date, room, etc.)
  3. Student Course Detail Junction Object - so i can have a many to many relationship

I want to create a VF page where I can choose student and assign multiple course details to that one student, all on the same page.

I've found a custom controller that basically is a multiselect controller.

I want a picklist on the top of the page that has the Student names as options.

What do I need to do to have both controllers on one page? Can someone point me in the right direction?

  • The heading seems incorrect, you are trying to include 2 multi select picklist on a single page. Controller refers to a class which controls the logic/processing of functionality.
    – Dave
    Jul 25, 2015 at 17:30

1 Answer 1


Through the junction object, once a student is selected, you should have access to all of the available courses related to the student. You're talking about two separate picklists. The first is a single picklist where you select a student.

The second sounds like a multiselect where you'd select the courses you wanted for that student. That said, you might want to break that up to where you could select one course at a time to add to a list. Each course might be offered at more than one different time, thus you might have what's called a dependent picklist where once you selected a course, you'd then select the time it's offered. The entire block of picklists would all need to be nested inside of an <apex:form> tag.

I highly recommend you look at the following resources: I recommend the following resources Visualforce Workbook, the Visualforce Developer’s Guide and Visualforce in Practice. Also, don't forget to visit Trailhead and try out the VisualForce module you'll find there as well as an additional learning resource.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .