Class PrimeFacesResourceProcessor
- java.lang.Object
-
- org.primefaces.extensions.application.PrimeFacesResourceProcessor
-
- All Implemented Interfaces:
java.io.Serializable,java.util.EventListener,javax.faces.event.PhaseListener
public class PrimeFacesResourceProcessor extends java.lang.Object implements javax.faces.event.PhaseListenerCreates a custom PhaseListener for RENDER_RESPONSE phase which will during beforePhase() dynamically add those PrimeFaces resources via UIViewRoot#addComponentResource(). This will run far before those @ResourceDependency annotations are processed. This satisfies PrimeFaces' intent of having those hardcoded resources to be rendered before of the dependencies of their components.Register it as below in faces-config.xml:
<lifecycle> <phase-listener>org.primefaces.extensions.application.PrimeFacesResourceProcessor</phase-listener> </lifecycle>- Since:
- 10.0.0
- See Also:
- OmniFaces, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrimeFacesResourceProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPhase(javax.faces.event.PhaseEvent event)voidbeforePhase(javax.faces.event.PhaseEvent event)protected voidencodeValidationResources(javax.faces.context.FacesContext context, boolean beanValidationEnabled)javax.faces.event.PhaseIdgetPhaseId()
-
-
-
Method Detail
-
getPhaseId
public javax.faces.event.PhaseId getPhaseId()
- Specified by:
getPhaseIdin interfacejavax.faces.event.PhaseListener
-
afterPhase
public void afterPhase(javax.faces.event.PhaseEvent event)
- Specified by:
afterPhasein interfacejavax.faces.event.PhaseListener
-
beforePhase
public void beforePhase(javax.faces.event.PhaseEvent event)
- Specified by:
beforePhasein interfacejavax.faces.event.PhaseListener
-
encodeValidationResources
protected void encodeValidationResources(javax.faces.context.FacesContext context, boolean beanValidationEnabled)
-
-