UIComponent class: oracle.adf.view.rich.component.fragment.UIXPageTemplate
Component type: oracle.adf.PageTemplate
Renders a pageTemplate. If you want a common UI for all your pages, you may use a pageTemplate. This allows you to define your common UI in a pageTemplate definition file using the <af:pageTemplateDef> tag, and reusing the common definition on all your other pages using this tag. The pagetemplate component does not support nesting (one af:pageTemplate component cannot contain another af:pageTemplate component). <p/> You can pass attributes and facets into the definition using the <f:attribute> and <f:facet> tags. The definition can refer to the attributes by using the "var" EL variable that is setup on the <af:pageTemplateDef>. The definition can reference a facet using the <af:facetRef> tag. Each facet can only be referenced once. If you put a component as a child of pageTemplate but fail to put it inside of a facet and fail to reference that facet in the template file (via facetRef), that component will not be rendered. <p/> Example:
<af:pageTemplate id="weather"
viewid="pagefragments_weatherBox_jspx">
<f:attribute name="zip" value="94065"/>
<f:attribute name="description" value="Redwood Shores, CA"/>
<f:facet name="forecastSummary">
<af:outputText value="Partly Cloudy"/>
</f:facet>
<f:facet name="forecastDetail">
<af:panelGroupLayout layout="vertical">
<af:outputText value="72'F"/>
<af:outputText value="Partly Cloudy"/>
<af:outputText value="Wind: W at 16 mph"/>
<af:outputText value="Humidity: 46%"/>
</af:panelGroupLayout>
</f:facet>
</af:pageTemplate>
And this is the corresponding pagefragments/weatherBox.jspx:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
version="1.2">
<af:pageTemplateDef var="attrs">
<af:xmlContent>
<component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
<description>
This component will show weather forecasts in a box.
</description>
<facet>
<facet-name>forecastSummary</facet-name>
<description>This child draws out the summary forecast</description>
</facet>
<facet>
<facet-name>forecastDetail</facet-name>
<description>This child draws out the detailed forecast</description>
</facet>
<attribute>
<attribute-name>zip</attribute-name>
<description>The Zip code of the area</description>
<required>true</required>
</attribute>
<attribute>
<attribute-name>description</attribute-name>
<default-value>Unknown</default-value>
<description>The city/state of the zip code </description>
</attribute>
</component>
</af:xmlContent>
<af:panelHeader text="Weather Forecast for Zip:#{attrs.zip}, #{attrs.description}">
<af:facetRef facetname="forecastSummary"/>
<af:showDetail>
<af:facetRef facetname="forecastDetail"/>
</af:showDetail>
</af:panelHeader>
</af:pageTemplateDef>
</jsp:root>
<p/> Note about stretching layouts and flowing/scrolling layouts: <p/> With today's web browsers, it is not reliable to have vertically-stretched content inside of areas that also have scroll bars. If you want the outer areas of your page structure to stretch, you need to be careful of how you assemble your component tree.
Rules of thumb:
If you believe that you need to break one of these rules, this is an indication that your page structure is not following the page structure guidelines and you will likely have troubles getting your application to render consistently across various web browsers and computing platforms.
| Name | Type | Supports EL? | Description |
|---|---|---|---|
| id | String | No | the identifier for the component. The identifier must follow a subset of the syntax allowed in HTML |
| value | Object | Yes | the "bindings" property. This property will be assigned to the "bindings" EL variable while this template is rendering or decoding. |
| viewId | String | Yes | The view ID of the page template. |