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

OAF :Formatting DateTime Fields

Use the following code to format DateTime feilds in OAF OAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate"...