Page Layouts

A Visualforce page can be embedded in an object’s page layout alongside its fields. Figure 6.9 shows a new section called My Section, defined using the page layout editor. My Page is the name of a Visualforce page that has been dragged into My Section and is now visible whenever a record of that object is viewed or edited.

Image

Figure 6.9 Adding a Visualforce page to page layout

The result of adding the Visualforce page called My Page to the layout for the Contact object is shown in Figure 6.10. The text “Hello Visualforce” is being rendered by the Visualforce page embedded within the record’s detail page.

Image

Figure 6.10 Embedded Visualforce page

To add a Visualforce page to a page layout, go to the App Setup area and click Create, Objects and select the object. Scroll to the Page Layouts section and click the Edit link for the page layout. For your Visualforce pages to appear in the page layout editor, they must conform to the following guidelines:

Image They cannot already be in use by a tab.

Image They use a standard, single record controller, with or without extensions.

Image Their controller’s object type matches that used by the page layout. For example, for a Visualforce page to appear on the Contact page layout, it must use a standard Contact controller.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.145.2