• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / OAF Miscellaneous / How to refresh an OA Framework page using Java Script?

How to refresh an OA Framework page using Java Script?

October 27, 2012 by techhoneyadmin

Hey there, today we are going to look at some javascript implementation in OA Framework and as the title of the post suggests we will see that how can we refresh an OA Framework page using javascript.

Assumptions:
1. You already have an OA Framework page (XXTrialPG).
2. You have a controller (XXTrialCO) attached to XXTrialPG.
3. You want the OA Framework page to refresh in every 20 seconds.
4. You have imported all the required regions and/or items in XXTrialCO.

Let’s take this in steps for easy remembrance.

Step1. Create a handle for OABodyBean
OABodyBean bodyBean = (OABodyBean) pagecontext.getRootWebBean();

Step2. Create a variable of String type and assign the below mentioned javascript code to the string variable.
String javaS = “javascript:setTimeout(‘window.location.reload()’,20000)”;

Note: Here 20000 means 20 seconds mentioned in milliseconds

Step3. Set the String variable on the onLoad() method of OABody bean, this will ensure that when the OA Framework page is rendered, the corresponding javascript code is triggered
bodyBean.setOnLoad(javaS);

That’s it Folks.
Thanks for reading.
Till the next post
Take Care

Filed Under: OAF Miscellaneous Tagged With: how to refresh an oa framework page using java script, Java script in oa framework, oa framework page and java script

Copyright © 2025 · Parallax Pro on Genesis Framework · WordPress · Log in