Class AbstractStatefulAction<INPUT,​OUTPUT>

    • Constructor Detail

      • AbstractStatefulAction

        public AbstractStatefulAction()
    • Method Detail

      • getValue

        protected <V> V getValue​(ActionContext<INPUT> actionContext,
                                 java.lang.String key)
        Reads a value from parent's widget model.

        Method is resistant to situation when many instances of a particular action used in single parent widgets.

        Type Parameters:
        V - value type
        Parameters:
        actionContext - action context
        key - value key
        Returns:
        value found or null
      • setValue

        protected void setValue​(ActionContext<INPUT> actionContext,
                                java.lang.String key,
                                java.lang.Object value)
        Puts a value to parent's widget model.

        Method is resistant to situation when many instances of a particular action used in single parent widgets.

        Parameters:
        actionContext - action context
        key - value key
        value - value to be put
      • restoreModelValue

        protected static <V> V restoreModelValue​(ActionContext<?> context,
                                                 java.lang.String key)
        Reads a value from parent's widget model.

        Method is resistant to situation when many instances of a particular action used in single parent widgets.

        Type Parameters:
        V - value type
        Parameters:
        context - action context
        key - value key
        Returns:
        value found or null
      • storeModelValue

        protected static void storeModelValue​(ActionContext<?> context,
                                              java.lang.String key,
                                              java.lang.Object value)
        Puts a value to parent's widget model.

        Method is resistant to situation when many instances of a particular action used in single parent widgets.

        Parameters:
        context - action context
        key - value key
        value - value to be put
      • getActionUID

        protected static java.lang.String getActionUID​(ActionContext<?> context)
        Reads unique identity of action.
        Parameters:
        context - action context
        Returns:
        unique identity of action