O'Reilly logo

Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition by Jason Ouellette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dynamic Field References

Dynamic field references are designed for situations in which you need to be flexible about which field to render. Ordinary field references are found in Visualforce components and determine their relationship to the controller. For example, an outputText component with content {!project.Name} renders the Name field of the object named project in the controller. The equivalent dynamic field reference is {!project[field]}, where field is a String value containing the name of the field to display.

The data referenced by a dynamic field reference must be available at runtime or an error will occur. If you’re using a standard controller, call the method addFields to notify the controller about new fields if possible, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required