Class FlowFacesContext

java.lang.Object
jakarta.faces.context.FacesContext
jakarta.faces.context.FacesContextWrapper
org.springframework.faces.webflow.FlowFacesContext
All Implemented Interfaces:
jakarta.faces.FacesWrapper<jakarta.faces.context.FacesContext>

public class FlowFacesContext extends jakarta.faces.context.FacesContextWrapper
Custom FacesContext implementation that delegates all standard FacesContext messaging functionality to a Spring MessageSource made accessible as part of the current Web Flow request. Additionally, it manages the renderResponse flag in flash scope so that the execution of the JSF Lifecycle may span multiple requests in the case of the POST+REDIRECT+GET pattern being enabled.
Author:
Jeremy Grelle, Phillip Webb, Rossen Stoyanchev
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A Spring Message Source that originated from JSF.
    protected static class 
    Adapter class to convert a FacesMessage to a Spring Message.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlowFacesContext(RequestContext context, jakarta.faces.context.FacesContext wrapped)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMessage(String clientId, jakarta.faces.application.FacesMessage message)
    Translates a FacesMessage to a Spring Web Flow message and adds it to the current MessageContext
    Returns an Iterator for all component clientId's for which messages have been added.
    jakarta.el.ELContext
     
    jakarta.faces.context.ExternalContext
     
    jakarta.faces.application.FacesMessage.Severity
    Return the maximum severity level recorded on any FacesMessages that has been queued, whether or not they are associated with any specific UIComponent.
    List<jakarta.faces.application.FacesMessage>
    Returns a List for all Messages in the current MessageContext that does translation to FacesMessages.
    List<jakarta.faces.application.FacesMessage>
    Returns a List for all Messages with the given clientId in the current MessageContext that does translation to FacesMessages.
    Iterator<jakarta.faces.application.FacesMessage>
    Returns an Iterator for all Messages in the current MessageContext that does translation to FacesMessages.
    Iterator<jakarta.faces.application.FacesMessage>
    getMessages(String clientId)
    Returns an Iterator for all Messages with the given clientId in the current MessageContext that does translation to FacesMessages.
    jakarta.faces.context.PartialViewContext
     
    boolean
     
    boolean
     
    jakarta.faces.context.FacesContext
     
    boolean
     
    boolean
     
    newInstance(RequestContext context, jakarta.faces.lifecycle.Lifecycle lifecycle)
     
    void
     
    void
     
    void
     

    Methods inherited from class jakarta.faces.context.FacesContextWrapper

    getApplication, getAttributes, getCurrentPhaseId, getExceptionHandler, getLifecycle, getNamingContainerSeparatorChar, getRenderKit, getResourceLibraryContracts, getResponseStream, getResponseWriter, getViewRoot, isProcessingEvents, isProjectStage, isReleased, setCurrentPhaseId, setExceptionHandler, setProcessingEvents, setResourceLibraryContracts, setResponseStream, setResponseWriter, setViewRoot, validationFailed

    Methods inherited from class jakarta.faces.context.FacesContext

    getCurrentInstance, setCurrentInstance

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlowFacesContext

      public FlowFacesContext(RequestContext context, jakarta.faces.context.FacesContext wrapped)
  • Method Details

    • getWrapped

      public jakarta.faces.context.FacesContext getWrapped()
      Specified by:
      getWrapped in interface jakarta.faces.FacesWrapper<jakarta.faces.context.FacesContext>
      Overrides:
      getWrapped in class jakarta.faces.context.FacesContextWrapper
    • release

      public void release()
      Overrides:
      release in class jakarta.faces.context.FacesContextWrapper
    • getExternalContext

      public jakarta.faces.context.ExternalContext getExternalContext()
      Overrides:
      getExternalContext in class jakarta.faces.context.FacesContextWrapper
    • getPartialViewContext

      public jakarta.faces.context.PartialViewContext getPartialViewContext()
      Overrides:
      getPartialViewContext in class jakarta.faces.context.FacesContextWrapper
    • getELContext

      public jakarta.el.ELContext getELContext()
      Overrides:
      getELContext in class jakarta.faces.context.FacesContextWrapper
    • getRenderResponse

      public boolean getRenderResponse()
      Overrides:
      getRenderResponse in class jakarta.faces.context.FacesContextWrapper
    • getResponseComplete

      public boolean getResponseComplete()
      Overrides:
      getResponseComplete in class jakarta.faces.context.FacesContextWrapper
    • renderResponse

      public void renderResponse()
      Overrides:
      renderResponse in class jakarta.faces.context.FacesContextWrapper
    • responseComplete

      public void responseComplete()
      Overrides:
      responseComplete in class jakarta.faces.context.FacesContextWrapper
    • isValidationFailed

      public boolean isValidationFailed()
      Overrides:
      isValidationFailed in class jakarta.faces.context.FacesContextWrapper
    • addMessage

      public void addMessage(String clientId, jakarta.faces.application.FacesMessage message)
      Translates a FacesMessage to a Spring Web Flow message and adds it to the current MessageContext
      Overrides:
      addMessage in class jakarta.faces.context.FacesContextWrapper
    • getClientIdsWithMessages

      public Iterator<String> getClientIdsWithMessages()
      Returns an Iterator for all component clientId's for which messages have been added.
      Overrides:
      getClientIdsWithMessages in class jakarta.faces.context.FacesContextWrapper
    • getMaximumSeverity

      public jakarta.faces.application.FacesMessage.Severity getMaximumSeverity()
      Return the maximum severity level recorded on any FacesMessages that has been queued, whether or not they are associated with any specific UIComponent. If no such messages have been queued, return null.
      Overrides:
      getMaximumSeverity in class jakarta.faces.context.FacesContextWrapper
    • getMessages

      public Iterator<jakarta.faces.application.FacesMessage> getMessages()
      Returns an Iterator for all Messages in the current MessageContext that does translation to FacesMessages.
      Overrides:
      getMessages in class jakarta.faces.context.FacesContextWrapper
    • getMessageList

      public List<jakarta.faces.application.FacesMessage> getMessageList()
      Returns a List for all Messages in the current MessageContext that does translation to FacesMessages.
      Overrides:
      getMessageList in class jakarta.faces.context.FacesContextWrapper
    • getMessages

      public Iterator<jakarta.faces.application.FacesMessage> getMessages(String clientId)
      Returns an Iterator for all Messages with the given clientId in the current MessageContext that does translation to FacesMessages.
      Overrides:
      getMessages in class jakarta.faces.context.FacesContextWrapper
    • getMessageList

      public List<jakarta.faces.application.FacesMessage> getMessageList(String clientId)
      Returns a List for all Messages with the given clientId in the current MessageContext that does translation to FacesMessages.
      Overrides:
      getMessageList in class jakarta.faces.context.FacesContextWrapper
    • isPostback

      public boolean isPostback()
      Overrides:
      isPostback in class jakarta.faces.context.FacesContextWrapper
    • newInstance

      public static FlowFacesContext newInstance(RequestContext context, jakarta.faces.lifecycle.Lifecycle lifecycle)