Class FaceletState
- java.lang.Object
-
- org.apache.myfaces.view.facelets.tag.faces.FaceletState
-
- All Implemented Interfaces:
StateHolder
,Serializable
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 boolean
equals(Object obj)
jakarta.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.Map<String,Map<String,jakarta.el.ValueExpression>>
getBindings()
Object
getState(String key)
int
hashCode()
boolean
isDynamic()
boolean
isTransient()
void
putBinding(String uniqueId, String key, jakarta.el.ValueExpression expr)
Object
putState(String key, Object value)
void
restoreState(FacesContext context, Object state)
Object
saveState(FacesContext context)
void
setTransient(boolean newTransientValue)
-
-
-
Method Detail
-
saveState
public Object saveState(FacesContext context)
- Specified by:
saveState
in interfaceStateHolder
-
restoreState
public void restoreState(FacesContext context, Object state)
- Specified by:
restoreState
in interfaceStateHolder
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfaceStateHolder
-
setTransient
public void setTransient(boolean newTransientValue)
- Specified by:
setTransient
in interfaceStateHolder
-
isDynamic
public boolean isDynamic()
-
getBinding
public jakarta.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.
-
-