Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
12c (12.2.1.1)

E67021-02

<af:facetRef>

facetRef facet ref


Used in a page template definition to reference a facet that was defined in the page template usage. This tag can only be used inside of pageTemplateDef.

Example page template definition:


<?xml version='1.0' encoding='utf-8'?>
<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>

Example page template usage:


<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 Degrees 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>

Attributes

Name Type Supports EL? Description
facetName String No Identifies the facet that should be referenced.