|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.application.Application
de.mindmatters.faces.application.ApplicationImpl
public final class ApplicationImpl
Application represents a per-web-application singleton object where applications based on JavaServer Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by JavaServer Faces.
This implemetation delegates the management and creation of
UIComponent
s, Converter
s, Validator
s and
MethodBinding
s to appropriate factories as follows:
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FACTORY_BEAN_NAME
Name of the ComponentFactory bean in the factory. |
static java.lang.String |
CONVERTER_FACTORY_BEAN_NAME
Name of the ConverterFactory bean in the factory. |
static java.lang.String |
METHOD_BINDING_FACTORY_BEAN_NAME
Name of the MethodBindingFactory bean in the factory. |
static java.lang.String |
VALIDATOR_FACTORY_BEAN_NAME
Name of the ValidatorFactory bean in the factory. |
Constructor Summary | |
---|---|
ApplicationImpl(Application delegate)
Creates an application with the given original application delegate . |
|
ApplicationImpl(Application delegate,
BeanFactory beanFactory)
Creates an application with the given original application delegate . |
Method Summary | |
---|---|
void |
addComponent(java.lang.String componentType,
java.lang.String componentClass)
Define a new mapping from a logical "component type" to an actual java class name. |
void |
addConverter(java.lang.Class targetClass,
java.lang.String converterClass)
|
void |
addConverter(java.lang.String converterId,
java.lang.String converterClass)
|
void |
addValidator(java.lang.String validatorId,
java.lang.String validatorClass)
|
UIComponent |
createComponent(java.lang.String componentType)
Create a new UIComponent subclass, using the mappings defined by previous calls to the addComponent method of this class. |
UIComponent |
createComponent(ValueBinding componentBinding,
FacesContext context,
java.lang.String componentType)
Create an object which has an associating "binding" expression tying the component to a user property. |
Converter |
createConverter(java.lang.Class targetClass)
|
Converter |
createConverter(java.lang.String converterId)
|
MethodBinding |
createMethodBinding(java.lang.String ref,
java.lang.Class[] params)
Create an object which can be used to invoke an arbitrary method via an EL expression at a later time. |
Validator |
createValidator(java.lang.String validatorId)
|
ValueBinding |
createValueBinding(java.lang.String ref)
Create an object which can be used to invoke an arbitrary method via an EL expression at a later time. |
ActionListener |
getActionListener()
|
java.util.Iterator |
getComponentTypes()
|
java.util.Iterator |
getConverterIds()
|
java.util.Iterator |
getConverterTypes()
|
java.util.Locale |
getDefaultLocale()
|
java.lang.String |
getDefaultRenderKitId()
|
java.lang.String |
getMessageBundle()
|
NavigationHandler |
getNavigationHandler()
Return the NavigationHandler object which is responsible for mapping from a logical (viewid, fromAction, outcome) to the URL of a view to be rendered. |
PropertyResolver |
getPropertyResolver()
Get the object used by the VariableResolver to read and write named properties on java beans, Arrays, Lists and Maps. |
StateManager |
getStateManager()
|
java.util.Iterator |
getSupportedLocales()
|
java.util.Iterator |
getValidatorIds()
|
VariableResolver |
getVariableResolver()
Get the object used to resolve expressions of form "#{...}". |
ViewHandler |
getViewHandler()
|
void |
setActionListener(ActionListener listener)
|
void |
setDefaultLocale(java.util.Locale locale)
|
void |
setDefaultRenderKitId(java.lang.String renderKitId)
|
void |
setMessageBundle(java.lang.String bundle)
|
void |
setNavigationHandler(NavigationHandler handler)
|
void |
setPropertyResolver(PropertyResolver resolver)
|
void |
setStateManager(StateManager manager)
|
void |
setSupportedLocales(java.util.Collection locales)
|
void |
setVariableResolver(VariableResolver resolver)
|
void |
setViewHandler(ViewHandler handler)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String METHOD_BINDING_FACTORY_BEAN_NAME
public static final java.lang.String VALIDATOR_FACTORY_BEAN_NAME
public static final java.lang.String CONVERTER_FACTORY_BEAN_NAME
public static final java.lang.String COMPONENT_FACTORY_BEAN_NAME
Constructor Detail |
---|
public ApplicationImpl(Application delegate)
delegate
.
delegate
- The original application of the underlying JSF implementationpublic ApplicationImpl(Application delegate, BeanFactory beanFactory)
delegate
.
delegate
- The original application of the underlying JSF implementationbeanFactory
- the BeanfactoryMethod Detail |
---|
public ActionListener getActionListener()
getActionListener
in class Application
public java.util.Locale getDefaultLocale()
getDefaultLocale
in class Application
public java.lang.String getDefaultRenderKitId()
getDefaultRenderKitId
in class Application
public java.lang.String getMessageBundle()
getMessageBundle
in class Application
public NavigationHandler getNavigationHandler()
getNavigationHandler
in class Application
public PropertyResolver getPropertyResolver()
getPropertyResolver
in class Application
public StateManager getStateManager()
getStateManager
in class Application
public java.util.Iterator getSupportedLocales()
getSupportedLocales
in class Application
public VariableResolver getVariableResolver()
getVariableResolver
in class Application
public ViewHandler getViewHandler()
getViewHandler
in class Application
public void setActionListener(ActionListener listener)
setActionListener
in class Application
public void setDefaultLocale(java.util.Locale locale)
setDefaultLocale
in class Application
public void setDefaultRenderKitId(java.lang.String renderKitId)
setDefaultRenderKitId
in class Application
public void setMessageBundle(java.lang.String bundle)
setMessageBundle
in class Application
public void setNavigationHandler(NavigationHandler handler)
setNavigationHandler
in class Application
public void setPropertyResolver(PropertyResolver resolver)
setPropertyResolver
in class Application
public void setStateManager(StateManager manager)
setStateManager
in class Application
public void setSupportedLocales(java.util.Collection locales)
setSupportedLocales
in class Application
public void setVariableResolver(VariableResolver resolver)
setVariableResolver
in class Application
public void setViewHandler(ViewHandler handler)
setViewHandler
in class Application
public void addComponent(java.lang.String componentType, java.lang.String componentClass)
Param componentClass must be the fully-qualified class name of some class extending the UIComponent class. The class must have a default constructor, as instances of it will be created using Class.newInstance.
It is permitted to override a previously defined mapping, ie to call this method multiple times with the same componentType string. The createComponent method will simply use the last defined mapping.
addComponent
in class Application
public UIComponent createComponent(java.lang.String componentType)
createComponent
in class Application
public UIComponent createComponent(ValueBinding componentBinding, FacesContext context, java.lang.String componentType)
First the specified value-binding is evaluated; if it returns a non-null value then the component "already exists" and so the resulting value is simply returned.
Otherwise a new UIComponent instance is created using the specified componentType, and the new object stored via the provided value-binding before being returned.
createComponent
in class Application
public java.util.Iterator getComponentTypes()
getComponentTypes
in class Application
public void addConverter(java.lang.Class targetClass, java.lang.String converterClass)
addConverter
in class Application
public void addConverter(java.lang.String converterId, java.lang.String converterClass)
addConverter
in class Application
public Converter createConverter(java.lang.Class targetClass)
createConverter
in class Application
public Converter createConverter(java.lang.String converterId)
createConverter
in class Application
public java.util.Iterator getConverterIds()
getConverterIds
in class Application
public java.util.Iterator getConverterTypes()
getConverterTypes
in class Application
public MethodBinding createMethodBinding(java.lang.String ref, java.lang.Class[] params)
This is used to invoke ActionListener method, and ValueChangeListener methods.
createMethodBinding
in class Application
public ValueBinding createValueBinding(java.lang.String ref)
This is used to invoke ActionListener method, and ValueChangeListener methods.
createValueBinding
in class Application
public void addValidator(java.lang.String validatorId, java.lang.String validatorClass)
addValidator
in class Application
public Validator createValidator(java.lang.String validatorId)
createValidator
in class Application
public java.util.Iterator getValidatorIds()
getValidatorIds
in class Application
|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |