JSF-Spring

de.mindmatters.faces.application
Class ActionEventContextHolder

java.lang.Object
  extended by de.mindmatters.faces.application.ActionEventContextHolder

public final class ActionEventContextHolder
extends java.lang.Object

Simple holder class that associates a ActionEventContext instance with the current thread. The ActionEventContext will be inherited by any child threads spawned by the current thread.

Used as a central holder for the current ActionEvent in JSF-Spring, wherever necessary: for example, in concrete controller instances. DelegatingActionListener automatically exposes its current ActionEvent here.

Author:
Andreas Kuhrwahl
See Also:
DelegatingActionListener.processAction(ActionEvent)

Method Summary
static ActionEvent getActionEvent()
          Return the ActionEvent associated with the current thread, if any.
static ActionEventContext getActionEventContext()
          Return the ActionEventContext associated with the current thread, if any.
static void setActionEvent(ActionEvent actionEvent)
          Associate the given ActionEvent with the current thread.
static void setActionEventContext(ActionEventContext actionEventContext)
          Associate the given ActionEventContext with the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setActionEventContext

public static void setActionEventContext(ActionEventContext actionEventContext)
Associate the given ActionEventContext with the current thread.

Parameters:
actionEventContext - the current ActionEventContext, or null to reset the thread-bound context

getActionEventContext

public static ActionEventContext getActionEventContext()
Return the ActionEventContext associated with the current thread, if any.

Returns:
the current ActionEventContext, or null if none

setActionEvent

public static void setActionEvent(ActionEvent actionEvent)
Associate the given ActionEvent with the current thread. Will implicitly create a ActionEventContext for the given ActionEvent.

Parameters:
actionEvent - the current ActionEvent, or null to reset the thread-bound context
See Also:
SimpleActionEventContext.SimpleActionEventContext(ActionEvent)

getActionEvent

public static ActionEvent getActionEvent()
Return the ActionEvent associated with the current thread, if any.

Returns:
the current ActionEvent, or null if no specific ActionEvent has been associated with the current thread
See Also:
ActionEventContext.getActionEvent()

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG