Thursday, January 9, 2014

How to ADD/Remove Global Buttons in OAF Page.

How to Add/Remove Global Buttons in OAF Page.

 Now we are going to learn about how to add or remove global buttons from OAF page.
 

ADD Global Buttons.

Oracle has created the standard menu for global buttons like(Home, Logout, Preferences etc) called
ICX_STANDARD_GLOBAL_MENU to add these buttons just add this menu to your menu which contains your page.
 

Disabling the Global Buttons

To disable the global buttons write the below code in the processRequest of your page controller.
 
OAPageLayoutBean page = pageContext.getPageLayoutBean();
 
// You must call prepareForRendering() if the following code is
// included in a pageLayout controller. If you add it further down
// in the layout hierarchy, the menus will be fully processed so you
// don't need to do this  


page.prepareForRendering(pageContext);
OAGlobalButtonBarBean buttons = (OAGlobalButtonBarBean)page.getGlobalButtons(); 
 
// Hide the Global buttons

buttons.setRendered(false); 

or  
// Disable the Global buttons
 

 buttons.setDisabled(true);
 

 
 

 

No comments:

Post a Comment