public class OmniApplication extends ApplicationWrapper
This OmniFaces application extends the standard JSF application as follows:
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.
ConverterManager
,
ValidatorManager
Constructor and Description |
---|
OmniApplication(Application wrapped)
Construct a new OmniFaces application around the given wrapped application.
|
Modifier and Type | Method and Description |
---|---|
Converter |
createConverter(Class<?> forClass)
If the there's a CDI managed
Converter instance available, then return it, else delegate to
getWrapped() which may return the JSF managed Converter instance. |
Converter |
createConverter(String converterId)
If the there's a CDI managed
Converter instance available, then return it, else delegate to
getWrapped() which may return the JSF managed Converter instance. |
Validator |
createValidator(String validatorId)
If the there's a CDI managed
Validator instance available, then return it, else delegate to
getWrapped() which may return the JSF managed Validator instance. |
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, getFlowHandler, getMessageBundle, getNavigationHandler, getProjectStage, getPropertyResolver, getResourceBundle, getResourceHandler, getStateManager, getSupportedLocales, getValidatorIds, getVariableResolver, getViewHandler, publishEvent, publishEvent, removeELContextListener, setActionListener, setDefaultLocale, setDefaultRenderKitId, setFlowHandler, setMessageBundle, setNavigationHandler, setPropertyResolver, setResourceHandler, setStateManager, setSupportedLocales, setVariableResolver, setViewHandler, subscribeToEvent, subscribeToEvent, unsubscribeFromEvent, unsubscribeFromEvent
public OmniApplication(Application wrapped)
wrapped
- The wrapped application.public Converter createConverter(String converterId)
Converter
instance available, then return it, else delegate to
getWrapped()
which may return the JSF managed Converter
instance.createConverter
in class ApplicationWrapper
public Converter createConverter(Class<?> forClass)
Converter
instance available, then return it, else delegate to
getWrapped()
which may return the JSF managed Converter
instance.createConverter
in class ApplicationWrapper
public Validator createValidator(String validatorId)
Validator
instance available, then return it, else delegate to
getWrapped()
which may return the JSF managed Validator
instance.createValidator
in class ApplicationWrapper
public Application getWrapped()
getWrapped
in interface FacesWrapper<Application>
getWrapped
in class ApplicationWrapper
Copyright © 2012–2017 OmniFaces. All rights reserved.