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:
  • Constructor Details

    • FaceletState

      public FaceletState()
  • Method Details

    • getState

      public Object getState(String key)
    • putState

      public Object putState(String key, Object value)
    • saveState

      public Object saveState(FacesContext context)
      Specified by:
      saveState in interface StateHolder
    • restoreState

      public void restoreState(FacesContext context, Object state)
      Specified by:
      restoreState in interface StateHolder
    • isTransient

      public boolean isTransient()
      Specified by:
      isTransient in interface StateHolder
    • setTransient

      public void setTransient(boolean newTransientValue)
      Specified by:
      setTransient in interface StateHolder
    • isDynamic

      public boolean isDynamic()
    • putBinding

      public void putBinding(String uniqueId, String key, jakarta.el.ValueExpression expr)
    • 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.
    • getBindings

      public Map<String,Map<String,jakarta.el.ValueExpression>> getBindings()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object