Deleting a row in OAF Advance Table

Oracle OAF : Deleting Row in Advance table 


Deleting a record from table set is pretty common , In this article will talk about how to delete a selected record from advance table



// Deleting Direclty In Controller


// Controller CODE

/////////////////////Delete Load Table/////////////////////////////////////////

if ("delete".equals(pageContext.getParameter("event")))

{

   String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);

   System.out.println(rowRef);

   ARow currRow = (OARow)am.findRowByRef(rowReference);

   currRow.remove();

}


/********************************************************************************/

// Deleting In AM


// Controller CODE

/////////////////////Delete Load Table/////////////////////////////////////////

if ("DelCommRows".equals(pageContext.getParameter(EVENT_PARAM)))

    {

        String rowRef = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);

        System.out.println(rowRef);

        Serializable [] param={rowRef};

        am.invokeMethod("deleteRec",param);

    }



// AM CODE

/////////////////////Delete Load Table/////////////////////////////////////////

 public void deleteRec(String  ref)

 {

   Row r = findRowByRef(ref);

   r.remove();

   getTransaction().commit();

 } 

Comments

Popular posts from this blog

REST integration built-in OIC to read Large files with size more than 10MB

Basic Concepts of OAF (Oracle Applications FrameWork )