Monday, March 26, 2012

OABodyBean


oracle.apps.fnd.framework.webui.beans.OABodyBean


public class OABodyBean
extends oracle.cabo.ui.beans.BodyBean
implements OAWebBeanContainer, OAWebBeanConstants

This bean is a container for the body of a document. It provides many supporting APIs for OAF.

Some Key APIs supported by this:

1. Blocking on Submit (Refer Dev Guide)

Whenever a submit action takes place on a page, subsequent submits can be blocked. When using a blocking on submit technique, when the submit action takes place, the cursor becomes busy and prevents any other submit action until the current submit event has been handled. The block on submit behavior is not enabled by default on a page. However, For Partial Page Refresh (PPR) events alone, it is enabled by default.

OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();  
bodyBean.setBlockOnEverySubmit(true);

2. PPR Event Queuing (Refer Dev Guide)

By default, when a PPR event fires, all subsequent events on the page are queued and processed. For example, lets say you have a search page and one of the item in search panel is a textbox with the PPR. If you enter some information in the textbox and click on Go. It'll first execute the PPR and then it'll process the Go button click.

To disable this feature at site level, set the value of the profile FND: Disable PPR Event Queuing (FND_PPR_EVENT_QUEUE_DISABLED) to Y. In this case, when a PPR event fires, all subsequent events on the page are ignored.

To implement event queuing on a specific page or to update the behavior of event queuing on a specific page, add the following code to the processRequest of that page.


This will enable the event queuing.

bodyBean.setFirstClickPassed(true); 

 

3. Setting Initial Focus on a Field
Setting the initial focus removes the use of mouse to start typing and saves time in certain pages.
bodyBean.setInitialFocusId("FirstName");



4. Setting Page Dirty

bodyBean.setDirty(true);
To mark a page as Dirty.

bodyBean.setDirty(false);
To mark a page as non-Dirty.


bodyBean.isDirty(false);
To get if a page is dirty or non-Dirty.


5. Setting Javascript

body.setOnLoad("<JS>"); (To call JS function on page load.)
body.setOnKeyPress("<JS>"); (Sets an onkeypress JS handler.)

There are more similar APIs that support Javascript.


bodyBean.setFirstClickPassed(true); This will disable the event queuing.

Sunday, March 25, 2012

UIX Bean and OA Webbean hierarchy

Behind every OAWebBean, there is a UIX webbean working behind the scene.