Class RendererUtils

java.lang.Object
de.ipb_halle.molecularfaces.util.RendererUtils

public class RendererUtils extends Object
Utility class that supplies convenient functionalities to be used by Renderers.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    convertSubmittedValueToObject(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, Object submittedValue)
    Attempt to convert the submitted value using the given component's converter.
    static String
    convertValueToString(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIInput component, Object value)
    Attempt to convert the value to a String using the given component's converter.
    static void
    decodeComponent(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIInput component)
    Extracts the value of the given component from the request parameter map and sets it as submitted value for this component.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RendererUtils

      private RendererUtils()
  • Method Details

    • decodeComponent

      public static void decodeComponent(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIInput component)
      Extracts the value of the given component from the request parameter map and sets it as submitted value for this component.
      Parameters:
      context - FacesContext for the request we are processing
      component - component to be decoded
      Throws:
      NullPointerException - if context or component are null
    • convertSubmittedValueToObject

      public static Object convertSubmittedValueToObject(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, Object submittedValue) throws jakarta.faces.convert.ConverterException
      Attempt to convert the submitted value using the given component's converter.
      Parameters:
      context - FacesContext for the request we are processing
      component - component being decoded
      submittedValue - submitted value to be converted
      Returns:
      converted value
      Throws:
      jakarta.faces.convert.ConverterException - if the submitted value cannot be converted successfully
      NullPointerException - if context or component are null
    • convertValueToString

      public static String convertValueToString(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIInput component, Object value) throws jakarta.faces.convert.ConverterException
      Attempt to convert the value to a String using the given component's converter.
      Parameters:
      context - FacesContext for the request we are processing
      component - component being encoded
      value - value to be converted
      Returns:
      converted value
      Throws:
      jakarta.faces.convert.ConverterException - if the value cannot be converted successfully
      NullPointerException - if context or component are null