Monday, March 7, 2011

Set Focus on a Bean Dynamically

In some situation you need to set the focus on particular Bean. Below is the Code for achieving the same.

import oracle.apps.fnd.framework.webui.beans.OABodyBean;
OABodyBean oabean = (OABodyBean)pageContext.getRootWebBean();
oabean.setInitialFocusId("Item_Name");

1 comment:

  1. Hi Gyan,

    We have the issue with Advanced Table region.
    We have like 4 items with which 2nd item is Message Styled Text and the next item and also the remaining items are Message Input Text. Our req is to set the cursor to focus on to the 3rd item from the 1st item. We have tried your suggestion "Set Focus on a Bean Dynamically" with no success. We have also tried setting the 2nd Item style to Message Text Input and set its property to Read Only with no go. Any other work around to sort out this issue.
    Any information related to this are very much appreciated.

    Thanks in Advance..
    Raja.

    ReplyDelete