FacesBean.Type
Modifier | Constructor and Description |
---|---|
protected |
FacesBeanWrapper(FacesBean beanToWrap) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(FacesBean from)
Copies all properties, bindings, and list entries from
one bean to another.
|
void |
addEntry(PropertyKey listKey,
Object value)
Add an entry to a list.
|
Set<PropertyKey> |
bindingKeySet()
Returns a Set of all PropertyKeys that have ValueBindings attached.
|
void |
clearInitialState()
Reset to a non-delta tracking state.
|
boolean |
containsEntry(PropertyKey listKey,
Class<?> clazz)
Return true if at least one element of the list identified by
this key is an instance of the specified class.
|
Iterator<? extends Object> |
entries(PropertyKey listKey)
Returns an iterator over all entries at this key.
|
Object[] |
getEntries(PropertyKey listKey,
Class<?> clazz)
Return as an array all elements of this key that
are instances of the specified class.
|
Object |
getLocalProperty(PropertyKey key)
Return a property, ignoring any value bindings.
|
Object |
getProperty(PropertyKey key)
Returns a property.
|
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.
|
javax.el.ValueExpression |
getValueExpression(PropertyKey key)
Return the value expression for a key.
|
FacesBean |
getWrappedBean() |
boolean |
initialStateMarked() |
Set<PropertyKey> |
keySet()
Returns a Set of all PropertyKeys that have either lists
or values attached.
|
void |
markInitialState()
use a delta tracking state going forward
|
void |
removeEntry(PropertyKey listKey,
Object value)
Remove an entry from a list.
|
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
Restores the state of a FacesBean.
|
Object |
saveState(javax.faces.context.FacesContext context)
Saves the state of a FacesBean.
|
void |
setProperty(PropertyKey key,
Object value)
Set a property.
|
void |
setValueBinding(PropertyKey key,
javax.faces.el.ValueBinding binding)
Set the value binding for a key.
|
void |
setValueExpression(PropertyKey key,
javax.el.ValueExpression expression)
Set the value expression for a key.
|
protected FacesBeanWrapper(FacesBean beanToWrap)
public FacesBean getWrappedBean()
public FacesBean.Type getType()
FacesBean
public Object getProperty(PropertyKey key)
FacesBean
getProperty
in interface FacesBean
key
- the property keypublic void setProperty(PropertyKey key, Object value)
FacesBean
setProperty
in interface FacesBean
public Object getLocalProperty(PropertyKey key)
FacesBean
getLocalProperty
in interface FacesBean
public javax.el.ValueExpression getValueExpression(PropertyKey key)
FacesBean
getValueExpression
in interface FacesBean
public javax.faces.el.ValueBinding getValueBinding(PropertyKey key)
FacesBean
getValueBinding
in interface FacesBean
public Object getRawProperty(PropertyKey key)
FacesBean
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 expressions, the method will look for an expression 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.
getRawProperty
in interface FacesBean
key
- the parameter key of the raw property value to get.ValueExpression
object if the specified key
supports expressions and an expression was specified for that
property, null
otherwise.FacesBean.getLocalProperty(PropertyKey)
,
FacesBean.getValueBinding(PropertyKey)
,
FacesBean.getValueExpression(PropertyKey)
public void setValueExpression(PropertyKey key, javax.el.ValueExpression expression)
FacesBean
setValueExpression
in interface FacesBean
public void setValueBinding(PropertyKey key, javax.faces.el.ValueBinding binding)
FacesBean
setValueBinding
in interface FacesBean
public void addEntry(PropertyKey listKey, Object value)
FacesBean
public void removeEntry(PropertyKey listKey, Object value)
FacesBean
removeEntry
in interface FacesBean
public Object[] getEntries(PropertyKey listKey, Class<?> clazz)
FacesBean
getEntries
in interface FacesBean
public boolean containsEntry(PropertyKey listKey, Class<?> clazz)
FacesBean
containsEntry
in interface FacesBean
public Iterator<? extends Object> entries(PropertyKey listKey)
FacesBean
public void addAll(FacesBean from)
FacesBean
public Set<PropertyKey> keySet()
FacesBean
public Set<PropertyKey> bindingKeySet()
FacesBean
bindingKeySet
in interface FacesBean
public Object saveState(javax.faces.context.FacesContext context)
FacesBean
public void restoreState(javax.faces.context.FacesContext context, Object state)
FacesBean
restoreState
in interface FacesBean
public void clearInitialState()
FacesBean
clearInitialState
in interface FacesBean
public void markInitialState()
FacesBean
markInitialState
in interface FacesBean
public boolean initialStateMarked()
initialStateMarked
in interface FacesBean
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.