apex:composition

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.

Use this component to get user input for a controller method that does not correspond to a field on an sObject. Only <apex:inputField> and <apex:outputField> can be used with sObject fields.

See also: <apex:insert>, <apex:define>

The example above renders the following HTML:

Attribute NameAttribute TypeDescriptionRequired?API VersionAccess
renderedStringThis attribute has no effect on the display of this component. If you wish to conditionally display a <apex:component> wrap it inside a <apex:outputPanel> component, and add the conditional expression to its rendered attribute. 10.0global
templateApexPages.PageReferenceThe template page used for this component. For this value, specify the name of the Visualforce page or use merge-field syntax to reference a page or PageReference.Yes10.0global

See Also