Search This Blog

Wednesday, 15 May 2013

Calling Javascript method using java in ADF


Calling Javascript method using java in ADF

While working in my project I came to a situation in which I have to make a call to a JavaScript method, on load of the page. The JavaScript method was taking a parameter as an input and the value of the parameter has to come from java class.

Let's find the solution in the below example : 

1.  Create a sample jsff page and write a JavaScript method inside it. E.g "homeLoad.jsff" containing a JavaScript method as "myMethod(args)"




2. Create a Class and Java method such as "onLoadOfPage()", which will contain the code to call a JavaScript method and passing a parameter.



3. Create a taskflow such as "myTF.xml" and use Java method as default activity and jsff as an outcome.



4. Now, finally create a jspx page as "Home.jspx" and use taskflow as a region. Run the page.

Output :





2 comments:

  1. If you are looking for more information about flat rate locksmith Las Vegas check that right away. python代写

    ReplyDelete
  2. It proved to be Very helpful to me and I am sure to all the commentators here! development programs

    ReplyDelete