|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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)
|
void |
addELContextListener(javax.el.ELContextListener listener)
|
void |
addELResolver(javax.el.ELResolver resolver)
|
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)
Deprecated. |
UIComponent |
createComponent(javax.el.ValueExpression componentExpression,
FacesContext facesContext,
String componentType)
|
abstract Converter |
createConverter(Class targetClass)
|
abstract Converter |
createConverter(String converterId)
|
abstract MethodBinding |
createMethodBinding(String ref,
Class[] params)
Deprecated. |
abstract Validator |
createValidator(String validatorId)
|
abstract ValueBinding |
createValueBinding(String ref)
Deprecated. |
Object |
evaluateExpressionGet(FacesContext context,
String expression,
Class expectedType)
|
abstract ActionListener |
getActionListener()
|
abstract Iterator<String> |
getComponentTypes()
|
abstract Iterator<String> |
getConverterIds()
|
abstract Iterator<Class> |
getConverterTypes()
|
abstract Locale |
getDefaultLocale()
|
abstract String |
getDefaultRenderKitId()
|
javax.el.ELContextListener[] |
getELContextListeners()
|
javax.el.ELResolver |
getELResolver()
|
javax.el.ExpressionFactory |
getExpressionFactory()
|
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()
Deprecated. |
ResourceBundle |
getResourceBundle(FacesContext ctx,
String name)
|
abstract StateManager |
getStateManager()
|
abstract Iterator<Locale> |
getSupportedLocales()
|
abstract Iterator<String> |
getValidatorIds()
|
abstract VariableResolver |
getVariableResolver()
Deprecated. |
abstract ViewHandler |
getViewHandler()
|
void |
removeELContextListener(javax.el.ELContextListener listener)
|
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)
Deprecated. |
abstract void |
setStateManager(StateManager manager)
|
abstract void |
setSupportedLocales(Collection<Locale> locales)
|
abstract void |
setVariableResolver(VariableResolver resolver)
Deprecated. |
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 void addELResolver(javax.el.ELResolver resolver)
public javax.el.ELResolver getELResolver()
public ResourceBundle getResourceBundle(FacesContext ctx, String name) throws FacesException, NullPointerException
FacesException
NullPointerException
public UIComponent createComponent(javax.el.ValueExpression componentExpression, FacesContext facesContext, String componentType) throws FacesException, NullPointerException
FacesException
NullPointerException
public javax.el.ExpressionFactory getExpressionFactory()
public void addELContextListener(javax.el.ELContextListener listener)
public void removeELContextListener(javax.el.ELContextListener listener)
public javax.el.ELContextListener[] getELContextListeners()
public Object evaluateExpressionGet(FacesContext context, String expression, Class expectedType) throws javax.el.ELException
javax.el.ELException
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.
FacesException
public abstract Iterator<String> 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<String> getConverterIds()
public abstract Iterator<Class> getConverterTypes()
public abstract MethodBinding createMethodBinding(String ref, Class[] params) throws ReferenceSyntaxException
This is used to invoke ActionListener method, and ValueChangeListener methods.
ReferenceSyntaxException
public abstract Iterator<Locale> getSupportedLocales()
public abstract void setSupportedLocales(Collection<Locale> locales)
public abstract void addValidator(String validatorId, String validatorClass)
public abstract Validator createValidator(String validatorId) throws FacesException
FacesException
public abstract Iterator<String> 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 |