org.richfaces.component.util

## Class InputUtils

- java.lang.Object
- - org.richfaces.component.util.InputUtils

-     public final class InputUtils
      extends Object

  Author:
    Maksim Kaszynski, Manfred Geiler

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `InputUtils.ConverterLookupStrategy`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.faces.convert.Converter` | `findConverter(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String property)` Returns `Converter` based on a converter configured for provided `UIComponent` or returns converter for type referenced by given property's `ValueExpression`.
    `static String` | `getConvertedStringValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, InputUtils.ConverterLookupStrategy converterLookupStrategy, Object value)`
    `static String` | `getConvertedStringValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value)`
    `static Object` | `getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, InputUtils.ConverterLookupStrategy converterLookupStrategy, Object val)`
    `static Object` | `getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object val)`
    `static javax.faces.convert.Converter` | `getConverterForType(javax.faces.context.FacesContext context, Class<?> type)` Returns converter for given Java type
    `static String` | `getInputValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `static String` | `getInputValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, InputUtils.ConverterLookupStrategy converterLookupStrategy)`
    `static boolean` | `isDisabled(javax.faces.component.UIComponent component)`
    `static boolean` | `isReadOnly(javax.faces.component.UIComponent component)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isDisabled

          public static boolean isDisabled(javax.faces.component.UIComponent component)

    - #### isReadOnly

          public static boolean isReadOnly(javax.faces.component.UIComponent component)

    - #### getConverterForType

          public static javax.faces.convert.Converter getConverterForType(javax.faces.context.FacesContext context,
                                                          Class<?> type)

      Returns converter for given Java type

    - #### getConvertedStringValue

          public static String getConvertedStringValue(javax.faces.context.FacesContext context,
                                       javax.faces.component.UIComponent component,
                                       Object value)
                                                throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

    - #### getConvertedStringValue

          public static String getConvertedStringValue(javax.faces.context.FacesContext context,
                                       javax.faces.component.UIComponent component,
                                       InputUtils.ConverterLookupStrategy converterLookupStrategy,
                                       Object value)
                                                throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

    - #### findConverter

          public static javax.faces.convert.Converter findConverter(javax.faces.context.FacesContext facesContext,
                                                    javax.faces.component.UIComponent component,
                                                    String property)

      Returns `Converter` based on a converter configured for provided `UIComponent` or returns converter for type referenced by given property's `ValueExpression`.

      If no converter applied for conditions above, null is returned instead.

    - #### getConvertedValue

          public static Object getConvertedValue(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component,
                                 Object val)
                                          throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

    - #### getConvertedValue

          public static Object getConvertedValue(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component,
                                 InputUtils.ConverterLookupStrategy converterLookupStrategy,
                                 Object val)
                                          throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

    - #### getInputValue

          public static String getInputValue(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component)
                                      throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

    - #### getInputValue

          public static String getInputValue(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component,
                             InputUtils.ConverterLookupStrategy converterLookupStrategy)
                                      throws javax.faces.convert.ConverterException

      Throws:
        `javax.faces.convert.ConverterException`

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.