| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.application.Application
public abstract class Application
Holds webapp-wide resources for a JSF application. There is a single one of these for a web application, accessable via
FacesContext.getCurrentInstance().getApplication()In particular, this provides a factory for UIComponent objects. It also provides convenience methods for creating ValueBinding objects. See Javadoc of JSF Specification
| Constructor Summary | |
|---|---|
| Application() | |
| Method Summary | |
|---|---|
| abstract  void | addComponent(String componentType,
             String componentClass)Define a new mapping from a logical "component type" to an actual java class name. | 
| abstract  void | addConverter(Class targetClass,
             String converterClass) | 
| abstract  void | addConverter(String converterId,
             String converterClass) | 
| abstract  void | addValidator(String validatorId,
             String validatorClass) | 
| abstract  UIComponent | createComponent(String componentType)Create a new UIComponent subclass, using the mappings defined by previous calls to the addComponent method of this class. | 
| abstract  UIComponent | createComponent(ValueBinding componentBinding,
                FacesContext context,
                String componentType)Create an object which has an associating "binding" expression tying the component to a user property. | 
| abstract  Converter | createConverter(Class targetClass) | 
| abstract  Converter | createConverter(String converterId) | 
| abstract  MethodBinding | createMethodBinding(String ref,
                    Class[] params)Create an object which can be used to invoke an arbitrary method via an EL expression at a later time. | 
| abstract  Validator | createValidator(String validatorId) | 
| abstract  ValueBinding | createValueBinding(String ref)Create an object which can be used to invoke an arbitrary method via an EL expression at a later time. | 
| abstract  ActionListener | getActionListener() | 
| abstract  Iterator | getComponentTypes() | 
| abstract  Iterator | getConverterIds() | 
| abstract  Iterator | getConverterTypes() | 
| abstract  Locale | getDefaultLocale() | 
| abstract  String | getDefaultRenderKitId() | 
| abstract  String | getMessageBundle() | 
| abstract  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. | 
| abstract  PropertyResolver | getPropertyResolver()Get the object used by the VariableResolver to read and write named properties on java beans, Arrays, Lists and Maps. | 
| abstract  StateManager | getStateManager() | 
| abstract  Iterator | getSupportedLocales() | 
| abstract  Iterator | getValidatorIds() | 
| abstract  VariableResolver | getVariableResolver()Get the object used to resolve expressions of form "#{...}". | 
| abstract  ViewHandler | getViewHandler() | 
| abstract  void | setActionListener(ActionListener listener) | 
| abstract  void | setDefaultLocale(Locale locale) | 
| abstract  void | setDefaultRenderKitId(String renderKitId) | 
| abstract  void | setMessageBundle(String bundle) | 
| abstract  void | setNavigationHandler(NavigationHandler handler) | 
| abstract  void | setPropertyResolver(PropertyResolver resolver) | 
| abstract  void | setStateManager(StateManager manager) | 
| abstract  void | setSupportedLocales(Collection locales) | 
| abstract  void | setVariableResolver(VariableResolver resolver) | 
| abstract  void | setViewHandler(ViewHandler handler) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Application()
| Method Detail | 
|---|
public abstract ActionListener getActionListener()
public abstract void setActionListener(ActionListener listener)
public abstract Locale getDefaultLocale()
public abstract void setDefaultLocale(Locale locale)
public abstract String getDefaultRenderKitId()
public abstract void setDefaultRenderKitId(String renderKitId)
public abstract String getMessageBundle()
public abstract void setMessageBundle(String bundle)
public abstract NavigationHandler getNavigationHandler()
public abstract void setNavigationHandler(NavigationHandler handler)
public abstract PropertyResolver getPropertyResolver()
public abstract void setPropertyResolver(PropertyResolver resolver)
public abstract VariableResolver getVariableResolver()
public abstract void setVariableResolver(VariableResolver resolver)
public abstract ViewHandler getViewHandler()
public abstract void setViewHandler(ViewHandler handler)
public abstract StateManager getStateManager()
public abstract void setStateManager(StateManager manager)
public abstract void addComponent(String componentType,
                                  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.
public abstract UIComponent createComponent(String componentType)
                                     throws FacesException
FacesException - if there is no mapping defined for the specified
 componentType, or if an instance of the specified type could not be
 created for any reason.
public abstract UIComponent createComponent(ValueBinding componentBinding,
                                            FacesContext context,
                                            String componentType)
                                     throws FacesException
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.
FacesExceptionpublic abstract Iterator getComponentTypes()
public abstract void addConverter(String converterId,
                                  String converterClass)
public abstract void addConverter(Class targetClass,
                                  String converterClass)
public abstract Converter createConverter(String converterId)
public abstract Converter createConverter(Class targetClass)
public abstract Iterator getConverterIds()
public abstract Iterator getConverterTypes()
public abstract MethodBinding createMethodBinding(String ref,
                                                  Class[] params)
                                           throws ReferenceSyntaxException
This is used to invoke ActionListener method, and ValueChangeListener methods.
ReferenceSyntaxExceptionpublic abstract Iterator getSupportedLocales()
public abstract void setSupportedLocales(Collection locales)
public abstract void addValidator(String validatorId,
                                  String validatorClass)
public abstract Validator createValidator(String validatorId)
                                   throws FacesException
FacesExceptionpublic abstract Iterator getValidatorIds()
public abstract ValueBinding createValueBinding(String ref)
                                         throws ReferenceSyntaxException
This is used to invoke ActionListener method, and ValueChangeListener methods.
ReferenceSyntaxException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||