Class AbstractEventAttribute

    • Field Detail

      • LOGGER

        public static final java.util.logging.Logger LOGGER
    • Constructor Detail

      • AbstractEventAttribute

        protected AbstractEventAttribute​()
      • AbstractEventAttribute

        protected AbstractEventAttribute​(java.lang.String attributeName,
                                         java.lang.String value)
        Parameters:
        value - the value for the attribute
        Since:
        2.0.0
      • AbstractEventAttribute

        protected AbstractEventAttribute​(java.lang.String attributeName,
                                         java.lang.String preJsFunctionBody,
                                         ServerAsyncMethod serverAsyncMethod,
                                         java.lang.String jsFilterFunctionBody,
                                         java.lang.String postJsFunctionBody)
        Parameters:
        attributeName -
        jsPreFunctionBody - the body part javascript function (without function declaration). It must return true/false. This function will invoke at client side before serverAsyncMethod. If the jsPrefunction returns true then only serverAsyncMethod method will invoke (if it is implemented). It has implicit objects like event and source which gives the reference of the current tag.
        Eg:-
                    if (source.type == 'button') {
                       return true;
                    }
                    return false;
                    
        serverAsyncMethod - This method will invoke at server side with an argument wffBMObject. The wffBMObject is the representational javascript object returned by jsFilterFunctionBody.
        jsFilterFunctionBody - The body part of a javascript function (without function declaration). It can return a javascript object so that it will be available at server side in serverAsyncMethod as wffBMObject parameter. There are implicit objects event and source in the scope.
        Eg:-
                    var bName = source.name;
                    return {buttonName: bName, author:'wff', dateOfYear: 2014};
                    
        jsPostFunctionBody - The body part of a javascript function (without function declaration). The wffBMObject returned by serverAsyncMethod will be available as an implicit object jsObject in the scope. There are common implicit objects event and source in the scope.
        Since:
        2.0.0
    • Method Detail

      • init

        protected void init​()
        invokes only once per object
        Since:
        2.0.0
      • setValue

        public void setValue​(java.lang.String value)
        sets the value for this attribute
        Parameters:
        value - the value for the attribute.
        Since:
        2.0.0
      • getValue

        public java.lang.String getValue​()
        gets the value of this attribute
        Returns:
        the value of the attribute
        Since:
        2.0.0
      • setServerAsyncMethod

        public void setServerAsyncMethod​(ServerAsyncMethod serverAsyncMethod)
        Parameters:
        serverAsyncMethod - the ServerAsyncMethod object to set.
      • setServerAsyncMethod

        public void setServerAsyncMethod​(java.lang.String jsPreFunctionBody,
                                         ServerAsyncMethod serverAsyncMethod,
                                         java.lang.String jsFilterFunctionBody,
                                         java.lang.String jsPostFunctionBody)
        Parameters:
        jsPreFunctionBody - the body part javascript function (without function declaration). It must return true/false. This function will invoke at client side before serverAsyncMethod. If the jsPrefunction returns true then only serverAsyncMethod method will invoke (if it is implemented). It has implicit objects like event and source which gives the reference of the current tag.
        Eg:-
                    if (source.type == 'button') {
                       return true;
                    }
                    return false;
                    
        serverAsyncMethod - This method will invoke at server side with an argument wffBMObject. The wffBMObject is the representational javascript object returned by jsFilterFunctionBody.
        jsFilterFunctionBody - The body part of a javascript function (without function declaration). It can return a javascript object so that it will be available at server side in serverAsyncMethod as wffBMObject parameter. There are implicit objects event and source in the scope.
        Eg:-
                    var bName = source.name;
                    return {buttonName: bName, author:'wff', dateOfYear: 2014};
                    
        jsPostFunctionBody - The body part of a javascript function (without function declaration). The wffBMObject returned by serverAsyncMethod will be available as an implicit object jsObject in the scope. There are common implicit objects event and source in the scope.
        Since:
        2.0.0
      • getJsFilterFunctionBody

        public java.lang.String getJsFilterFunctionBody​()
        Returns:
        Since:
        2.1.9
      • getJsPreFunctionBody

        public java.lang.String getJsPreFunctionBody​()
        Returns:
        Since:
        2.1.9
      • setJsPostFunctionBody

        public void setJsPostFunctionBody​(java.lang.String jsPostFunctionBody)
        Sets the post function body JavaScript.
        Parameters:
        jsPostFunctionBody - the post function body JavaScript.
      • setJsPreFunctionBody

        public void setJsPreFunctionBody​(java.lang.String jsPreFunctionBody)
        Sets the pre function body JavaScript.
        Parameters:
        jsPreFunctionBody -
        Since:
        2.1.9
      • setJsFilterFunctionBody

        public void setJsFilterFunctionBody​(java.lang.String jsFilterFunctionBody)
        Sets the filter function body JavaScript.
        Parameters:
        jsFilterFunctionBody -
        Since:
        2.1.9