Class FacesUtils

java.lang.Object
net.thevpc.common.jsf.FacesUtils

public class FacesUtils extends Object
Author:
taha.bensalah@gmail.com
  • Constructor Details

    • FacesUtils

      public FacesUtils()
  • Method Details

    • createVerbatimUIOutput

      public static javax.faces.component.UIOutput createVerbatimUIOutput(String html)
    • createSelectItem

      public static javax.faces.model.SelectItem createSelectItem(String value, String label)
    • createSelectItem

      public static javax.faces.model.SelectItem createSelectItem(String value, String label, String styleClass)
    • createSelectItem

      public static javax.faces.model.SelectItem createSelectItem(String value, String label, String styleClass, String style, String desc, boolean disabled)
    • evaluateEL

      public static Object evaluateEL(String p_expression)
    • createSetPropertyActionListener

      public static SetPropertyActionListenerImpl createSetPropertyActionListener(String expression, String value, Class type)
    • createActionListener

      public static javax.faces.event.MethodExpressionActionListener createActionListener(String expression, Class... expectedParameterTypes)
    • createMethodExpression

      public static javax.el.MethodExpression createMethodExpression(String expression, Class returnType, Class... expectedParameterTypes)
    • createValueExpression

      public static javax.el.ValueExpression createValueExpression(String expression, Class returnType)
    • getServletContext

      public static javax.servlet.ServletContext getServletContext()
    • getRootViewId

      public static String getRootViewId()
    • valueBinding

      public static void valueBinding(String param, String code, javax.faces.component.UIComponent Nom1)
    • getExternalContext

      public static javax.faces.context.ExternalContext getExternalContext()
    • getHttpSession

      public static javax.servlet.http.HttpSession getHttpSession(boolean create)
    • getHttpRequest

      public static javax.servlet.http.HttpServletRequest getHttpRequest()
    • getManagedBean

      public static Object getManagedBean(String beanName)
      Get managed bean based on the bean name.
      Parameters:
      beanName - the bean name
      Returns:
      the managed bean associated with the bean name
    • resetManagedBean

      public static void resetManagedBean(String beanName, Object o)
      Remove the managed bean based on the bean name.
      Parameters:
      beanName - the bean name of the managed bean to be removed
    • setManagedBeanInSession

      public static void setManagedBeanInSession(String beanName, Object managedBean)
      Store the managed bean inside the session scope.
      Parameters:
      beanName - the name of the managed bean to be stored
      managedBean - the managed bean to be stored
    • redirect

      public static void redirect(String url) throws IOException
      Throws:
      IOException
    • getRequestParameter

      public static String getRequestParameter(String name)
      Get parameter value from request scope.
      Parameters:
      name - the name of the parameter
      Returns:
      the parameter value
    • setRequestParameter

      public static String setRequestParameter(String key, String value)
    • getMessagesPresent

      public static boolean getMessagesPresent()
    • addInfoMessage

      public static void addInfoMessage(String msg)
    • addInfoMessage

      public static void addInfoMessage(String msg, String title)
    • addInfoMessage

      public static void addInfoMessage(String msg, String title, String clientId)
      Add information message to a specific client.
      Parameters:
      msg - the information message
      title - summary message
      clientId - the client id
    • addWarnMessage

      public static void addWarnMessage(String msg)
    • addWarnMessage

      public static void addWarnMessage(String msg, String title)
    • addWarnMessage

      public static void addWarnMessage(String msg, String title, String clientId)
    • addErrorMessage

      public static void addErrorMessage(String msg)
    • addErrorMessage

      public static void addErrorMessage(String msg, String title)
    • addErrorMessage

      public static void addErrorMessage(String msg, String title, String clientId)
    • addErrorMessage

      public static void addErrorMessage(Throwable msg)
    • addErrorMessage

      public static void addErrorMessage(Throwable msg, String title)
    • addErrorMessage

      public static void addErrorMessage(Throwable msg, String title, String clientId)
    • addFatalMessage

      public static void addFatalMessage(String msg)
    • addFatalMessage

      public static void addFatalMessage(String msg, String title)
    • addFatalMessage

      public static void addFatalMessage(String msg, String title, String clientId)
    • addFatalMessage

      public static void addFatalMessage(Throwable msg)
    • addFatalMessage

      public static void addFatalMessage(Throwable msg, String title)
    • addFatalMessage

      public static void addFatalMessage(Throwable msg, String title, String clientId)
    • clearMessages

      public static void clearMessages()
    • renderResponse

      public static void renderResponse()
    • responseComplete

      public static void responseComplete()
    • getComponent

      public static javax.faces.component.UIComponent getComponent(String id)
    • getComponent

      public static javax.faces.component.UIComponent getComponent(javax.faces.component.UIComponent c, String id)
    • createActionListener

      public static javax.faces.event.MethodExpressionActionListener createActionListener(String actionListenerExpression)
    • openStream

      public static InputStream openStream(String path)
    • getRealRootFolder

      public static String getRealRootFolder()
    • invalidateSession

      public static void invalidateSession()
    • addMessage

      public static void addMessage(javax.faces.application.FacesMessage.Severity severity, String msg, String title)
    • addMessage

      public static void addMessage(javax.faces.application.FacesMessage.Severity severity, String msg)
    • addMessage

      public static void addMessage(javax.faces.application.FacesMessage.Severity severity, String msg, String title, String clientId)