09 January, 2019

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.

Thanks
Mahmoud Elsayed

35 comments:

  1. Nice information by the author provided
    Best Play and Pre School for kids in Hyderabad,India. To give your kid a best environment and learning it is the right way to join in play and pre school were kids can build there physically, emotionally and mentally skills developed. We provide programs to kids like Play Group, Nursery, Sanjary Junior, Sanjary Senior and Teacher training Program.
    ­play school in hyderabad

    ReplyDelete
  2. Casino - Hendon Moby - jtmhub.com
    Casino is the 순천 출장마사지 only casino in the state of 군산 출장마사지 New Jersey that offers slot machines, table games, 제주도 출장샵 live dealer 충주 출장안마 games and live 수원 출장샵 dealer casino games.

    ReplyDelete
  3. Organic SEO services in India involve various techniques, such as keyword research, on-page optimization, link building, and content creation, that aim to improve a website's relevance and authority in the eyes of search engines.
    Thank You!!

    ReplyDelete
  4. Awesome blog, thank you so much for sharing such an amazing information with us. Visit Import Globals for Vietnam Import and Export Data Services at Vietnam customs.
    Vietnam Import Data

    ReplyDelete

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...