How to handle add more rows event in Advanced Table in OAF?

Well handling the add_rows_event is a bit peculiar but important requirement and we are going to learn how to achieve the same 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 an Advanced Table OAAdvancedTableBean(xxTrialAdvancedTable).

Let’s take this in steps for easy understanding.

Step 1: Import the OAAdvancedTableBean in your controller

import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean

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

OAAdvancedTableBean xxTrialAdvancedTableHandle = (OAAdvancedTableBean) webBean.findChildRecursive(“xxTrialAdvancedTable”);

Step 3: Now using the xxTrialAdvancedTableHandle handle created in step 2 we can capture the add_row_event on xxTrialAdvancedTable.


if (xxTrialAdvancedTableHandle.getName(pageContext).equals(pageContext.getParameter(SOURCE_PARAM))
&& ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
{
// perform required steps
}

< em>

Mission Accomplished 

Thanks for Reading.
Until next post
Keep Learning 🙂

Tagged , , , . Bookmark the permalink.