The View page, Tag Configuration section of the adf-config.xml overview editor lets you declare the components and associated attribute values that you want to be persisted in the repository without writing any code.
Certain ADF Faces components have built-in support for session change persistence, that is, they provide persistence through implicitly persisted attributes, without any coding or event handling on your part. Examples of implicitly persisted attributes include the
splitterPosition attribute of Panel Splitter,
width attribute of Column, and
disclosed attribute of Show Detail Header and Show Detail. For a complete list of implicitly persisted attributes and components, see the ADF Faces documentation on OTN.
When you elect to persist changes to an MDS repository, by default, all implicitly persisted attribute changes are persisted to the session, and the change persistence framework then consults the configuration in the application's
adf-config.xml file and on the individual JSF pages to determine whether or not the changes should be persisted to the MDS repository. So when you want to persist changes to an MDS repository, you must decide which component attribute values that are implicitly persisted will be persisted for your application, and specify them in
When you use the
adf-config.xml overview editor to declare the component attribute values that are to be persisted in MDS, JDeveloper adds the necessary code for you. For example, the following code shows that only the
width attribute of
column and the
splitterPosition attribute of
panelSplitter will be persisted to an MDS repository; other implicitly persisted component attribute values (such as the
collapsed attribute of
panelSplitter) will not be persisted to the repository because they are not listed in the application's
<taglib-config> <taglib uri="http://xmlns.oracle.com/adf/faces/rich"> <tag name="column"> <attribute name="width"> <persist-changes>true</persist-changes> </attribute> </tag> <tag name="panelSplitter"> <attribute name="splitterPosition"> <persist-changes>true</persist-changes> </attribute> </tag> <taglib> </taglib-config>
Note: If you edit the code yourself, make sure you use the correct names as the names of the attributes and components are case-sensitive, and the spellings must be accurate.
Persisting to the repository will negatively affect performance. For this reason, you should configure your application to persist only those values you want to be retained across sessions.
Implicitly persisted component attribute values declared in
adf-config.xml apply globally to all such components used in the application pages. If you do not want an implicitly persisted component attribute value on a certain page to persist, define that attribute value on the specific component's
dontPersist attribute directly on the page. Similarly if you want a component with an implicitly persisted component attribute value that is not globally declared in
adf-config.xml to persist to the repository, define that attribute value on the specific component's
persist attribute directly on the page. The
persist attributes accept a list of persisted attribute names that are restricted from persisting to, or allowed to persist to an MDS repository, respectively.
In addition to implicit changes provided by the ADF Faces framework, you can use ADF Faces change persistence APIs to create and handle persisting any explicit attribute value changes to components. If you have such explicitly persisted component attribute value changes and you want them to persist to an MDS repository, you must also declare them in the application's
adf-config.xml file (in addition to the implicit changes that you want persisted).
Copyright © 1997, 2009, Oracle. All rights reserved.