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 JSF application as follows:
- Support for CDI in
Converter
s andValidator
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.- Since:
- 1.6
- Author:
- Radu Creanga <[email protected]>, 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 Converter
createConverter(Class<?> forClass)
If the there's a CDI managedConverter
instance available, then return it, else delegate toApplicationWrapper.getWrapped()
which may return the JSF managedConverter
instance.Converter
createConverter(String converterId)
If the there's a CDI managedConverter
instance available, then return it, else delegate toApplicationWrapper.getWrapped()
which may return the JSF managedConverter
instance.Validator
createValidator(String validatorId)
If the there's a CDI managedValidator
instance available, then return it, else delegate toApplicationWrapper.getWrapped()
which may return the JSF managedValidator
instance.-
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 managedConverter
instance available, then return it, else delegate toApplicationWrapper.getWrapped()
which may return the JSF managedConverter
instance.- Overrides:
createConverter
in classApplicationWrapper
-
createConverter
public Converter createConverter(Class<?> forClass)
If the there's a CDI managedConverter
instance available, then return it, else delegate toApplicationWrapper.getWrapped()
which may return the JSF managedConverter
instance.- Overrides:
createConverter
in classApplicationWrapper
-
createValidator
public Validator createValidator(String validatorId)
If the there's a CDI managedValidator
instance available, then return it, else delegate toApplicationWrapper.getWrapped()
which may return the JSF managedValidator
instance.- Overrides:
createValidator
in classApplicationWrapper
-
-