org.apache.struts.faces.application
Class ApplicationHandlerImpl

java.lang.Object
  |
  +--org.apache.struts.faces.application.ApplicationHandlerImpl
All Implemented Interfaces:
javax.faces.lifecycle.ApplicationHandler

public class ApplicationHandlerImpl
extends java.lang.Object
implements javax.faces.lifecycle.ApplicationHandler

Concrete implementation of ApplicationHandler that converts JavaServer Faces CommandEvents and FormEvents into execution of the corresponding Struts request processing lifecycle. Events are mapped to Struts actions as follows:

Version:
$Revision: 1.1 $ $Date: 2003/03/07 03:22:44 $
Author:
Craig R. McClanahan

Field Summary
protected static org.apache.commons.logging.Log log
          The logger for this instance.
protected  org.apache.struts.action.ActionServlet servlet
          The ActionServlet instance of our controller servlet.
 
Constructor Summary
ApplicationHandlerImpl(org.apache.struts.action.ActionServlet servlet)
          Construct a new ApplicationHandler based on the specified parameters.
 
Method Summary
 boolean processCommandEvent(javax.faces.context.FacesContext context, javax.faces.event.CommandEvent event)
          Process the specified CommandEvent.
 boolean processEvent(javax.faces.context.FacesContext context, javax.faces.event.FacesEvent event)
          Process an event that has been queued for the application.
 boolean processFormEvent(javax.faces.context.FacesContext context, javax.faces.event.FormEvent event)
          Process the specified FormEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

The logger for this instance.


servlet

protected org.apache.struts.action.ActionServlet servlet

The ActionServlet instance of our controller servlet.

Constructor Detail

ApplicationHandlerImpl

public ApplicationHandlerImpl(org.apache.struts.action.ActionServlet servlet)

Construct a new ApplicationHandler based on the specified parameters.

Parameters:
servlet - ActionServlet instance we are associated with
Method Detail

processEvent

public boolean processEvent(javax.faces.context.FacesContext context,
                            javax.faces.event.FacesEvent event)

Process an event that has been queued for the application. FIXME - does the application need to provide any feedback to the lifecycle state machine?

Specified by:
processEvent in interface javax.faces.lifecycle.ApplicationHandler
Parameters:
context - FacesContext for the current request
event - FormEvent to be processed

processCommandEvent

public boolean processCommandEvent(javax.faces.context.FacesContext context,
                                   javax.faces.event.CommandEvent event)

Process the specified CommandEvent.

Parameters:
context - FacesContext for the current request
event - CommandEvent to be processed

processFormEvent

public boolean processFormEvent(javax.faces.context.FacesContext context,
                                javax.faces.event.FormEvent event)

Process the specified FormEvent.

FIXME - How do /faces/* paths interact with selecting an application module?

FIXME - Make sure that cancel buttons are recognized correctly.

Parameters:
context - FacesContext for the current request
event - FormEvent to be processed


Copyright ? 2003 - Apache Software Foundation