Class EventTag

    • Constructor Detail

      • EventTag

        public EventTag​(Element pParent,
                        Node prevSibling)
    • Method Detail

      • createEvent

        public static EventTag createEvent​(Model model,
                                           java.lang.String sActivity,
                                           java.lang.String sRef)
        Factory method. Creates either a new <calculate>, <validate>, or <event> tag, depending on the activity.
      • defaultElement

        public int defaultElement()
        Description copied from class: Element
        Returns the class tag of the default one-of child (if there is one)
        Overrides:
        defaultElement in class Element
        Returns:
        the integer tag for the default element.
      • getActivity

        public java.lang.String getActivity()
        Get the activity (ie: OnEnter, OnClick, etc.) for this event.
      • getContentType

        public java.lang.String getContentType()
        Get the contentType for this event's script (eg. "javascript" or "formcalc").
      • getLanguage

        public java.lang.String getLanguage()
        Get the language for this event's script. While the "language" isn't as well-specified as the contentType, it is a useful shortcut for those clients supporting the primary languages (that is, JavaScript and FormCalc). "application/x-formcalc" -. "FormCalc" "application/x-javascript" -. "JavaScript" Others are copied straight across.
      • getRef

        public java.lang.String getRef()
        Get the reference of the activity (ie: $form, $layout, etc.) for this event.
      • getRunAt

        public java.lang.String getRunAt()
        Get the run location (client or server) for this event.
      • getScript

        public Script getScript()
      • getScriptText

        public java.lang.String getScriptText()
        Get the content of the script for this event.
      • peekScript

        public Script peekScript()
        Get the script for this event.
      • setActivity

        public void setActivity​(java.lang.String sActivity)
        Set the activity (ie: OnEnter, OnClick, etc.) for this event.
        Parameters:
        sActivity - - the name of the event to set,
      • setContentType

        public void setContentType​(java.lang.String sContentType)
        Set the contentType for this event's script (eg. "javascript" or "formcalc").
        Parameters:
        sContentType - - the content type to set for this element.
      • setLanguage

        public void setLanguage​(java.lang.String sLanguage)
        Set the language for this event's script.

        While the "language" isn't as well-specified as the contentType, it is a useful shortcut for those clients supporting the primary languages (that is, JavaScript and FormCalc). "FormCalc" -. "application/x-formcalc" "JavaScript" -. "application/x-javascript" Others are copied straight across.

      • setRef

        public void setRef​(java.lang.String sRef)
        Set the reference of the activity (ie: $form, $layout, etc.) for this event.
        Parameters:
        sRef - - The object this event refers to.
      • setRunAt

        public void setRunAt​(java.lang.String sTarget)
        Set the run location (client or server) for this event.
        Parameters:
        sTarget - - The target: client, server etc.
      • setScript

        public void setScript​(Script script)
        Set the script for this event.
      • setScriptText

        public void setScriptText​(java.lang.String sScript)
        Set the content of the script for this event.