Package de.ipb_halle.molecularfaces.util
Class RendererUtils
java.lang.Object
de.ipb_halle.molecularfaces.util.RendererUtils
Utility class that supplies convenient functionalities to be used by
Renderers.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectconvertSubmittedValueToObject(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 StringconvertValueToString(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 voiddecodeComponent(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.
-
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-FacesContextfor the request we are processingcomponent- component to be decoded- Throws:
NullPointerException- ifcontextorcomponentarenull
-
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-FacesContextfor the request we are processingcomponent- component being decodedsubmittedValue- submitted value to be converted- Returns:
- converted value
- Throws:
jakarta.faces.convert.ConverterException- if the submitted value cannot be converted successfullyNullPointerException- ifcontextorcomponentarenull
-
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-FacesContextfor the request we are processingcomponent- component being encodedvalue- value to be converted- Returns:
- converted value
- Throws:
jakarta.faces.convert.ConverterException- if the value cannot be converted successfullyNullPointerException- ifcontextorcomponentarenull
-