Friday 12 January 2018

How to get the Name of all Objects and their Run time Value in Running OAF page to use in the controller Extension



In Friends , In this post I will share you the trick in OAF by which you can know the internal names of all objects which is existing in you OAF page beside this you can also get their values which is initializing during run time in OAF page.


When we need to perform controller extension and put some custom code in the OAF page we need to know the internal names of the object which is working for this page and we also need to get the values which are initialing during run time of the oaf page to understand its architecture and to help in Debugging also.

You have to run this code under Process Request so that when page load you will get all ID/Name of the object for this page.


 public void processRequest(OAPageContext pageContext, OAWebBean webBean)

{
  super.processRequest(pageContext, webBean);


       OAApplicationModule am = pageContext.getApplicationModule(webBean);


 String parameterName;

// This below code will get the name of all the objects of OAF page as a Parameter.

 Enumeration e = pageContext.getParameterNames();


// This below code will print the name of the objects and their values in sequence

      while(e.hasMoreElements())
      {
              parameterName = (String)e.nextElement();

        System.out.println( "Parameter Name=>" + parameterName + " Parameter Value=> " + pageContext.getParameter(parameterName));     
     
              pageContext.writeDiagnostics(this, "Parameter Name=>" + parameterName + " Parameter Value=> " + pageContext.getParameter(parameterName),2);

}

}



If you doing any controller Extension but you have no idea about the page layout and don't know the name of the Objects and their values then my recommendation is You have to put this code first and then know all the things about this page and then set conditions as per your business requirement.


 

5 comments:

Anonymous said...

Nice blog, I really like what you write in this blog, I also have some relevant Information about Best HR Training In Hyderabad | Hr training institute in Hyderabad! if you want more information.
Oracle Fusion HCM Online Training

Anonymous said...

Nice blog, I really like what you write in this blog, I also have some relevant Information about Best HR Training In Hyderabad | Hr training institute in Hyderabad! if you want more information.
Oracle Fusion HCM Online Training

shaik shah said...

Good Blog thanks for sharing this informative article. It would be helpful for improving their knowledge.
Oracle Fusion HCM Online Training

yamuna said...

Good blog, thanks for sharing this information.
Oracle Fusion HCM Online Training

Rainbow Training Institute said...

Really very helpful article , Thank you for sharing

Big Data and Hadoop Online Training
Big Data Hadoop Training
Hyderabad

Post a Comment

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

Name

Email *

Message *