|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FacesBean
Base interface for FacesBean storage objects.
| Nested Class Summary | |
|---|---|
static class |
FacesBean.Type
Type of a FacesBean, encapsulating the set of registered PropertyKeys. |
| Method Summary | |
|---|---|
void |
addAll(FacesBean from)
Copies all properties, bindings, and list entries from one bean to another. |
void |
addEntry(PropertyKey listKey,
java.lang.Object value)
Add an entry to a list. |
java.util.Set<PropertyKey> |
bindingKeySet()
Returns a Set of all PropertyKeys that have ValueBindings attached. |
boolean |
containsEntry(PropertyKey listKey,
java.lang.Class<?> clazz)
Return true if at least one element of the list identified by this key is an instance of the specified class. |
java.util.Iterator<? extends java.lang.Object> |
entries(PropertyKey listKey)
Returns an iterator over all entries at this key. |
java.lang.Object[] |
getEntries(PropertyKey listKey,
java.lang.Class<?> clazz)
Return as an array all elements of this key that are instances of the specified class. |
java.lang.Object |
getLocalProperty(PropertyKey key)
Return a property, ignoring any value bindings. |
java.lang.Object |
getProperty(PropertyKey key)
Returns a property. |
java.lang.Object |
getRawProperty(PropertyKey key)
Gets the current unevaluated value for the specified property key. |
FacesBean.Type |
getType()
Returns the Type of this bean. |
javax.faces.el.ValueBinding |
getValueBinding(PropertyKey key)
Return the value binding for a key. |
java.util.Set<PropertyKey> |
keySet()
Returns a Set of all PropertyKeys that have either lists or values attached. |
void |
markInitialState()
|
void |
removeEntry(PropertyKey listKey,
java.lang.Object value)
Remove an entry from a list. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Restores the state of a FacesBean. |
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
Saves the state of a FacesBean. |
void |
setProperty(PropertyKey key,
java.lang.Object value)
Set a property. |
void |
setValueBinding(PropertyKey key,
javax.faces.el.ValueBinding binding)
Set the value binding for a key. |
| Method Detail |
|---|
FacesBean.Type getType()
java.lang.Object getProperty(PropertyKey key)
key - the property key
java.lang.IllegalArgumentException - if key is a list key
void setProperty(PropertyKey key,
java.lang.Object value)
java.lang.IllegalArgumentException - if key is a list keyjava.lang.Object getLocalProperty(PropertyKey key)
java.lang.IllegalArgumentException - if key is a list keyjavax.faces.el.ValueBinding getValueBinding(PropertyKey key)
java.lang.IllegalArgumentException - if the property does
not support value bindings.java.lang.Object getRawProperty(PropertyKey key)
The method will first look for a local value. If it exists, it will be returned. If it does not and the bean supports value bindings, the method will look for a binding with the specified key and return it directly if it exists without evaluatig its value.
This method is mainly used when:
The most common use case of this method is for message attributes
set on converters and validators using a value binding referencing
a managed bean created by <f:loadBundle/>. Since
loadBundle only creates its bean during the render response phase
while converter and validators take action during process validation
phase, the message property's value binding must be stored in a
special FacesMessage implementation that will evaluate
the binding only during render response.
key - the parameter key of the raw property value to get.
ValueBinding object if the specified key
supports bindings and a binding was specified for that
property, null otherwise.
java.lang.IllegalArgumentException - if the specified key is a list key.getLocalProperty(PropertyKey),
getValueBinding(PropertyKey)
void setValueBinding(PropertyKey key,
javax.faces.el.ValueBinding binding)
java.lang.IllegalArgumentException - if the property does
not support value bindings.
void addEntry(PropertyKey listKey,
java.lang.Object value)
java.lang.IllegalArgumentException - if the key is not a list key.
void removeEntry(PropertyKey listKey,
java.lang.Object value)
java.lang.IllegalArgumentException - if the key is not a list key.
java.lang.Object[] getEntries(PropertyKey listKey,
java.lang.Class<?> clazz)
java.lang.IllegalArgumentException - if the key is not a list key.
boolean containsEntry(PropertyKey listKey,
java.lang.Class<?> clazz)
java.lang.IllegalArgumentException - if the key is not a list key.java.util.Iterator<? extends java.lang.Object> entries(PropertyKey listKey)
java.lang.IllegalArgumentException - if the key is not a list key.void addAll(FacesBean from)
java.util.Set<PropertyKey> keySet()
java.util.Set<PropertyKey> bindingKeySet()
void markInitialState()
java.lang.Object saveState(javax.faces.context.FacesContext context)
void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||