public class OmniApplication
extends javax.faces.application.ApplicationWrapper
Converter
s and Validator
s, so that e.g. @Inject
and
@EJB
work directly in JSF converters and validators without any further modification.
This application is already registered by OmniFaces' own faces-config.xml
and thus gets
auto-initialized when the OmniFaces JAR is bundled in a web application, so end-users do not need to register this
application explicitly themselves.
ConverterProvider
,
ValidatorProvider
Constructor and Description |
---|
OmniApplication(javax.faces.application.Application wrapped)
Construct a new OmniFaces application around the given wrapped application.
|
Modifier and Type | Method and Description |
---|---|
javax.faces.convert.Converter |
createConverter(java.lang.Class<?> targetClass)
If the
ConverterProvider is present and there's a CDI managed Converter instance available, then
return it, else delegate to getWrapped() which may return the JSF managed Converter instance. |
javax.faces.convert.Converter |
createConverter(java.lang.String converterId)
If the
ConverterProvider is present and there's a CDI managed Converter instance available, then
return it, else delegate to getWrapped() which may return the JSF managed Converter instance. |
javax.faces.validator.Validator |
createValidator(java.lang.String validatorId)
If the
ValidatorProvider is present and there's a CDI managed Validator instance available, then
return it, else delegate to getWrapped() which may return the JSF managed Validator instance. |
javax.faces.application.Application |
getWrapped() |
addBehavior, addComponent, addConverter, addConverter, addDefaultValidatorId, addELContextListener, addELResolver, addValidator, createBehavior, createComponent, createComponent, createComponent, createComponent, createComponent, createComponent, createMethodBinding, createValueBinding, evaluateExpressionGet, getActionListener, getBehaviorIds, getComponentTypes, getConverterIds, getConverterTypes, getDefaultLocale, getDefaultRenderKitId, getDefaultValidatorInfo, getELContextListeners, getELResolver, getExpressionFactory, getMessageBundle, getNavigationHandler, getProjectStage, getPropertyResolver, getResourceBundle, getResourceHandler, getStateManager, getSupportedLocales, getValidatorIds, getVariableResolver, getViewHandler, publishEvent, publishEvent, removeELContextListener, setActionListener, setDefaultLocale, setDefaultRenderKitId, setMessageBundle, setNavigationHandler, setPropertyResolver, setResourceHandler, setStateManager, setSupportedLocales, setVariableResolver, setViewHandler, subscribeToEvent, subscribeToEvent, unsubscribeFromEvent, unsubscribeFromEvent
public OmniApplication(javax.faces.application.Application wrapped)
wrapped
- The wrapped application.public javax.faces.convert.Converter createConverter(java.lang.String converterId)
ConverterProvider
is present and there's a CDI managed Converter
instance available, then
return it, else delegate to getWrapped()
which may return the JSF managed Converter
instance.createConverter
in class javax.faces.application.ApplicationWrapper
public javax.faces.convert.Converter createConverter(java.lang.Class<?> targetClass)
ConverterProvider
is present and there's a CDI managed Converter
instance available, then
return it, else delegate to getWrapped()
which may return the JSF managed Converter
instance.createConverter
in class javax.faces.application.ApplicationWrapper
public javax.faces.validator.Validator createValidator(java.lang.String validatorId) throws javax.faces.FacesException
ValidatorProvider
is present and there's a CDI managed Validator
instance available, then
return it, else delegate to getWrapped()
which may return the JSF managed Validator
instance.createValidator
in class javax.faces.application.ApplicationWrapper
javax.faces.FacesException
public javax.faces.application.Application getWrapped()
getWrapped
in interface javax.faces.FacesWrapper<javax.faces.application.Application>
getWrapped
in class javax.faces.application.ApplicationWrapper