Menu

Invoking javascript method from an ADF component

ADF, JavaScript By Jun 06, 2013 1 Comment
This post is to show how we can
invoke a java script method from an ADF component like af:goLink
Write a javascript. We can also use
external javascript file but in this example I am writing a small
javascript
method using af:resource. Below is my java script method.
<af:resource type=”javascript”> 
function sayHello() {
alert(“Welcome to Hello World”);}
 </af:resource>
Create a af:goLink component on the
JSF page like below.
<af:goLink text=”Click
here” id=”gil1″ >
<af:clientListener
method=”sayHello()” type=”mouseUp”/>
</af:goLink>
Hi, Welcome here.
JOIN OUR NEWSLETTER
And get notified everytime we publish a new blog post.