• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / OAF Miscellaneous / How to hide or show a region dynamically in OA Framework?

How to hide or show a region dynamically in OA Framework?

October 27, 2012 by techhoneyadmin

There often arises a situation where an OA Framework technical personnel needs to hide or show an OAF region at runtime. We will learn today how to hide or show a region at runtime using OA framework code.

Before we begin I assume that you have an OAF page (xTrialPG) and a controller (xxTrialCO). Also I assume that you have created a pagelayout region and have a OAMessageComponentLayoutBean (xxTrialMsgCompLayoutRN) region on xxTrialPG.

Let’s take this in steps for easy understanding.

Step 1: Import the OAMessageComponentLayoutBean region in your controller

import oracle.apps.fnd.framework.webui.beans.layout.OAMessageComponentLayoutBean

Step 2: Create a handle or reference of the xxTrialMsgCompLayoutRN region in our controller so that we can control the properties of xxTrialMsgCompLayoutRN via our controller.

OAMessageComponentLayoutBean xxTrialMCLayoutHandle = (OAMessageComponentLayoutBean) webBean.findChildRecursive(“xxTrialMsgCompLayoutRN”);

Step 3: Now using the xxTrialMCLayoutHandle handle created in step 2 we can hide/show the xxTrialMsgCompLayoutRN

xxTrialMCLayoutHandle.setRendered(false);

And that’s it. You can hide show any of the region at runtime depending upon the business requirement.

Thanks for Reading.
Until next post
Keep Learning 🙂

Filed Under: OAF Miscellaneous Tagged With: hide region at runtime, hide region dynamically, How to hide a region dynamically, how to hide region at runtime

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in