Class FacesConverter<T>

java.lang.Object
org.ocpsoft.rewrite.faces.config.FacesConverter<T>
All Implemented Interfaces:
org.ocpsoft.rewrite.param.Converter<T>, org.ocpsoft.rewrite.param.ParameterConfigurator

public class FacesConverter<T> extends Object implements org.ocpsoft.rewrite.param.Converter<T>
Adapter class that allows to use JSF converters with Rewrite framework Converter instances.
Author:
Christian Kaltepoth
  • Method Details

    • forType

      public static <T> FacesConverter<T> forType(Class<?> targetType)
      Create a Converter adapter for the given target type. The converter will use Application.createConverter(Class) to obtain the underlying JSF converter.
    • forId

      public static <T> FacesConverter<T> forId(String converterId)
      Create a Converter with the given ID. The converter will use {@link Application#createConverter(String))} to obtain the underlying JSF converter.
    • convert

      public T convert(org.ocpsoft.rewrite.event.Rewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, Object value)
      Specified by:
      convert in interface org.ocpsoft.rewrite.param.Converter<T>
    • toString

      public String toString()
      Overrides:
      toString in class Object