Class FaceletState

    • Constructor Detail

      • FaceletState

        public FaceletState()
    • Method Detail

      • 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