• Online Training

    Online Training

    Difference between Action & Action Listener in ADF?

                                 Oracle ADF Training Institutes

    We Know Actions are designed for business logic and participate in navigation handling

    To understand the above line we must understand the below context.

    Using Action we can perform both static navigation & Dynamic Navigation
    Static Navigation is achieved by  just providing the Control flow outcome between pages in the action attribute in property inspector for a UI component.

    Dynamic navigation is nothing but executing some business logic before navigation.
    for ex:- Binding a button to a method on backing bean which executes some code and based on that result it returns an outcome. The returned outcome will determine the navigation rule that is implemented.
    If your code have multiple return values then multiple navigation's from current page will occur.
    Note that the return values should be either String or null .

    To understand more clearly about Navigation  Navigations in ADF

    Action listeners typically perform user interface logic and do not participate in the navigation handling.
    Action listener is a class that wants to be notified when a command component fires an action event.
    Mostly we will see Action Listener when we drag & drop some operation(like commit, delete) from DataControl on to a JSF page . These operations just execute some code behind the page.

    Use Action when u want to execute some logic before navigating to another page.i.e., Dynamic Navigation
    Use Action listener just to execute some logic and to stay on the page itself. 


    Post a Comment