Posts

Showing posts from February, 2007

Filtering Nodes in an ADF Faces Tree Component

Image
This post describes a method to filter nodes in an ADF Faces Tree. You can download the sample application from here. The application is developed in JDeveloper 10.1.3.2.0 and requires a connection to the HR schema.Sample Application

In the sample application, Regions are the root nodes of the tree. Countries appear as child nodes under the Region they belong.

Each Region node in the tree has an inputText component. The value entered into the inputText is used to filter the countries in the Region.Building the Sample Application

Please refer to the post “ADF Faces Tree Example” in this blog for more information on how to build a JSF page with an ADF Faces Tree Component.

Once you create your page with the tree component follow the steps below to implement the filter functionality.Create a HashMap object and its accessor methods in the ApplicationModuleImpl class. This object is going to store the Region-Filter Value pairs entered by the user.private HashMap filters = new HashMap();

public …

Referencing processScope values for Back button compatibility

Image
Events initiated by JSF Components placed inside a switcher tag might be overlooked by the framework, if the scope of the value referenced in the facetName attribute of the switcher is not set correctly.

In this post, we are going to demonstrate how to use the ADF processScope to solve this problem.

You can download the sample application from here. The application is a JDeveloper 10.1.3.2 workspace. It does not need a database connection to run.

Sample Application

The sample application contains 3 pages. Each page attempts to perform the same tasks.

“Button 1” is displayed when the application is run the first time. Clicking “Button 1” hides it and displays “Button 2” with a timestamp (System.currentTimeInMilis()) next to it, indicating the time the “Button 1” is pressed.

Pressing “Button 2” performs a similar action; “Button 2” is hidden and only a timestamp is displayed, showing the time “Button 2” is pressed.


All three pages utilize the same bean, named MyBean, to provide their func…

Using FLEX in ADF / JSF Applications

Image
JDeveloper 11g is going to introduce JSF components with built-in rich client capabilities. However 11g is not out yet. This does not mean that you cannot incorporate rich client components to your application today. One of the alternatives is to embed FLEX components into ADF/JSF applications. (FLEX is a Rich Internet Application technology developed by Adobe)
In this post we are going to demonstrate how to achieve this.

The sample application is fairly straightforward. It contains two input boxes, and two buttons. One of the input boxes is implemented in JSF and the other in FLEX. The application which is a JDeveloper 10.1.3.1 workspace, demonstrates how these two components can pass information to each other. Communication between the two technologies is a critical requirement if both technologies are used in the same application. There are two buttons on the screen to start the communication between the two input boxes. The “from JSF to FLEX” button assigns the value of the JSF Comp…