Oracle ADF Faces - af:regionDef
Summary

Tag name: < af:regionDef >

This tag, in conjunction with af:region, allows a common UI (a region) to be defined. Once defined, the region must be registered in "WEB-INF/region-metadata.xml". A registered region is referenced with the < af:region > tag. A region can be used many times, either on the same page, or on multiple pages. A single region must be defined in its own page, and the < af:regionDef > must be the top level tag on that page (it replaces < f:subview > ). See the < af:region > tag to see how a region is used (or referenced).

Example:

 <af:regionDef var="stuff" >
   <af:panelHeader text="Info for Stock Symbol:#{stuff.symbol}">
     <af:inputText readOnly="true" 
        label="Description" value="#{stuff.desc}"/>
    </af:panelHeader>
 </af:regionDef>

If the above is defined in "/regions/stock.jspx", then you need to register the above region in "WEB-INF/region-metadata.xml". Here's an example:

<faces-config>
  <component>
    <component-type>oracle.adfdemo.region.stock</component-type>
    <component-class>
      oracle.adf.view.faces.component.UIXRegion
    </component-class>
    <component-extension>
      <region-jsp-ui-def>/regions/stock.jspx</region-jsp-ui-def>
    </component-extension>
    <attribute>
      <attribute-name>symbol</attribute-name>
      <attribute-class>java.lang.String</attribute-class>
      <attribute-extension>
        <required>true</required>
      </attribute-extension>
    </attribute>
    <attribute>
      <attribute-name>description</attribute-name>
      <attribute-class>java.lang.String</attribute-class>
      <default-value>Default Description</default-value>
    </attribute>
  </component>
</faces-config>

And after it is registered, you can use the above region in say "master.jspx", like this:

  <af:region regionType="oracle.adfdemo.region.stock" >
   <f:attribute name="symbol" value="ORCL"/>
   <f:attribute name="desc" value="Oracle Corp"/>
 </af:region>

Attributes
Name Type Supports EL? Description
var String Yes The name of the EL variable to use to reference attributes on the parent < af:region>. For example, let's say this "var" attribute is set to the value "attrs"; if the < af:region> tag has an attribute called "bar", The value of "bar" can be referenced from a child within < af:regionDef> using the expression #{attrs.bar} .
Copyright © 2003-2006, Oracle Corporation. All Rights Reserved.

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy