com.sun.faces.renderkit
Class JsfJsResourcePhaseListener

java.lang.Object
  extended by com.sun.faces.renderkit.JsfJsResourcePhaseListener
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.faces.event.PhaseListener

public class JsfJsResourcePhaseListener
extends java.lang.Object
implements javax.faces.event.PhaseListener

This PhaseListener supports the externalization of the JavaScript (https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=403). In beforePhase(), the request URI is examined to see if contains the configured URI for the JavaScript file. If found, it calls RenderKitUtils.writeSunJs() to write the scrip to the client, then marks the response as complete. This does not currently work in a Portlet environment, so this feature will need to be turned off via the context init parameter.

Author:
Jason D. Lee (jdlee at dev dot java not net)
See Also:
Serialized Form

Constructor Summary
JsfJsResourcePhaseListener()
           
 
Method Summary
 void afterPhase(javax.faces.event.PhaseEvent event)
           
 void beforePhase(javax.faces.event.PhaseEvent event)
           
 javax.faces.event.PhaseId getPhaseId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfJsResourcePhaseListener

public JsfJsResourcePhaseListener()
Method Detail

afterPhase

public void afterPhase(javax.faces.event.PhaseEvent event)
Specified by:
afterPhase in interface javax.faces.event.PhaseListener

beforePhase

public void beforePhase(javax.faces.event.PhaseEvent event)
Specified by:
beforePhase in interface javax.faces.event.PhaseListener

getPhaseId

public javax.faces.event.PhaseId getPhaseId()
Specified by:
getPhaseId in interface javax.faces.event.PhaseListener


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.