@ApplicationScoped public class ConverterManager extends Object implements ConverterProvider
FacesConverter annotated Converter instances which are made eligible for CDI.
Previously, in OmniFaces 1.6, all converters were proactively collected in an Extension instance. However,
this construct failed when OmniFaces was installed in multiple WARs of an EAR. The extension was EAR-wide, but each
WAR got its own instance injected and only one of them will have access to the collected converters. Since OmniFaces
1.6.1, the whole extension is removed and the converters are now lazily collected in this manager class. See also
issue 251.
OmniApplication| Constructor and Description |
|---|
ConverterManager() |
| Modifier and Type | Method and Description |
|---|---|
Converter |
createConverter(Application application,
Class<?> converterForClass)
Returns the converter instance associated with the given converter for-class,
or
null if there is none. |
Converter |
createConverter(Application application,
String converterId)
Returns the converter instance associated with the given converter ID,
or
null if there is none. |
public Converter createConverter(Application application, String converterId)
ConverterProvidernull if there is none.createConverter in interface ConverterProviderapplication - The involved JSF application.converterId - The converter ID of the desired converter instance.null if there is none.public Converter createConverter(Application application, Class<?> converterForClass)
ConverterProvidernull if there is none.createConverter in interface ConverterProviderapplication - The involved JSF application.converterForClass - The converter for-class of the desired converter instance.null if there is none.