Adding an apex:selectList

The page shown above presents an interface to most of the fields in the old version of the Position__c object. You need to add a new field to take care of the new Position_Type__c field in the object.

For all of the previous fields, you were able to simply use the inputField component within a pageBlockSection. This combination allowed your Visualforce page to simply use all the defaults associated with the field definition—yet another example of the metadata driven quality of the entire Force Platform environment.

This default will use a lookup field for the Position_Type__c object, but you want to add a little more functionality. As you saw in the definition of the Position_Type__c object, a user should not be able ...

Get The Developer’s Guide to the Force.com Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.