Class HtmlSubmitInput

    • Field Detail

      • DEFAULT_VALUE

        public static final java.lang.String DEFAULT_VALUE
        Value to use if no specified value attribute.
        See Also:
        Constant Field Values
    • Method Detail

      • doClickStateUpdate

        protected boolean doClickStateUpdate​(boolean shiftKey,
                                             boolean ctrlKey)
                                      throws java.io.IOException
        This method implements the control state update part of the click action.

        The default implementation only calls doClickStateUpdate on parent's DomElement (if any). Subclasses requiring different behavior (like HtmlSubmitInput) will override this method.

        Overrides:
        doClickStateUpdate in class DomElement
        Parameters:
        shiftKey - true if SHIFT is pressed
        ctrlKey - true if CTRL is pressed
        Returns:
        true if doClickFireEvent method has to be called later on (to signal, that the value was changed)
        Throws:
        java.io.IOException - if an IO error occurs
      • reset

        public void reset()
        Returns the value of this element to the default value or checked state (usually what it was at the time the page was loaded, unless it has been modified via JavaScript). This method does nothing for submit input elements.
        Specified by:
        reset in interface SubmittableElement
        Overrides:
        reset in class HtmlInput
        See Also:
        SubmittableElement.reset()
      • asText

        @Deprecated
        public java.lang.String asText()
        Deprecated.
        as of version 2.48.0; use asNormalizedText() instead
        Returns a textual representation of this element that represents what would be visible to the user if this page was shown in a web browser. For example, a single-selection select element would return the currently selected value as text. Returns "Submit Query" if value attribute is not defined.
        Overrides:
        asText in class DomNode
        Returns:
        a textual representation of this element that represents what would be visible to the user if this page was shown in a web browser
      • printOpeningTagContentAsXml

        protected void printOpeningTagContentAsXml​(java.io.PrintWriter printWriter)
        Prints the content between "<" and ">" (or "/>") in the output of the tag name and its attributes in XML format. Doesn't print the attribute if it is value="Submit Query".
        Overrides:
        printOpeningTagContentAsXml in class DomElement
        Parameters:
        printWriter - the writer to print in
      • getSubmitNameValuePairs

        public NameValuePair[] getSubmitNameValuePairs()

        Returns an array of NameValuePairs that are the values that will be sent back to the server whenever this element's containing form is submitted.

        THIS METHOD IS INTENDED FOR THE USE OF THE FRAMEWORK ONLY AND SHOULD NOT BE USED BY CONSUMERS OF HTMLUNIT. USE AT YOUR OWN RISK.

        Returns "Submit Query" if name attribute is defined and value attribute is not defined.
        Specified by:
        getSubmitNameValuePairs in interface SubmittableElement
        Overrides:
        getSubmitNameValuePairs in class HtmlInput
        Returns:
        the values that will be sent back to the server whenever this element's containing form is submitted
      • setAttributeNS

        protected void setAttributeNS​(java.lang.String namespaceURI,
                                      java.lang.String qualifiedName,
                                      java.lang.String attributeValue,
                                      boolean notifyAttributeChangeListeners,
                                      boolean notifyMutationObservers)
        Sets the value of the attribute specified by namespace and qualified name.
        Overrides:
        setAttributeNS in class HtmlInput
        Parameters:
        namespaceURI - the URI that identifies an XML namespace
        qualifiedName - the qualified name (prefix:local) of the attribute
        attributeValue - the value of the attribute
        notifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListeners
        notifyMutationObservers - to notify MutationObservers or not
      • isRequiredSupported

        protected boolean isRequiredSupported()
        Returns whether this element supports the required constraint.
        Overrides:
        isRequiredSupported in class HtmlInput
        Returns:
        whether this element supports the required constraint