org.jboss.weld.jsf
Class JsfHelper

java.lang.Object
  extended by org.jboss.weld.jsf.JsfHelper

public class JsfHelper
extends java.lang.Object

Helper class for JSF related operations

Author:
Nicklas Karlsson, Dan Allen

Constructor Summary
JsfHelper()
           
 
Method Summary
static java.lang.String getConversationId(javax.faces.context.FacesContext facesContext)
          Gets the propagated conversation id.
static java.lang.String getConversationIdFromRequest(javax.faces.context.FacesContext facesContext)
          Gets the propagated conversation id parameter from the request
static javax.servlet.http.HttpSession getHttpSession(javax.faces.context.FacesContext facesContext)
          Gets the HTTP session
static BeanManagerImpl getModuleBeanManager(javax.faces.context.FacesContext facesContext)
           
static boolean isPostback(javax.faces.context.FacesContext facesContext)
          Checks if the current request is a JSF postback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfHelper

public JsfHelper()
Method Detail

isPostback

public static boolean isPostback(javax.faces.context.FacesContext facesContext)
Checks if the current request is a JSF postback. The JsfApiAbstraction is consulted to determine if the JSF version is compatible with JSF 2.0. If so, the FacesContext#isPostback() convenience method is used (which is technically an optimized and safer implementation). Otherwise, the ResponseStateManager is consulted directly.

Returns:
true if this request is a JSF postback, false otherwise

getConversationIdFromRequest

public static java.lang.String getConversationIdFromRequest(javax.faces.context.FacesContext facesContext)
Gets the propagated conversation id parameter from the request

Returns:
The conversation id (or null if not found)

getConversationId

public static java.lang.String getConversationId(javax.faces.context.FacesContext facesContext)
Gets the propagated conversation id.

Returns:
The conversation id (or null if not found)

getHttpSession

public static javax.servlet.http.HttpSession getHttpSession(javax.faces.context.FacesContext facesContext)
Gets the HTTP session

Returns:
The session

getModuleBeanManager

public static BeanManagerImpl getModuleBeanManager(javax.faces.context.FacesContext facesContext)


Copyright © 2008-2009 Seam Framework. All Rights Reserved.