Skip to main content

Posts

Showing posts from June, 2011

ADF Managed Bean Memory Scope and its Configuration Files

From time to time, I see lots of people messed up with managed bean memory scopes as the application complexity increases. Those errors you would see are types of Null Pointer Exception or the bean/its attribute/method cannot be found. Most of the time the reason behind it is its managed bean memory scope is not set up properly. JSF web application itself has 4 types of scopes: application, session, request and none; ADF technology has brought 3 additional types of scopes: page flow, view and backing bean. The most common ones being used across an ADF fusion application are request, page flow, view and backing bean. Though placing a managed bean into a bigger scope than it should be will still work for your application most of the time but will bring cost on the overhead, placing the bean the other around will definitely stop your application from working properly. If you are working on the ADF fusion application, the developer's guide should the first resource to refer. The fo

Invoke actions on non-command component

It's a small demo on how to perform additional actions on click a goLink component which doesn't support any action logics inherently. The solution is to use javascript to invoke a command component programatically. But why do I need to perform some action on a golink click, why don't I use commandLink directly? Well, the reasons can be many, one of the valid reason is if you have such requirement like: on click of a link, open a predefined URL in a new window and also perform some action. I know there must be other similar scenarios which could be categoried into the same group like this one. The implementation is fairly easy. Here is the code snippet: The command link is hidden and aligned after goLink in page source. The additional action logics is defined in the action listener of the command link.  Here is the demo to download. (JDeveloper 11.1.1.5 and need HR schema objects to run)