Wednesday, July 13, 2011

OAF Page without PageLayout Region

By default the highest level of region in OA Framework page is "pageLayout" region.
When we create a page, page gets created with PageLayout region.
I always felt PageLayout is mandatory region and has to be in all Pages.

But I was so wrong... You can create pages without PageLayout.

Sometime back, while working on a popup requirement (Custom Javascript popup) to display a table. I didn't liked the idea of popup having Corporate Logo, Global Links etc. Just tried to change the style of PageLayout region to other style and it worked.

Note: There are lot of restrictions on a page without PageLayout region, but it suited my requirements.

2 comments:

  1. Below javascript code will remove the header and footer in any R12 OAF page:

    String javaS =
    " javascript: var tables= document.getElementsByTagName(\'table\');" + " var v_length = tables.length; "
    + " for (var i=tables.length-1; i>=0;i-=1) " + "if ( i < 3 || i > v_length-3 )" + " { "
    + " tables[i].parentNode.removeChild(tables[i]); " + " } ";

    bodyBean.setOnLoad(javaS);
    bodyBean.setOnUnload(javaS);

    I use it mainly in my popup pages..
    Mohamed Nabil

    ReplyDelete
  2. Dear Nabil,

    Thanks for your post.

    1. The idea of this post is not to suggest that an OAF page should be created without PageLayout. It was just idea which appealed to me a while back and I wanted to try :).

    2. The approach you mentioned is applicable only when there is no custom Look and Feel applied. If you are using custom templates for desired look and feel, this code has potential to cause havoc as its more like hard-coding.

    3. For popup pages, I have found following method more appropriate:
    pageContext.clearMenuContext();

    Regards,
    Prince

    ReplyDelete