Friday Mar 09, 2012

Dynaminc ADF Pages Construction with WebCenter's Resource Catalog and Composer

This is the third part of my "WebCenter for ADF Developer" series of posts (see post 1 and post 2).

This entry highlights why this product/features are called WebCenter PORTAL - with this set of WebCenter capabilities your ADF application gets a set of end-user customization capabilities that blur the line between a "regular" application and what used to be one of the core value propositions of traditional portals. Once you start using this capability your end user will be able to create new pages in their applications and add content to those pages at runtime.

As you'll see in the demo, this involve exposing regular ADF taskflows through the WebCenter resource catalogs, and then using the WebCenter Portal composer tags and runtime capabilities to add and customize pages at runtime.

One thing that probably should have gone into the demo also is showing how to enable this dynamic page editing on existing ADF page - to do that you can use the WebCenter JSF component called pe:pageCustomizable and in it put a cust:panelCustomizable component. You can see this if you look at the source of the home.jspx page that comes with your WebCenter Portal application template.

So at the end of the day you can create a page that has this type of structure:

           <pe:pageCustomizable id="pageCustomizable1">
              <cust:panelCustomizable id="panelCustomizable1" layout="scroll"/>
              <f:facet name="editor">
                <pe:pageEditorPanel id="pep1"/>

Then when you press the magic keyboard combination ctrl+shift+E your page will switch into the runtime editing mode. (or you can add a button that will switch to that editing mode by adding the pe:changeModeButton component to your page.)

Thursday Mar 01, 2012

Using WebCenter for Runtime Layout Customization of ADF Applications

This is part two of a set of entries that show how ADF developers can leverage WebCenter - part 1 is here.

In this demo I'll focus on WebCenter's composer components. These JSF tags allow you to add a capability for end users to dynamically change the layout/location and size of areas in a JSF page at runtime. This is something that end users became used to in the age of portals - and now you can add this capability to your ADF application very easily. To persist the changes you'll need to enable MDS - but if you just want to play with these tags - all you need is JDeveloper and the WebCenter extension.

Then just do this:

By the way - if you can't afford a WebCenter license - the ADF Faces panelDashboard component will give you some of this functionality too.

Thursday Feb 16, 2012

Creating Dynamic ADF Input Forms with Iterator

I showed before how to use the dynamic tag library to create dynamic forms/tables that can show an unknown number of fields. While using those tags is very easy, they are meant for read-only data view. What if you actually want to create a page with input fields, but you don't know ahead of time how many fields will be needed?

Well here is a little solution.

It uses an array that lists the fields you'll want to show, and then an iterator in the page to run over this array and display the fields.

Application zip file is here.

And here is a short demo showing the form in action and explaining what is happening behind the scenes.

By the way, in the zipped version I added another button to the page that when pressed adds one more field to the form.

Friday Oct 22, 2010

ADF Faces Dynamic Tags - For a Form that Changes Dynamically

I think this is one of the hidden gems of Oracle ADF - a set of components that can display different data each time.
There is a dynamic form and a dynamic table, both read the meta-data of the component you want them to display and create JSF components on the page to show those at runtime.

The following demo shows the basics of how to use them.
We are creating a method in our Application Module that changes the definition of a view object to be based on a provided SQL statement.
Then we bind that VO to our page using the dynamic Form component.
And voila - you'll give the SQL, we'll show the data...

Two notes:
The vo.executeQuery call in the AM method is redundant in this case. The view will be queried when you navigate to the page without this call also.

Dragging a data control as a dynamic table should result in a code that looks like this in our JSF:

If it doesn't make sure you dropped the right dynamic table. You'll see two options in the drop menu with similar name.You need to choose the "ADF Dynamic Table" one.


I'm a Director of Product Management for Oracle's Cloud Development Tools and Frameworks.
Follow me:

« July 2016