11 October, 2013

OAF : Disable Global Buttons in Page

I write snippet code to disable global buttons in OAF page.
You can add the following code to Controller class of the page that you want to disable global buttons inside it.

    public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
        super.processRequest(pageContext, webBean);

        OAPageLayoutBean pageLayoutBean = 
            (OAPageLayoutBean)pageContext.getPageLayoutBean();
        pageLayoutBean.prepareForRendering(pageContext);

        OAGlobalButtonBarBean globalButtonsBean = 
            (OAGlobalButtonBarBean)pageLayoutBean.getGlobalButtons();
        globalButtonsBean.setRendered(false);
    }

Thanks

No comments:

Post a Comment

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...