Home » Java » Enterprise Java » How to Pass Parameters to ActionListener in ADF

About Mahmoud ElSayed

Mahmoud ElSayed

How to Pass Parameters to ActionListener in ADF

In some cases, it is required to pass a value to ActionListener of ADF Button.

The method that can be invoked by actionListeners has only one parameter of type ActionEvent. 

So I will explain how to pass parameter to that bean method however it contains only one paramater ActionEvent in method signature.

I added button to my page as below

The default signature of ActionLister is 

The workaround I used is adding an attribute tag from the JSF.Core inside the ADF Button So the code in the jsp page looks like this

Note “MyAttrName” is the name of paramater and “MyAttrValue” is the value of paramater.

You can bind  “MyAttrValue” to get any value from page definition.

Now I will write the followign code to get paramatervalue from bean

The variable “attrValue” holds the value of paramaters which is “MyAttrValue” in this example.


Mahmoud Elsayed

Published on Java Code Geeks with permission by Mahmoud ElSayed, partner at our JCG program. See the original article here: How to Pass Parameters to ActionListener in ADF

Opinions expressed by Java Code Geeks contributors are their own.

(+1 rating, 1 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Notify of