This post is next in series of "Working with ADF Faces Components programmatically"
Previous posts are-
Creating dynamic layout (form and UI Component) using ADF Faces
Get Value from programmatically created components , Iterate over parent component to get child values in ADF Faces
Now this post is about applying ActionListener to a programmatically created button or link
Let's start (Jdev 12.13) -
- First created a FusionWebApplication and a page in viewController project
- Dropped a button on page , on this button action i will create a link programmatically and assign actionListener to it
- To create new link i have added following code (described in previous posts)
- After this we are able to create a new Link on click of button, now next is to assign ActionListener to this Link
For this first i have to define an ActionListener method in bean. So i have added this
- Now how to assign this ActionListener to that dynamically created Link?
See the Code-
Just pass the name of method to resolve it
First a button appears-
On click of this button a link is created -