org.apache.struts.faces.taglib
Class LifecycleListener

java.lang.Object
  |
  +--org.apache.struts.faces.taglib.LifecycleListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener

public class LifecycleListener
extends java.lang.Object
implements javax.servlet.ServletContextListener, javax.servlet.ServletContextAttributeListener

LifecycleListener to initialize the required lifecycle objects, and perform other one-time setup tasks, for the Struts-Faces Integration Library.

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

Field Summary
protected  javax.faces.lifecycle.ApplicationHandler handler
          The ApplicationHandler to be used for request processing.
protected static org.apache.commons.logging.Log log
          The logger for this instance.
protected  org.apache.struts.action.ActionServlet servlet
          The ActionServlet we are associated with.
protected  javax.servlet.ServletContext servletContext
          The ServletContext we are associated with.
 
Constructor Summary
LifecycleListener()
           
 
Method Summary
 void attributeAdded(javax.servlet.ServletContextAttributeEvent event)
          Process an "attribute added" event.
 void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)
          Process an "attribute removed" event.
 void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)
          Process an "attribute replaced" event.
private  void configureComponents()
          Add our UIComponents to the default RenderKit.
private  void configureRenderers()
          Add our Renderers to the default RenderKit.
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Process a "context destroyed" event.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Process a "context initialized" event.
private  javax.faces.lifecycle.ApplicationHandler createHandler(org.apache.struts.action.ActionServlet servlet)
          Create and register an ApplicationHandler instance.
private  org.apache.struts.action.RequestProcessor createProcessor(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig modConfig)
          Create and register a RequestProcessor instance for the specified application module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handler

protected javax.faces.lifecycle.ApplicationHandler handler

The ApplicationHandler to be used for request processing.


log

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

The logger for this instance.


servlet

protected org.apache.struts.action.ActionServlet servlet

The ActionServlet we are associated with.


servletContext

protected javax.servlet.ServletContext servletContext

The ServletContext we are associated with.

Constructor Detail

LifecycleListener

public LifecycleListener()
Method Detail

attributeAdded

public void attributeAdded(javax.servlet.ServletContextAttributeEvent event)

Process an "attribute added" event.

Specified by:
attributeAdded in interface javax.servlet.ServletContextAttributeListener
Parameters:
event - The ServletContextAttributeEvent that has occurred

attributeRemoved

public void attributeRemoved(javax.servlet.ServletContextAttributeEvent event)

Process an "attribute removed" event.

Specified by:
attributeRemoved in interface javax.servlet.ServletContextAttributeListener
Parameters:
event - The ServletContextAttributeEvent that has occurred

attributeReplaced

public void attributeReplaced(javax.servlet.ServletContextAttributeEvent event)

Process an "attribute replaced" event.

Specified by:
attributeReplaced in interface javax.servlet.ServletContextAttributeListener
Parameters:
event - The ServletContextAttributeEvent that has occurred

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)

Process a "context destroyed" event.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
event - The ServletContextEvent that has occurred

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)

Process a "context initialized" event.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
event - The ServletContextEvent that has occurred

configureComponents

private void configureComponents()

Add our UIComponents to the default RenderKit.


configureRenderers

private void configureRenderers()

Add our Renderers to the default RenderKit.


createHandler

private javax.faces.lifecycle.ApplicationHandler createHandler(org.apache.struts.action.ActionServlet servlet)

Create and register an ApplicationHandler instance.

Parameters:
servlet - ActionServlet instance we are associated with

createProcessor

private org.apache.struts.action.RequestProcessor createProcessor(org.apache.struts.action.ActionServlet servlet,
                                                                  org.apache.struts.config.ModuleConfig modConfig)

Create and register a RequestProcessor instance for the specified application module.

Parameters:
servlet - ActionServlet instance we are associated with
modConfig - ModuleConfig instance we are associated with


Copyright ? 2003 - Apache Software Foundation