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

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


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 🙂

Tagged , , , . Bookmark the permalink.