Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2

One of the interesting new features that come along with WebCenter in JDeveloper 10.1.3.2, but hopefully are not necessarily part of WebCenter (licence) is the set of Customizable Components: PanelCustomizable and ShowDetailFrame. These two components make it very easy to organize the content of our web application, treating different panels as if they are almost stand-alone, portlet like objects that can be minimized, rearranged, have their own dropdown menus etc. Their use in conjunction with portlets is obvious, but they can be used in any JSF (e.g. ADF Faces) application. In this article I will give a very simple example of applying these components to an ADF Faces databound web application.

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2

....
 

Our starting point is a simple JDeveloper Web Application with a Model (ADF BC) project, based on EMP and DEPT in the Scott schema. There is a Viewlink between Dept and Emp to specify the master-detail relationship.

To be able to make use of the panelCustomizable and showDetailFrame components, we have to add the library and tag-library to our project. Inspect the project libraries to see whether it includes the Customizable Components library. Then inspect the JSP Tag Libraries for the project:

 Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail1 taglibs

When you find the Customizable Components taglib missing, click on the Add button and select it from the list to add it.

 Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail2 addtaglib

 

Now let’s create a new JSF JSP page, accepting all defaults (except the new page title). I drag and drop the DeptView collection as a Read Only Table on my page:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail3 dragdroptabledepts

The result:

 Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail4 dragged

 

I add the detail EmpView collection as ADF Table:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail5 addempdetails

The result looks like this in the editor:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetails6 empdeptinplace

When I run the WebApplication, it runs like this:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetails7 runapp

And this is where the fun starts. I think these two tables take up two much real estate on the page. I want to allow the end user to close the Employee Details, since he only needs them occasionally. This is where the ShowDetailFrame component comes in. In the Structure Window, I select the Employees Table. From the right mouse button menu I select the option Surround With:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetails8 surroundempwithshowdetail

 

From the popup window I select the ShowDetailFrame component:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetails8a selectshowdetail 

In the JSP Editor this looks like:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetails8b ineditor

When I run the application, this is what I get:

 Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetails8c run

 

Now the user can decide to minimize the widget that contains the Employees table, saving on ‘real estate’:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail minimized

Let’s make things better! I will wrap the Departments table in a ShowDetailFrame component too, just like the Employees. Then I will surround both ShowDetailFrames with a panelCustomizable component. This container defines the context within which the children can be moved around and maximized

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail wrapincustomizablepanel

 

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail incustomizablepanel

 Let’s move the ShowDetailFrames around a bit:

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail movedown

 After moving down the Departments – note: moving is a client side operation! no server round trip is required – the Departments are shown below the Employees.

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2 showdetail downresult

Each ShowDetailFrame has been defined as isMaximizable="true" isMinimizable="true" isMovable="true"; that means that we get the local dropdown menu with Move and Maximize as options (note:the other two options were separately defined using a facet in the ShowDetailFrame and refer to custom actions).
Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2

 The result of maximizing the Employees table within the PanelCustomizable is that all of the panel is taken up by the Employees and the Departments are no longer visible.

Using the new JSF Components ShowDetailFrame and PanelCustomizable for structuring the User Interface in JDeveloper 10.1.3.2

2 Comments

  1. Jaco Verheul May 3, 2007
  2. Lucas Jellema February 1, 2007