|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.faces.util.context.internal.FacesContextHelperImpl
public class FacesContextHelperImpl
| Constructor Summary | |
|---|---|
FacesContextHelperImpl()
|
|
| Method Summary | |
|---|---|
void |
addComponentErrorMessage(String clientId,
String messageId)
Adds the specified key as a message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_ERROR. |
void |
addComponentErrorMessage(String clientId,
String messageId,
Object... arguments)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument(s) for the
tokens in the specified key. |
void |
addComponentErrorMessage(String clientId,
String messageId,
Object argument)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument for the tokens
in the specified key. |
void |
addComponentInfoMessage(String clientId,
String messageId)
Adds the specified key as a message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_INFO. |
void |
addComponentInfoMessage(String clientId,
String messageId,
Object... arguments)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument(s) for the
tokens in the specified key. |
void |
addComponentInfoMessage(String clientId,
String messageId,
Object argument)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument for the tokens
in the specified key. |
void |
addGlobalErrorMessage(String messageId)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_ERROR. |
void |
addGlobalErrorMessage(String messageId,
Object... arguments)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument(s) for the
tokens in the specified key. |
void |
addGlobalErrorMessage(String messageId,
Object argument)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument for the tokens
in the specified key. |
void |
addGlobalInfoMessage(String messageId)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_INFO. |
void |
addGlobalInfoMessage(String messageId,
Object... arguments)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument(s) for the
tokens in the specified key. |
void |
addGlobalInfoMessage(String messageId,
Object argument)
Adds the specified key as a global message to the FacesContext with severity
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument for the tokens
in the specified key. |
void |
addGlobalSuccessInfoMessage()
Adds a global information message to the current FacesContext with "your-request-processed-successfully" key as the messageId. |
void |
addGlobalUnexpectedErrorMessage()
Adds a global error message to the current FacesContext with "an-unexpected-error-occurred" key as the messageId. |
void |
addMessage(String clientId,
javax.faces.application.FacesMessage.Severity severity,
String messageId)
Adds the specified key as a message associated with the UIComponent that has the specified clientId. |
void |
addMessage(String clientId,
javax.faces.application.FacesMessage.Severity severity,
String messageId,
Object... arguments)
Adds the specified key as a message associated with the UIComponent that has the specified clientId. |
void |
addMessage(String clientId,
javax.faces.application.FacesMessage.Severity severity,
String messageId,
Object argument)
Adds the specified key as a message associated with the UIComponent that has the specified clientId. |
javax.faces.context.FacesContext |
getFacesContext()
Gets the underlying/wrapped FacesContext ThreadLocal singleton instance. |
Locale |
getLocale()
Returns the locale of the viewRoot of the current JSF FacesContext |
String |
getMessage(Locale locale,
String messageId)
Returns the message associated with the specified messageId by delegating to the FacesMessageFactory, according to the specified locale. |
String |
getMessage(Locale locale,
String messageId,
Object... arguments)
Returns the message associated with the specified messageId by delegating to the FacesMessageFactory, according to the specified locale and arguments that are to be substituted. |
String |
getMessage(String messageId)
Returns the message associated with the specified messageId by delegating to the FacesMessageFactory, according to the current locale. |
String |
getMessage(String messageId,
Object... arguments)
Returns the message associated with the specified messageId by delegating to the FacesMessageFactory, according to the current locale and arguments that are to be substituted. |
protected MessageContext |
getMessageContext()
|
String |
getNamespace()
Delegates to the underlying ExternalContext.encodeNamespace(String) method in order to get the
application namespace. |
javax.faces.component.UIForm |
getParentForm(javax.faces.component.UIComponent uiComponent)
Return the parent form of the given component. |
Object |
getRequestAttribute(String name)
Returns the value of the request attribute associated with the specified name. |
String |
getRequestContextPath()
|
String |
getRequestParameter(String name)
Retrieves the specified parameter passed as part of the request |
boolean |
getRequestParameterAsBool(String name,
boolean defaultValue)
Retrieves the specified parameter passed as part of the request as a boolean. |
int |
getRequestParameterAsInt(String name,
int defaultValue)
Retrieves the specified parameter passed as part of the request as an integer. |
long |
getRequestParameterAsLong(String name,
long defaultValue)
Retrieves the specified parameter passed as part of the request as an integer. |
String |
getRequestParameterFromMap(String name)
Retrieves the specified parameter from the ExternalContext's request parameter map. |
Map<String,String> |
getRequestParameterMap()
Returns the map of request parameters from the ExternalContext. |
String |
getRequestQueryString()
Retrieves the value of the original "javax.servlet.forward.query_string" request attribute. |
String |
getRequestQueryStringParameter(String name)
Retrieves the value of the specified parameter name from the original "javax.servlet.forward.query_string" request attribute. |
Object |
getSession(boolean create)
Returns the session object associated with the current FacesContext. |
Object |
getSessionAttribute(String name)
Returns the value of the session attribute associated with the specified name. |
javax.faces.component.UIComponent |
matchComponentInHierarchy(javax.faces.component.UIComponent parent,
String partialClientId)
Traverses the component tree starting at the specified UIComponent parent and returns the first UIComponent child that contains the specified partialClientId. |
javax.faces.component.UIComponent |
matchComponentInViewRoot(String partialClientId)
Traverses the component tree associated with the UIViewRoot of this FacesContext and returns the first UIComponent child that contains the specified partialClientId. |
void |
navigate(String fromAction,
String outcome)
Sets the current JSF navigation to the specified outcome. |
void |
navigateTo(String outcome)
Sets the current JSF navigation to the specified outcome. |
void |
recreateComponentTree()
Delete the whole component tree. |
void |
registerPhaseListener(javax.faces.event.PhaseListener phaseListener)
Register a PhaseListener programatically (instead of in the faces-config.xml). |
void |
removeChildrenFromComponentTree(String clientId)
clear component tree since input fields will not be refreshed. |
void |
removeMessages(String clientId)
Removes all FacesMessage instances from this FacesContext that are associated with the specified clientId. |
void |
removeMessagesForImmediateComponents()
Removes all FacesMessage instances from this FacesContext that are associated with components whose immediate attribute is true.The typical use case for this method is when seemingly bogus messages are added to the FacesContext on components whose immediate attribute is true. |
void |
removeMessagesForImmediateComponents(javax.faces.component.UIComponent uiComponent)
Removes all FacesMessage instances from this FacesContext that are associated with components whose immediate attribute is true.The typical use case for this method is when seemingly bogus messages are added to the FacesContext on components whose immediate attribute is true. |
void |
removeParentFormFromComponentTree(javax.faces.component.UIComponent uiComponent)
Delete the component subtree of a given component. |
void |
resetView()
Causes the current view's component tree to be discarded and re-rendered. |
void |
resetView(boolean renderResponse)
Causes the current view's component tree to be discarded and (optionally) re-rendered. |
Object |
resolveExpression(String elExpression)
Returns the object associated with the specified EL expression. |
void |
setRequestAttribute(String name,
Object value)
Sets the value of the a request attribute using the specified name and value. |
void |
setSessionAttribute(String name,
Object value)
Sets the value of the a session attribute using the specified name and value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FacesContextHelperImpl()
| Method Detail |
|---|
public void addComponentErrorMessage(String clientId,
String messageId)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_ERROR. The message will not be global, rather it will be
associated with the javax.faces.component.UIComponent that is associated with the specified
clientId.
addComponentErrorMessage in interface FacesContextHelper
public void addComponentErrorMessage(String clientId,
String messageId,
Object argument)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument for the tokens
in the specified key. The message will not be global, rather it will be associated with the
javax.faces.component.UIComponent that is associated with the specified clientId.
addComponentErrorMessage in interface FacesContextHelper
public void addComponentErrorMessage(String clientId,
String messageId,
Object... arguments)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument(s) for the
tokens in the specified key. The message will not be global, rather it will be associated with the
javax.faces.component.UIComponent that is associated with the specified clientId.
addComponentErrorMessage in interface FacesContextHelper
public void addComponentInfoMessage(String clientId,
String messageId)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_INFO. The message will not be global, rather it will be
associated with the javax.faces.component.UIComponent that is associated with the specified
clientId.
addComponentInfoMessage in interface FacesContextHelper
public void addComponentInfoMessage(String clientId,
String messageId,
Object argument)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument for the tokens
in the specified key. The message will not be global, rather it will be associated with the
javax.faces.component.UIComponent that is associated with the specified clientId.
addComponentInfoMessage in interface FacesContextHelper
public void addComponentInfoMessage(String clientId,
String messageId,
Object... arguments)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument(s) for the
tokens in the specified key. The message will not be global, rather it will be associated with the
javax.faces.component.UIComponent that is associated with the specified clientId.
addComponentInfoMessage in interface FacesContextHelperpublic void addGlobalErrorMessage(String messageId)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_ERROR.
addGlobalErrorMessage in interface FacesContextHelper
public void addGlobalErrorMessage(String messageId,
Object argument)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument for the tokens
in the specified key.
addGlobalErrorMessage in interface FacesContextHelper
public void addGlobalErrorMessage(String messageId,
Object... arguments)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_ERROR and substitutes the specified argument(s) for the
tokens in the specified key.
addGlobalErrorMessage in interface FacesContextHelperpublic void addGlobalInfoMessage(String messageId)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_INFO.
addGlobalInfoMessage in interface FacesContextHelper
public void addGlobalInfoMessage(String messageId,
Object argument)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument for the tokens
in the specified key.
addGlobalInfoMessage in interface FacesContextHelper
public void addGlobalInfoMessage(String messageId,
Object... arguments)
FacesContextHelper
javax.faces.application.FacesMessage.SEVERITY_INFO and substitutes the specified argument(s) for the
tokens in the specified key.
addGlobalInfoMessage in interface FacesContextHelperpublic void addGlobalSuccessInfoMessage()
FacesContextHelper
addGlobalSuccessInfoMessage in interface FacesContextHelperFacesContextHelper.addGlobalSuccessInfoMessage()public void addGlobalUnexpectedErrorMessage()
FacesContextHelper
addGlobalUnexpectedErrorMessage in interface FacesContextHelperFacesContextHelper.addGlobalUnexpectedErrorMessage()
public void addMessage(String clientId,
javax.faces.application.FacesMessage.Severity severity,
String messageId)
FacesContextHelper
addMessage in interface FacesContextHelper
public void addMessage(String clientId,
javax.faces.application.FacesMessage.Severity severity,
String messageId,
Object argument)
FacesContextHelper
addMessage in interface FacesContextHelper
public void addMessage(String clientId,
javax.faces.application.FacesMessage.Severity severity,
String messageId,
Object... arguments)
FacesContextHelper
addMessage in interface FacesContextHelper
public javax.faces.component.UIComponent matchComponentInHierarchy(javax.faces.component.UIComponent parent,
String partialClientId)
FacesContextHelper
matchComponentInHierarchy in interface FacesContextHelperpublic javax.faces.component.UIComponent matchComponentInViewRoot(String partialClientId)
FacesContextHelper
matchComponentInViewRoot in interface FacesContextHelper
public void navigate(String fromAction,
String outcome)
FacesContextHelper
navigate in interface FacesContextHelperfromAction - The "from action" as specified in a JSF navigation rule. Can be null to if no action is
specified in the rule.outcome - The "from outcome" as specified in a JSF navigation rulepublic void navigateTo(String outcome)
FacesContextHelper
navigateTo in interface FacesContextHelperoutcome - The "from outcome" as specified in a JSF navigation rulepublic void recreateComponentTree()
FacesContextHelper
recreateComponentTree in interface FacesContextHelper
public void registerPhaseListener(javax.faces.event.PhaseListener phaseListener)
throws IllegalStateException
FacesContextHelperPhaseListener programatically (instead of in the faces-config.xml). Such a PhaseListener can
therefore be controlled by spring and use dependency injection, which is not possible otherwise.
registerPhaseListener in interface FacesContextHelperIllegalStateExceptionpublic void removeChildrenFromComponentTree(String clientId)
FacesContextHelper
removeChildrenFromComponentTree in interface FacesContextHelperclientId - all children of the component with this id are cleared.public void removeMessages(String clientId)
FacesContextHelper
removeMessages in interface FacesContextHelperpublic void removeMessagesForImmediateComponents()
FacesContextHelperUIInput.processDecodes(javax.faces.context.FacesContext)
calls validate() if the the immediate attribute is true.
removeMessagesForImmediateComponents in interface FacesContextHelperpublic void removeMessagesForImmediateComponents(javax.faces.component.UIComponent uiComponent)
FacesContextHelperUIInput.processDecodes(javax.faces.context.FacesContext)
calls validate() if the the immediate attribute is true.
removeMessagesForImmediateComponents in interface FacesContextHelperpublic void removeParentFormFromComponentTree(javax.faces.component.UIComponent uiComponent)
FacesContextHelper
removeParentFormFromComponentTree in interface FacesContextHelperpublic void resetView()
FacesContextHelper
resetView in interface FacesContextHelperFacesContextHelper.resetView(boolean)public void resetView(boolean renderResponse)
FacesContextHelper
resetView in interface FacesContextHelperrenderResponse - causes the response to be rendered immediately if true.public Object resolveExpression(String elExpression)
FacesContextHelper
resolveExpression in interface FacesContextHelperpublic javax.faces.context.FacesContext getFacesContext()
FacesContextHelper
getFacesContext in interface FacesContextHelperpublic Locale getLocale()
FacesContextHelper
getLocale in interface FacesContextHelperpublic String getMessage(String messageId)
FacesContextHelper
getMessage in interface FacesContextHelper
public String getMessage(String messageId,
Object... arguments)
FacesContextHelper
getMessage in interface FacesContextHelper
public String getMessage(Locale locale,
String messageId)
FacesContextHelper
getMessage in interface FacesContextHelper
public String getMessage(Locale locale,
String messageId,
Object... arguments)
FacesContextHelper
getMessage in interface FacesContextHelperprotected MessageContext getMessageContext()
public String getNamespace()
FacesContextHelperExternalContext.encodeNamespace(String) method in order to get the
application namespace.
getNamespace in interface FacesContextHelperpublic javax.faces.component.UIForm getParentForm(javax.faces.component.UIComponent uiComponent)
FacesContextHelper
getParentForm in interface FacesContextHelpernull if no parent form is found.public Object getRequestAttribute(String name)
FacesContextHelper
getRequestAttribute in interface FacesContextHelper
public void setRequestAttribute(String name,
Object value)
FacesContextHelper
setRequestAttribute in interface FacesContextHelperpublic String getRequestContextPath()
getRequestContextPath in interface FacesContextHelperFacesContext.getExternalContext() ExternalContext.getRequestContextPath()public String getRequestParameter(String name)
FacesContextHelper
getRequestParameter in interface FacesContextHelper
public boolean getRequestParameterAsBool(String name,
boolean defaultValue)
FacesContextHelper
getRequestParameterAsBool in interface FacesContextHelper
public int getRequestParameterAsInt(String name,
int defaultValue)
FacesContextHelper
getRequestParameterAsInt in interface FacesContextHelper
public long getRequestParameterAsLong(String name,
long defaultValue)
FacesContextHelper
getRequestParameterAsLong in interface FacesContextHelperpublic String getRequestParameterFromMap(String name)
FacesContextHelper
getRequestParameterFromMap in interface FacesContextHelperpublic Map<String,String> getRequestParameterMap()
FacesContextHelper
getRequestParameterMap in interface FacesContextHelperExternalContext.getRequestParameterMap()public String getRequestQueryString()
FacesContextHelper
getRequestQueryString in interface FacesContextHelperpublic String getRequestQueryStringParameter(String name)
FacesContextHelper
getRequestQueryStringParameter in interface FacesContextHelperpublic Object getSession(boolean create)
FacesContextHelper
getSession in interface FacesContextHelpercreate - Flag indicating whether or not a session should be created if it doesn't yet exist.public Object getSessionAttribute(String name)
FacesContextHelper
getSessionAttribute in interface FacesContextHelper
public void setSessionAttribute(String name,
Object value)
FacesContextHelper
setSessionAttribute in interface FacesContextHelper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||