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

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


org.jboss.seam.core
Class Pages

java.lang.Object
  extended by org.jboss.seam.core.Pages

@Scope(value=APPLICATION)
@Intercept(value=NEVER)
@Name(value="org.jboss.seam.core.pages")
@Install(precedence=0)
public class Pages
extends Object

Holds metadata for pages defined in pages.xml, including page actions and page descriptions.

Author:
Gavin King

Constructor Summary
Pages()
           
 
Method Summary
 void applyRequestParameterValues(javax.faces.context.FacesContext facesContext)
          Apply any page parameters passed as parameter values to the model.
 void applyViewRootValues(javax.faces.context.FacesContext facesContext)
          Apply any page parameters passed as view root attributes to the model.
 String encodePageParameters(javax.faces.context.FacesContext facesContext, String url, String viewId)
          Encode page parameters into a URL
 String encodePageParameters(javax.faces.context.FacesContext facesContext, String url, String viewId, Set<String> overridden)
          Encode page parameters into a URL
 String encodeScheme(String viewId, javax.faces.context.FacesContext context, String url)
           
 boolean enterPage(javax.faces.context.FacesContext facesContext)
          Call page actions, and validate the existence of a conversation for pages which require a long-running conversation, starting with the most general view id, ending at the most specific
 Map<String,Object> getConvertedParameters(javax.faces.context.FacesContext facesContext, String viewId)
          Get the values of any page parameters by evaluating the value bindings against the model and converting to String.
 Map<String,Object> getConvertedParameters(javax.faces.context.FacesContext facesContext, String viewId, Set<String> overridden)
          Get the values of any page parameters by evaluating the value bindings against the model and converting to String.
static Map<String,javax.faces.application.FacesMessage.Severity> getFacesMessageValuesMap()
           
 String getLoginViewId()
           
 String getNoConversationViewId()
          The global setting for no-conversation-viewid.
 String getNoConversationViewId(String viewId)
          Search for a defined no-conversation-view-id, beginning with the most specific view id, then wildcarded view ids, and finally the global setting
 Page getPage(String viewId)
          Get the Page object for the given view id.
protected  List<Page> getPageStack(String viewId)
          Get the stack of Page objects, from least specific to most specific, that match the given view id.
protected  Map<String,Object> getParameters(String viewId)
          Get the values of any page parameters by evaluating the value bindings against the model.
 List<ResourceBundle> getResourceBundles(String viewId)
          Build a list of page-scoped resource bundles, from most specific view id, to most general.
 String getScheme(String viewId)
           
static String getSuffix()
           
 Integer getTimeout(String viewId)
          Search for a defined conversation timeout, beginning with the most specific view id, then wildcarded view ids, and finally the global setting from Manager
 Map<String,Object> getViewRootValues(javax.faces.context.FacesContext facesContext)
           
static void handleOutcome(javax.faces.context.FacesContext facesContext, String outcome, String fromAction)
          Call the JSF navigation handler
 void initialize()
           
static Pages instance()
           
 boolean navigate(javax.faces.context.FacesContext context, String actionExpression, String actionOutcomeValue)
          Run any navigation rule defined in pages.xml
protected  void noConversation()
           
protected  void notLoggedIn()
           
 void redirectToLoginView()
           
 void redirectToNoConversationView()
           
 void setLoginViewId(String loginViewId)
           
 void setNoConversationViewId(String noConversationViewId)
           
 void storePageParameters(javax.faces.context.FacesContext facesContext)
          Store the page parameters to the JSF view root
