Class FaceletState
- java.lang.Object
-
- org.apache.myfaces.view.facelets.tag.jsf.FaceletState
-
- All Implemented Interfaces:
Serializable,StateHolder
public class FaceletState extends Object implements StateHolder, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FaceletState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)javax.el.ValueExpressiongetBinding(String uniqueId, String key)A "Facelet Binding ValueExpression" is a ValueExpression used/generated by facelets algorithm associated with an uniqueId, which usually is bound to the tagId.Map<String,Map<String,javax.el.ValueExpression>>getBindings()ObjectgetState(String key)inthashCode()booleanisDynamic()booleanisTransient()voidputBinding(String uniqueId, String key, javax.el.ValueExpression expr)ObjectputState(String key, Object value)voidrestoreState(FacesContext context, Object state)ObjectsaveState(FacesContext context)voidsetTransient(boolean newTransientValue)
-
-
-
Method Detail
-
saveState
public Object saveState(FacesContext context)
- Specified by:
saveStatein interfaceStateHolder
-
restoreState
public void restoreState(FacesContext context, Object state)
- Specified by:
restoreStatein interfaceStateHolder
-
isTransient
public boolean isTransient()
- Specified by:
isTransientin interfaceStateHolder
-
setTransient
public void setTransient(boolean newTransientValue)
- Specified by:
setTransientin interfaceStateHolder
-
isDynamic
public boolean isDynamic()
-
getBinding
public javax.el.ValueExpression getBinding(String uniqueId, String key)
A "Facelet Binding ValueExpression" is a ValueExpression used/generated by facelets algorithm associated with an uniqueId, which usually is bound to the tagId. Components like c:forEach or ui:param uses it and the reason behind this is avoid use VariableMapper to create EL Expressions that later cannot be cached. Instead, the intention is make an indirection using 2 ValueExpression instances. In that way, all EL Expressions can be cached, because VariableMapper will use an instance that contains the uniqueId and the one stored in the map will have the real value or EL Expression that points to the managed bean. (Remember each EL expression that uses a variable stored in VariableMapper will copy the EL expression bound to the variable, so if the EL expression value changes across views, all EL Expressions that contains a reference cannot be cached). This map is something special, because its content is related to the view structure. It does not need to be saved fully into the state, and it does not have any delta state, but it "evolves" with the initial state.
-
-