First page Back Continue Last page Text

oracle adf workshop


Creating a Declarative Component

When you invoke the Create JSF Declarative Component dialog box, you can specify the name of the component, its file name and path, and the package in which to place it. You must add a tag library, and you can define facets, attributes, and methods for the component. When you click OK, the .jspx file opens in the editor. You can drag components to the editor to create the component.

JDeveloper creates an <af:componentDef> tag in the declarative component definition JSPX fragment; this tag acts as the root of the tag hierarchy. This tag describes the entire declarative component in two sections:

af:xmlContent section: Defines the declarative component metadata in facet and attribute elements

Component layout section: Anything outside of af:xmlContent.

Defines the actual UI components that make up the composite declarative component

Requires that only one child is defined for the layout, so you can use one of the panel layouts to contain multiple elements

Uses af:facetRef tags to reference named facets, and EL expressions containing named attributes to enable page authors to set their own property values for the declarative component