First page Back Continue Last page Text

oracle adf workshop


Characteristics of Declarative Components

Declarative components are reusable, composite UI components that are made up of other existing ADF Faces components. Suppose you are reusing the same components consistently in multiple circumstances. Instead of copying and pasting the commonly-used UI elements repeatedly, consider defining a declarative component that contains those components, and then reusing that composite declarative component in multiple places or pages.

Any changes to the declarative component affect all pages that use the declarative component. Declarative components do not support ADF Model parameters. They are not databound and contain no business logic. This means that you cannot drag an item from the Data Controls panel when defining the component layout section of a declarative component. However, when consuming a declarative component on a page, you can drop databound content into the facets defined on the declarative component, and the declarative component's attributes can have data binding. For example, if you wish to reuse a databound address object that comprises four input fields on a JSF page, you could create a declarative component with four input components and four parameters, and assign the parameters to the value attributes of the input components. At design time, the page author can bind the input component values (via the declarative component’s attributes in the Property Inspector) to different data sources, including ADF Model data binding.