JSF-Spring

de.mindmatters.faces.application
Class DelegatingActionListener

java.lang.Object
  extended by de.mindmatters.faces.application.DelegatingActionListener
All Implemented Interfaces:
java.util.EventListener, ActionListener, FacesListener

public final class DelegatingActionListener
extends java.lang.Object
implements ActionListener

This action listener implementation processes action events during the Apply Request Values or Invoke Application phase of the request processing lifecycle (depending upon the immediate property of the ActionSource that queued this event.

Usually this action listener invokes the specified application action method of the encapsulated action listener of the underlying JSF implementation. But if there can be found an action listener in the request the action method of this one will be invoked.

Furthermore this action listener populates the action event given to the action method as a thread local variable via the ActionEventContextHolder.

Author:
Andreas Kuhrwahl
See Also:
ActionEventContext, ActionEventContextHolder

Constructor Summary
DelegatingActionListener(ActionListener orig)
          Creates an ApplicationListener with the given action listener orig of the underlying JSF implementation.
 
Method Summary
static void bindActionListener(FacesContext context, ActionListener actionListener)
          Associate the given ActionListener with the current thread.
 void processAction(ActionEvent event)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingActionListener

public DelegatingActionListener(ActionListener orig)
Creates an ApplicationListener with the given action listener orig of the underlying JSF implementation.

Parameters:
orig - the original action listener of the underlying JSF implementation
Method Detail

bindActionListener

public static void bindActionListener(FacesContext context,
                                      ActionListener actionListener)
Associate the given ActionListener with the current thread. Will be used from DelegatingActionListener.

Parameters:
context - FacesContext for the current request
actionListener - the current ActionListener

processAction

public void processAction(ActionEvent event)

Specified by:
processAction in interface ActionListener

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG