Class FacesUtils

java.lang.Object
org.apache.empire.jsf2.app.FacesUtils

public class FacesUtils extends Object
  • Field Details

  • Constructor Details

    • FacesUtils

      public FacesUtils()
  • Method Details

    • isDevelopmentStage

      public static boolean isDevelopmentStage(javax.faces.context.FacesContext fc)
    • getWebApplication

      public static WebApplication getWebApplication()
    • getFacesImplementation

      public static FacesImplementation getFacesImplementation()
    • getContext

      public static javax.faces.context.FacesContext getContext()
    • getContextLocale

      public static Locale getContextLocale(javax.faces.context.FacesContext fc)
    • getSessionMap

      public static Map<String,Object> getSessionMap(javax.faces.context.FacesContext fc)
    • getHttpRequest

      public static javax.servlet.http.HttpServletRequest getHttpRequest(javax.faces.context.FacesContext fc)
    • getRequestUri

      public static String getRequestUri(javax.faces.context.FacesContext context)
    • getRequestUserAgent

      public static String getRequestUserAgent(javax.faces.context.FacesContext context)
    • getRequestAttribute

      public static Object getRequestAttribute(String key)
    • getRequestAttribute

      public static Object getRequestAttribute(javax.faces.context.FacesContext fc, String key)
    • getRequestAttribute

      public static <T> T getRequestAttribute(javax.faces.context.FacesContext fc, String key, Class<T> clazz)
    • setRequestAttribute

      public static void setRequestAttribute(String key, Object value)
    • setRequestAttribute

      public static void setRequestAttribute(javax.faces.context.FacesContext fc, String key, Object value)
    • getRequestParam

      public static String getRequestParam(javax.faces.context.FacesContext context, String param)
    • getRequestParam

      public static String getRequestParam(String key)
    • isSkipInputValidation

      public static boolean isSkipInputValidation(javax.faces.context.FacesContext fc)
    • isSkipInputValidation

      public static boolean isSkipInputValidation()
    • getComponentAttribute

      public static <T> T getComponentAttribute(javax.faces.component.UIComponent component, String name, Class<T> clazz)
    • getActionEventAttribute

      public static <T> T getActionEventAttribute(javax.faces.event.ActionEvent ae, String name, Class<T> clazz)
    • redirectDirectly

      public static void redirectDirectly(javax.faces.context.FacesContext fc, PageOutcome outcome)
    • redirectDirectly

      public static void redirectDirectly(javax.faces.context.FacesContext fc, PageDefinition page)
    • getPage

      public static <T extends Page> T getPage(javax.faces.context.FacesContext fc)
    • setParameterMapClass

      public static void setParameterMapClass(javax.faces.context.FacesContext fc, Class<? extends ParameterMap> clazz)
    • getParameterMap

      public static ParameterMap getParameterMap(javax.faces.context.FacesContext fc)
    • getParameterMap

      public static ParameterMap getParameterMap()
    • getPageResourceMap

      public static Map<String,Object> getPageResourceMap(javax.faces.context.FacesContext fc)
      returns the page resource map
      Parameters:
      fc - the faces context
      Returns:
      the ressource map
    • getPageResourceMap

      public static Map<String,Object> getPageResourceMap()
    • getManagedBean

      public static Object getManagedBean(javax.faces.context.FacesContext fc, String name)
    • getManagedBean

      public static <T> T getManagedBean(javax.faces.context.FacesContext fc, Class<T> cls, String name)
    • getManagedBean

      public static <T> T getManagedBean(javax.faces.context.FacesContext fc, Class<T> cls)
    • getManagedBean

      public static <T> T getManagedBean(Class<T> cls)
    • getRealPath

      public static String getRealPath(javax.faces.context.FacesContext fc, String path)
    • getFilePath

      public static String getFilePath(javax.faces.context.FacesContext fc, String path, String file)
    • getTextResolver

      public static TextResolver getTextResolver(javax.faces.context.FacesContext fc)
    • resolveText

      public static String resolveText(javax.faces.context.FacesContext fc, String text)
    • resolveText

      public static String resolveText(String text)
    • getMessage

      public static String getMessage(javax.faces.context.FacesContext fc, String key)
    • getMessage

      public static String getMessage(String messageKey)
    • formatMessage

      public static String formatMessage(javax.faces.context.FacesContext fc, String msgKey, Object... params)
    • formatMessage

      public static String formatMessage(String msgKey, Object... params)
    • escapeHtml

      public static String escapeHtml(String text)
      Escapes Text for Html Uses HtmlUtils.getInstance() for escaping
      Parameters:
      text - the text to escape
      Returns:
      the escaped text
    • addFacesMessage

      public static void addFacesMessage(javax.faces.context.FacesContext fc, javax.faces.component.UIComponent comp, javax.faces.application.FacesMessage facesMsg)
    • addFacesMessage

      public static void addFacesMessage(javax.faces.component.UIComponent comp, javax.faces.application.FacesMessage.Severity severity, String message, Object... params)
    • addInfoMessage

      public static void addInfoMessage(String msg, Object... params)
    • addWarnMessage

      public static void addWarnMessage(String msg, Object... params)
    • addErrorMessage

      public static void addErrorMessage(String msg, Object... params)
    • addErrorMessage

      public static void addErrorMessage(javax.faces.component.UIComponent comp, Throwable t)
    • addErrorMessage

      public static void addErrorMessage(Throwable t)
    • getFacesErrorMessage

      public static javax.faces.application.FacesMessage getFacesErrorMessage(javax.faces.context.FacesContext fc, Throwable t)
    • redirectFromError

      public static void redirectFromError(Page page, javax.faces.application.FacesMessage errorMsg)
    • redirectFromError

      public static void redirectFromError(Page page, Throwable t)
    • findInputComponent

      public static javax.faces.component.UIInput findInputComponent(javax.faces.component.UIComponent parent, Column column)
    • findInputComponent

      public static javax.faces.component.UIInput findInputComponent(javax.faces.context.FacesContext fc, String formId, Column column)