static String toString(Object returnValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pages

public Pages()
Method Detail

initialize

@Create
public void initialize()

navigate

public boolean navigate(javax.faces.context.FacesContext context,
                        String actionExpression,
                        String actionOutcomeValue)
Run any navigation rule defined in pages.xml

Parameters:
actionExpression - the action method binding expression
actionOutcomeValue - the outcome of the action method
Returns:
true if a navigation rule was found

getPage

public Page getPage(String viewId)
Get the Page object for the given view id.

Parameters:
viewId - a JSF view id

getPageStack

protected List<Page> getPageStack(String viewId)
Get the stack of Page objects, from least specific to most specific, that match the given view id.

Parameters:
viewId - a JSF view id

enterPage

public boolean enterPage(javax.faces.context.FacesContext facesContext)
Call page actions, and validate the existence of a conversation for pages which require a long-running conversation, starting with the most general view id, ending at the most specific


encodeScheme

public String encodeScheme(String viewId,
                           javax.faces.context.FacesContext context,
                           String url)

redirectToLoginView

public void redirectToLoginView()

redirectToNoConversationView

public void redirectToNoConversationView()

getScheme

public String getScheme(String viewId)

noConversation

protected void noConversation()

notLoggedIn

protected void notLoggedIn()

toString

public static String toString(Object returnValue)

handleOutcome

public static void handleOutcome(javax.faces.context.FacesContext facesContext,
                                 String outcome,
                                 String fromAction)
Call the JSF navigation handler


instance

public static Pages instance()

getResourceBundles

public List<ResourceBundle> getResourceBundles(String viewId)
Build a list of page-scoped resource bundles, from most specific view id, to most general.


getConvertedParameters

public Map<String,Object> getConvertedParameters(javax.faces.context.FacesContext facesContext,
                                                 String viewId)
Get the values of any page parameters by evaluating the value bindings against the model and converting to String.

Parameters:
viewId - the JSF view id
Returns:
a map of page parameter name to String value

getParameters

protected Map<String,Object> getParameters(String viewId)
Get the values of any page parameters by evaluating the value bindings against the model.

Parameters:
viewId - the JSF view id
Returns:
a map of page parameter name to value

getConvertedParameters

public Map<String,Object> getConvertedParameters(javax.faces.context.FacesContext facesContext,
                                                 String viewId,
                                                 Set<String> overridden)
Get the values of any page parameters by evaluating the value bindings against the model and converting to String.

Parameters:
viewId - the JSF view id
overridden - excluded parameters
Returns:
a map of page parameter name to String value

applyRequestParameterValues

public void applyRequestParameterValues(javax.faces.context.FacesContext facesContext)
Apply any page parameters passed as parameter values to the model.


applyViewRootValues

public void applyViewRootValues(javax.faces.context.FacesContext facesContext)
Apply any page parameters passed as view root attributes to the model.


getViewRootValues

public Map<String,Object> getViewRootValues(javax.faces.context.FacesContext facesContext)

getNoConversationViewId

public String getNoConversationViewId()
The global setting for no-conversation-viewid.

Returns:
a JSF view id

setNoConversationViewId

public void setNoConversationViewId(String noConversationViewId)

encodePageParameters

public String encodePageParameters(javax.faces.context.FacesContext facesContext,
                                   String url,
                                   String viewId)
Encode page parameters into a URL

Parameters:
url - the base URL
viewId - the JSF view id of the page
Returns:
the URL with parameters appended

encodePageParameters

public String encodePageParameters(javax.faces.context.FacesContext facesContext,
                                   String url,
                                   String viewId,
                                   Set<String> overridden)
Encode page parameters into a URL

Parameters:
url - the base URL
viewId - the JSF view id of the page
overridden - excluded parameters
Returns:
the URL with parameters appended

storePageParameters

public void storePageParameters(javax.faces.context.FacesContext facesContext)
Store the page parameters to the JSF view root


getNoConversationViewId

public String getNoConversationViewId(String viewId)
Search for a defined no-conversation-view-id, beginning with the most specific view id, then wildcarded view ids, and finally the global setting


getTimeout

public Integer getTimeout(String viewId)
Search for a defined conversation timeout, beginning with the most specific view id, then wildcarded view ids, and finally the global setting from Manager


getSuffix

public static String getSuffix()

getFacesMessageValuesMap

public static Map<String,javax.faces.application.FacesMessage.Severity> getFacesMessageValuesMap()

getLoginViewId

public String getLoginViewId()

setLoginViewId

public void setLoginViewId(String loginViewId)