Visualforce Templates: Apex and Visualforce Controllers

Area of a Page with Template Content

Question

An area of a page that includes content from a second template page.

Template pages are Visualforce pages that include one or more <apex:insert> components.

The <apex:composition> component names the associated template, and provides body for the template's <apex:insert> components with matching <apex:define> components.

Any content outside of an <apex:composition> component is not rendered.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

The area of a page that includes content from a second template page is known as a page composition. To implement this functionality, Visualforce provides two components - apex:composition and apex:insert.

The apex:composition component is used to define the template page, which contains the common layout of the page, and the apex:insert component is used to include content from the second template page.

The apex:composition component includes one or more apex:define components, which define the placeholders for the content that will be included from the second template page. The apex:insert component is used in the second template page to insert the content into the placeholders defined in the apex:composition component.

Any content outside of the apex:composition component will not be rendered in the final output.

Therefore, the correct answer to the question is B - apex:composition. The other options (apex:inputSecret, apex:pageblockSection, and apex:lineSeries) are unrelated to the concept of page composition in Visualforce.