站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.2.0 patch1 API 英文版文档

Redirect (JBoss Seam API Documentation) - JBoss Seam 1.2.0 patch1 API 英文版文档


org.jboss.seam.core
Class Redirect

java.lang.Object
  extended by org.jboss.seam.core.AbstractMutable
      extended by org.jboss.seam.core.Redirect
All Implemented Interfaces:
Serializable, Mutable

@Name(value="org.jboss.seam.core.redirect")
@Intercept(value=NEVER)
@Scope(value=CONVERSATION)
@Install(precedence=0)
@PerNestedConversation
public class Redirect
extends AbstractMutable
implements Serializable

Convenient API for performing browser redirects with parameters.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
Redirect()
           
 
Method Summary
 void captureCurrentRequest()
          Deprecated. use captureCurrentView()
 void captureCurrentView()
          Capture the view id and page parameters from the current request and squirrel them away so we can return here later in the conversation.
 void execute()
          Perform the redirect
 Map<String,Object> getParameters()
          Get all the request parameters that have been set
 String getViewId()
          Get the JSF view id to redirect to
static Redirect instance()
           
 boolean isConversationPropagationEnabled()
          Should the conversation be propagated across the redirect?
 boolean returnToCapturedView()
          Redirect to the captured view, and end any conversation that began in captureCurrentView().
 void setConversationPropagationEnabled(boolean conversationPropagationEnabled)
          Note that conversations are propagated by default
 void setParameter(String name, Object value)
          Set a request parameter value (to set a multi-valued request parameter, pass an array or collection as the value)
 void setViewId(String viewId)
          Set the JSF view id to redirect to
 
Methods inherited from class org.jboss.seam.core.AbstractMutable
clearDirty, setDirty, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Redirect

public Redirect()
Method Detail

getViewId

public String getViewId()
Get the JSF view id to redirect to


setViewId

public void setViewId(String viewId)
Set the JSF view id to redirect to

Parameters:
viewId - any JSF view id

getParameters

public Map<String,Object> getParameters()
Get all the request parameters that have been set


setParameter

public void setParameter(String name,
                         Object value)
Set a request parameter value (to set a multi-valued request parameter, pass an array or collection as the value)


captureCurrentRequest

public void captureCurrentRequest()
Deprecated. use captureCurrentView()

Capture the view id and request parameters from the current request and squirrel them away so we can return here later in the conversation.


captureCurrentView

public void captureCurrentView()
Capture the view id and page parameters from the current request and squirrel them away so we can return here later in the conversation. If no conversation is active, begin a conversation.

See Also:
returnToCapturedView()

isConversationPropagationEnabled

public boolean isConversationPropagationEnabled()
Should the conversation be propagated across the redirect?

Returns:
true by default

setConversationPropagationEnabled

public void setConversationPropagationEnabled(boolean conversationPropagationEnabled)
Note that conversations are propagated by default


execute

public void execute()
Perform the redirect


returnToCapturedView

public boolean returnToCapturedView()
Redirect to the captured view, and end any conversation that began in captureCurrentView().

See Also:
captureCurrentView()

instance

public static Redirect instance()