Wednesday 15 August 2018

How to refresh vo in oaf

How to refresh vo in oaf

In this post , we will discuss how we can refresh the VO in oaf page so that we can get the latest data every time in the OAF Page. If we will not refresh the VO then we will get always get the data which will be stores in the cache of the View Object. So in this post , I will share the sample code to refresh the View Object VO in oaf so that we can see the updated data in the view object of the OAF page. For this we will use the vo.clearcache method to refresh the vo in oaf. Here below is the sample code for how to refresh vo in oaf.
 
 

Sample code of How to refresh vo in oaf

Sample code of vo.reset in oaf
 
OAApplicationModule oam = pageContext.getApplicationModule(webBean);
      OAViewObject vo = (OAViewObject)oam.findViewObject("XXSUPVO");

        if (vo != null)

        //Check for null

            vo.Clearcache();

         //It will take you to the first row of Vo

        while (vo.hasNext())
        {

        XXXRowImpl currow = (xxxVORowImpl)vo.next();
         validatelogic (currow.getAttribute("Attr1"),currow.getAttributes("Attr2));
        //so this will check for every row of  a View Object
        }
 
 
 

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *