org.jboss.seam.faces
Class FacesManager

java.lang.Object
  extended by org.jboss.seam.core.Manager
      extended by org.jboss.seam.faces.FacesManager

@Scope(value=EVENT)
@Name(value="org.jboss.seam.core.manager")
@Install(precedence=10,
         classDependencies="javax.faces.context.FacesContext")
@BypassInterceptors
public class FacesManager
extends Manager

An extended conversation manager for the JSF environment.

Author:
Gavin King, Thomas Heute

Field Summary
 
Fields inherited from class org.jboss.seam.core.Manager
EVENT_CONVERSATION_BEGIN, EVENT_CONVERSATION_DESTROYED, EVENT_CONVERSATION_END, EVENT_CONVERSATION_TIMEOUT, REDIRECT_FROM_MANAGER
 
Constructor Summary
FacesManager()
           
 
Method Summary
 String appendConversationIdFromRedirectFilter(String url, String viewId)
          Called by the Seam Redirect Filter when a redirect is called.
 void beforeRedirect(String viewId)
          Temporarily promote a temporary conversation to a long running conversation for the duration of a browser redirect.
protected  String generateInitialConversationId()
           
static FacesManager instance()
           
 void interpolateAndRedirect(String url)
           
 void prepareBackswitch(javax.faces.context.FacesContext facesContext)
          If a page description is defined, remember the description and view id for the current page, to support conversation switching.
 void redirect(String viewId)
          Redirect to the given view id, encoding the conversation id into the request URL.
 void redirect(String viewId, Map<String,Object> parameters, boolean includeConversationId)
           
 void redirect(String viewId, Map<String,Object> parameters, boolean includeConversationId, boolean includePageParams)
          Redirect to the given view id, after encoding parameters and conversation id into the request URL.
 void redirect(String viewId, String conversationId)
          Redirect to the given view id, after encoding the given conversation id into the request URL.
 void redirectToExternalURL(String url)
           
protected  void storeConversationToViewRootIfNecessary()
           
 
Methods inherited from class org.jboss.seam.core.Manager
beforeRedirect, beginConversation, beginNestedConversation, conversationTimeout, encodeConversationId, encodeConversationId, encodeConversationId, encodeConversationIdParameter, encodeParameters, endConversation, endRequest, endRootConversation, flushConversationMetadata, getConcurrentRequestTimeout, getConversationIdParameter, getConversationTimeout, getCurrentConversationConcurrentRequestTimeout, getCurrentConversationDescription, getCurrentConversationEntry, getCurrentConversationId, getCurrentConversationIdStack, getCurrentConversationTimeout, getCurrentConversationViewId, getDefaultFlushMode, getParentConversationId, getParentConversationIdParameter, getParentConversationViewId, getRootConversationId, getUriEncoding, handleConversationPropagation, initializeTemporaryConversation, isDifferentConversationId, isLongRunningConversation, isLongRunningOrNestedConversation, isNestedConversation, isReallyLongRunningConversation, killAllOtherConversations, leaveConversation, restoreConversation, setConcurrentRequestTimeout, setConversationIdParameter, setConversationTimeout, setCurrentConversationId, setCurrentConversationIdStack, setDefaultFlushMode, setLongRunningConversation, setParentConversationIdParameter, setUriEncoding, switchConversation, switchConversation, toString, unlockConversation, updateCurrentConversationId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FacesManager

public FacesManager()
Method Detail

beforeRedirect

public void beforeRedirect(String viewId)
Temporarily promote a temporary conversation to a long running conversation for the duration of a browser redirect. After the redirect, the conversation will be demoted back to a temporary conversation. Handle any changes to the conversation id, due to propagation via natural id.


interpolateAndRedirect

public void interpolateAndRedirect(String url)

storeConversationToViewRootIfNecessary

protected void storeConversationToViewRootIfNecessary()
Overrides:
storeConversationToViewRootIfNecessary in class Manager

generateInitialConversationId

protected String generateInitialConversationId()
Overrides:
generateInitialConversationId in class Manager

redirectToExternalURL

public void redirectToExternalURL(String url)

redirect

public void redirect(String viewId)
Redirect to the given view id, encoding the conversation id into the request URL.

Overrides:
redirect in class Manager
Parameters:
viewId - the JSF view id

redirect

public void redirect(String viewId,
                     Map<String,Object> parameters,
                     boolean includeConversationId)

redirect

public void redirect(String viewId,
                     Map<String,Object> parameters,
                     boolean includeConversationId,
                     boolean includePageParams)
Redirect to the given view id, after encoding parameters and conversation id into the request URL.

Parameters:
viewId - the JSF view id
parameters - request parameters to be encoded (possibly null)
includeConversationId - determines if the conversation id is to be encoded

redirect

public void redirect(String viewId,
                     String conversationId)
Redirect to the given view id, after encoding the given conversation id into the request URL.

Overrides:
redirect in class Manager
Parameters:
viewId - the JSF view id
conversationId - an id of a long-running conversation

appendConversationIdFromRedirectFilter

public String appendConversationIdFromRedirectFilter(String url,
                                                     String viewId)
Called by the Seam Redirect Filter when a redirect is called. Appends the conversationId parameter if necessary.

Parameters:
url - the requested URL
Returns:
the resulting URL with the conversationId appended

prepareBackswitch

public void prepareBackswitch(javax.faces.context.FacesContext facesContext)
If a page description is defined, remember the description and view id for the current page, to support conversation switching. Called just before the render phase.


instance

public static FacesManager instance()


Copyright © 2011 Seam Framework. All Rights Reserved.