Skip to main content


Showing posts from April, 2010

Invoking ApplicationModule from a servlet using ADF Model

Sometimes you may need to invoke services exposed by an ApplicationModule from a non ADF web application. This blog post discusses an interesting approach for such use cases where the business logic is residing in a servlet and which in turn invokes the methods exposed through the ApplicationModule, during the course of execution.

One obvious solution is to create ApplicationModule on the fly and release it at the end of the request, as shown below. This code will work if your entire transaction gets committed within a single request. In other words, this is ideal for those use cases which does not call for maintaining state across requests from the same client.

try{    ApplicationModule applicationModule = Configuration.createRootApplicationModule(qualifiedAMDefName, configName);    //Business logic goes here....... }catch(Excpetion ex){    //Handle Error }finally{    Configuration.releaseRootApplicationModule(applicationModule, false); }
Please note that you may need to configure the…

Custom <af:train> model

The <af:train> component presents a series of 'stops', each representing a task in a multi-step process, carried out sequentially. This component is very useful when you need to develop a 'wizard' sort of screens.

In general, af:train is used along with taskflow where the implementation part is a cakewalk (can be done declaratively with zero effort). Sometimes you may need to customize the default behavior of the train component. ADF Faces does support this customization through the custom menu model. To learn more about this, please go through chapter 18.7 Using Train Components to Create Navigation Items for a Multi-Step Process of Web User Interface Developer's Guide.

I'm attaching a simple af:train demo using customized org.apache.myfaces.trinidad.model.ProcessMenuModel as model. This is actually a simplified version of the af:train component sample, bundled with ADF Faces Rich Client Components Demo.

A brief description of this implementation...

jspx …