What Happens When You Use a Custom JSF Validator

7-2 Web User Interface Developers Guide for Oracle Application Development Framework In addition to built-in PPR functionality, you can configure components to use cross-component rendering, which allows you to set up dependencies so that one component acts as a trigger and another as the listener. When an event occurs on the trigger component, the lifecycle is run only on listener components and child components to the listener, and only the listener components and their children are rerendered. Cross-component rendering can be implemented declaratively. However, by default, all events from a trigger component will cause PPR note that some components, such as table, trigger partial targets on only a subset of their events. For these cases where you need strict control over the event that launches PPR, or for cases where you want to use some logic to determine the target, you can implement PPR programatically. Additionally, ADF Faces applications can use PPR for navigation. In standard JSF applications, the navigation from one page to the next requires the new page to be rendered. When using AJAX-like components, this can cause overhead because of the time needed to download the different JavaScript libraries and style sheets. To avoid this costly overhead, the ADF Faces architecture can optionally simulate full-page transitions while actually remaining on a single page, thereby avoiding the need to reload JavaScript code and skin styles.

7.2 Enabling Partial Page Rendering Declaratively

Using the simplest form of cross-component rendering, one component, referred to as the target component, is rerendered when any event occurs on another component, referred to as the trigger component. For example, as shown in Figure 7–1 , the File Explorer application contains a table that shows the search results in the Search panel. This table and only this table is rerendered when the search button is activated. The search button is configured to be the trigger and the table is configured to be the target. Tip: If your application uses the Fusion technology stack, you can enable the automatic partial page rendering feature on any page. This causes any components whose values change as a result of backend business logic to be automatically rerendered. For more information, see the What You May Need to Know About Automatic Partial Page Rendering section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. Note: The browser must have JavaScript enabled for PPR to work. Rerendering Partial Page Content 7-3 Figure 7–1 The Search Button Causes Results Table to Rerender Trigger components must inform the framework that a PPR request has occurred. On command components, this is achieved by setting the partialSubmit attribute to true. Doing this causes the command component to fire a partial page request each time it is clicked. For example, say a page includes an inputText component, a commandButton component, and an outputText component. When the user enters a value for the inputText component, and then clicks the commandButton component, the input value is reflected in the outputText component. You would set the partialSubmit attribute to true on the commandButton component. However, components other than command components can trigger PPR. ADF Faces input and select components have the ability to trigger partial page requests automatically whenever their values change. To make use of this functionality, use the autoSubmit attribute of the input or select component so that as soon as a value is entered, a submit occurs, which in turn causes a valueChangeEvent event to occur. It is this event that notifies the framework to execute a PPR, as long as a target component is set. In the previous example, you could delete the commandButton component and instead set the inputText component’s autoSubmit attribute to true. Each time the value changes, a PPR request will be fired. Note: In some cases, you may want a component to be rerendered only when a particular event is fired, not for every event associated with the trigger component, or you may want some logic to determine whether a component is to be rerendered. In these cases, you can programatically enable PPR. For more information, see Section 7.3, Enabling Partial Page Rendering Programmatically.