Package org.omnifaces.application
Class OmniApplication
- java.lang.Object
-
- jakarta.faces.application.Application
-
- jakarta.faces.application.ApplicationWrapper
-
- org.omnifaces.application.OmniApplication
-
- All Implemented Interfaces:
FacesWrapper<Application>
public class OmniApplication extends ApplicationWrapper
This OmniFaces application extends the standard Faces application as follows:
- Support for CDI in
Converters andValidators, so that e.g.@Injectand@EJBwork directly in Faces converters and validators without any further modification.
This application is already registered by OmniFaces' own
faces-config.xmland 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.- Since:
- 1.6
- Author:
- Radu Creanga <rdcrng@gmail.com>, Bauke Scholtz
- See Also:
ConverterManager,ValidatorManager
-
-
Constructor Summary
Constructors Constructor Description OmniApplication(Application wrapped)Construct a new OmniFaces application around the given wrapped application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConvertercreateConverter(Class<?> forClass)If the there's a CDI managedConverterinstance available, then return it, else delegate toApplicationWrapper.getWrapped()which may return the Faces managedConverterinstance.ConvertercreateConverter(String converterId)If the there's a CDI managedConverterinstance available, then return it, else delegate toApplicationWrapper.getWrapped()which may return the Faces managedConverterinstance.ValidatorcreateValidator(String validatorId)If the there's a CDI managedValidatorinstance available, then return it, else delegate toApplicationWrapper.getWrapped()which may return the Faces managedValidatorinstance.-
Methods inherited from class jakarta.faces.application.ApplicationWrapper
addBehavior, addComponent, addConverter, addConverter, addDefaultValidatorId, addELContextListener, addELResolver, addSearchKeywordResolver, addValidator, createBehavior, createComponent, createComponent, createComponent, createComponent, createComponent, createComponent, createMethodBinding, createValueBinding, evaluateExpressionGet, getActionListener, getBehaviorIds, getComponentTypes, getConverterIds, getConverterTypes, getDefaultLocale, getDefaultRenderKitId, getDefaultValidatorInfo, getELContextListeners, getELResolver, getExpressionFactory, getFlowHandler, getMessageBundle, getNavigationHandler, getProjectStage, getPropertyResolver, getResourceBundle, getResourceHandler, getSearchExpressionHandler, getSearchKeywordResolver, getStateManager, getSupportedLocales, getValidatorIds, getVariableResolver, getViewHandler, getWrapped, publishEvent, publishEvent, removeELContextListener, setActionListener, setDefaultLocale, setDefaultRenderKitId, setFlowHandler, setMessageBundle, setNavigationHandler, setPropertyResolver, setResourceHandler, setSearchExpressionHandler, setStateManager, setSupportedLocales, setVariableResolver, setViewHandler, subscribeToEvent, subscribeToEvent, unsubscribeFromEvent, unsubscribeFromEvent
-
-
-
-
Constructor Detail
-
OmniApplication
public OmniApplication(Application wrapped)
Construct a new OmniFaces application around the given wrapped application.- Parameters:
wrapped- The wrapped application.
-
-
Method Detail
-
createConverter
public Converter createConverter(String converterId)
If the there's a CDI managedConverterinstance available, then return it, else delegate toApplicationWrapper.getWrapped()which may return the Faces managedConverterinstance.- Overrides:
createConverterin classApplicationWrapper
-
createConverter
public Converter createConverter(Class<?> forClass)
If the there's a CDI managedConverterinstance available, then return it, else delegate toApplicationWrapper.getWrapped()which may return the Faces managedConverterinstance.- Overrides:
createConverterin classApplicationWrapper
-
createValidator
public Validator createValidator(String validatorId)
If the there's a CDI managedValidatorinstance available, then return it, else delegate toApplicationWrapper.getWrapped()which may return the Faces managedValidatorinstance.- Overrides:
createValidatorin classApplicationWrapper
-
-