Tuesday, May 4, 2010

In some application developer need to execute some code at page load or need to execute some code when leave the page. If the developer need to execute the same code to many of pages in the application at page load (as sharing code will executed when any of the application page load) he need to follow this steps:

1- In your ADF Application Make a new Managed-Bean (assume its name is PageListenerBean).

3- For every page in your application you want to execute this code at page load or when you leave the page ---> Right click on your jspx page and go to your page definition. Set the attribute ControllerClass inside your pageDefinition tag as the name of the managed bean.