Menu
pushmode.elements

Class InputElement

PushMode » API Reference » pushmode.elements

    • Constructor Detail

      • InputElement

        public InputElement()
        Creates new empty <input> element.
      • InputElement

        public InputElement(InputElement other)
        Creates new <input> element as a deep mutable clone of another element.
        Parameters:
        other - Element to clone.
        Throws:
        NullPointerException - The parameter is null.
    • Method Detail

      • tagname

        public String tagname()
        Description copied from class: DomElement
        Element's tag name. This is lowercase tag name of the element, e.g. div. Tag name cannot be changed. It is determined by derived class, which overrides this method.
        Specified by:
        tagname in class DomElement
        Returns:
        Element's tag name.
      • clone

        public InputElement clone()
        Description copied from class: DomElement
        Creates mutable deep clone of this element. All child nodes are cloned recursively. The clone is completely independent of this element.
        Specified by:
        clone in class AnyHtmlElement
        Returns:
        Deep mutable clone.
      • experimental_isVoid

        public boolean experimental_isVoid()
        Description copied from class: DomElement
        Experimental API. It WILL be removed in future release.
        Overrides:
        experimental_isVoid in class DomElement
      • accept

        public InputElement accept(String value)
        Sets accept attribute on this element.
        Parameters:
        value - New value of accept attribute. This method has no effect if it is null.
        Returns:
        this
      • autocomplete

        public InputElement autocomplete(String value)
        Sets autocomplete attribute on this element.
        Parameters:
        value - New value of autocomplete attribute. This method has no effect if it is null.
        Returns:
        this
      • autofocus

        public InputElement autofocus()
        Adds autofocus attribute to this element. Boolean attribute autofocus is serialized as <... autofocus ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • autofocus

        public InputElement autofocus(boolean value)
        Adds autofocus attribute to this element. Boolean attribute autofocus is serialized as <... autofocus ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • autofocus

        public InputElement autofocus(Boolean value)
        Adds autofocus attribute to this element. Boolean attribute autofocus is serialized as <... autofocus ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • autosave

        public InputElement autosave(String value)
        Sets autosave attribute on this element.
        Parameters:
        value - New value of autosave attribute. This method has no effect if it is null.
        Returns:
        this
      • checked

        public InputElement checked()
        Adds checked attribute to this element. Boolean attribute checked is serialized as <... checked ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • checked

        public InputElement checked(boolean value)
        Adds checked attribute to this element. Boolean attribute checked is serialized as <... checked ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • checked

        public InputElement checked(Boolean value)
        Adds checked attribute to this element. Boolean attribute checked is serialized as <... checked ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • disabled

        public InputElement disabled()
        Adds disabled attribute to this element. Boolean attribute disabled is serialized as <... disabled ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • disabled

        public InputElement disabled(boolean value)
        Adds disabled attribute to this element. Boolean attribute disabled is serialized as <... disabled ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • disabled

        public InputElement disabled(Boolean value)
        Adds disabled attribute to this element. Boolean attribute disabled is serialized as <... disabled ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • form

        public InputElement form(String value)
        Sets form attribute on this element.
        Parameters:
        value - New value of form attribute. This method has no effect if it is null.
        Returns:
        this
      • formaction

        public InputElement formaction(String value)
        Sets formaction attribute on this element.
        Parameters:
        value - New value of formaction attribute. This method has no effect if it is null.
        Returns:
        this
      • formmethod

        public InputElement formmethod(String value)
        Sets formmethod attribute on this element.
        Parameters:
        value - New value of formmethod attribute. This method has no effect if it is null.
        Returns:
        this
      • formnovalidate

        public InputElement formnovalidate()
        Adds formnovalidate attribute to this element. Boolean attribute formnovalidate is serialized as <... formnovalidate ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • formnovalidate

        public InputElement formnovalidate(boolean value)
        Adds formnovalidate attribute to this element. Boolean attribute formnovalidate is serialized as <... formnovalidate ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • formnovalidate

        public InputElement formnovalidate(Boolean value)
        Adds formnovalidate attribute to this element. Boolean attribute formnovalidate is serialized as <... formnovalidate ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • formtarget

        public InputElement formtarget(String value)
        Sets formtarget attribute on this element.
        Parameters:
        value - New value of formtarget attribute. This method has no effect if it is null.
        Returns:
        this
      • formtype

        public InputElement formtype(String value)
        Sets formtype attribute on this element.
        Parameters:
        value - New value of formtype attribute. This method has no effect if it is null.
        Returns:
        this
      • height

        public InputElement height(int amount)
        Sets height attribute on this element.
        Parameters:
        amount - New value of height attribute.
        Returns:
        this
      • height

        public InputElement height(Integer amount)
        Sets height attribute on this element.
        Parameters:
        amount - New value of height attribute. This method has no effect if it is null.
        Returns:
        this
      • inputmode

        public InputElement inputmode(String value)
        Sets inputmode attribute on this element.
        Parameters:
        value - New value of inputmode attribute. This method has no effect if it is null.
        Returns:
        this
      • list

        public InputElement list(String value)
        Sets list attribute on this element.
        Parameters:
        value - New value of list attribute. This method has no effect if it is null.
        Returns:
        this
      • max

        public InputElement max(String value)
        Sets max attribute on this element.
        Parameters:
        value - New value of max attribute. This method has no effect if it is null.
        Returns:
        this
      • maxlength

        public InputElement maxlength(int amount)
        Sets maxlength attribute on this element.
        Parameters:
        amount - New value of maxlength attribute.
        Returns:
        this
      • maxlength

        public InputElement maxlength(Integer amount)
        Sets maxlength attribute on this element.
        Parameters:
        amount - New value of maxlength attribute. This method has no effect if it is null.
        Returns:
        this
      • min

        public InputElement min(String value)
        Sets min attribute on this element.
        Parameters:
        value - New value of min attribute. This method has no effect if it is null.
        Returns:
        this
      • minlength

        public InputElement minlength(int amount)
        Sets minlength attribute on this element.
        Parameters:
        amount - New value of minlength attribute.
        Returns:
        this
      • minlength

        public InputElement minlength(Integer amount)
        Sets minlength attribute on this element.
        Parameters:
        amount - New value of minlength attribute. This method has no effect if it is null.
        Returns:
        this
      • multiple

        public InputElement multiple()
        Adds multiple attribute to this element. Boolean attribute multiple is serialized as <... multiple ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • multiple

        public InputElement multiple(boolean value)
        Adds multiple attribute to this element. Boolean attribute multiple is serialized as <... multiple ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • multiple

        public InputElement multiple(Boolean value)
        Adds multiple attribute to this element. Boolean attribute multiple is serialized as <... multiple ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • name

        public InputElement name(String value)
        Sets name attribute on this element.
        Parameters:
        value - New value of name attribute. This method has no effect if it is null.
        Returns:
        this
      • pattern

        public InputElement pattern(String value)
        Sets pattern attribute on this element.
        Parameters:
        value - New value of pattern attribute. This method has no effect if it is null.
        Returns:
        this
      • placeholder

        public InputElement placeholder(String value)
        Sets placeholder attribute on this element.
        Parameters:
        value - New value of placeholder attribute. This method has no effect if it is null.
        Returns:
        this
      • readonly

        public InputElement readonly()
        Adds readonly attribute to this element. Boolean attribute readonly is serialized as <... readonly ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • readonly

        public InputElement readonly(boolean value)
        Adds readonly attribute to this element. Boolean attribute readonly is serialized as <... readonly ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • readonly

        public InputElement readonly(Boolean value)
        Adds readonly attribute to this element. Boolean attribute readonly is serialized as <... readonly ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • required

        public InputElement required()
        Adds required attribute to this element. Boolean attribute required is serialized as <... required ...>, i.e. without value. This method has no effect if the attribute is already present.
        Returns:
        this
      • required

        public InputElement required(boolean value)
        Adds required attribute to this element. Boolean attribute required is serialized as <... required ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • required

        public InputElement required(Boolean value)
        Adds required attribute to this element. Boolean attribute required is serialized as <... required ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • size

        public InputElement size(String value)
        Sets size attribute on this element.
        Parameters:
        value - New value of size attribute. This method has no effect if it is null.
        Returns:
        this
      • src

        public InputElement src(String value)
        Sets src attribute on this element.
        Parameters:
        value - New value of src attribute. This method has no effect if it is null.
        Returns:
        this
      • step

        public InputElement step(String value)
        Sets step attribute on this element.
        Parameters:
        value - New value of step attribute. This method has no effect if it is null.
        Returns:
        this
      • type

        public InputElement type(String value)
        Sets type attribute on this element.
        Parameters:
        value - New value of type attribute. This method has no effect if it is null.
        Returns:
        this
      • value

        public InputElement value(String value)
        Sets value attribute on this element.
        Parameters:
        value - New value of value attribute. This method has no effect if it is null.
        Returns:
        this
      • width

        public InputElement width(int amount)
        Sets width attribute on this element.
        Parameters:
        amount - New value of width attribute.
        Returns:
        this
      • width

        public InputElement width(Integer amount)
        Sets width attribute on this element.
        Parameters:
        amount - New value of width attribute. This method has no effect if it is null.
        Returns:
        this
      • checked

        public InputElement checked(boolean value,
                                    Consumer<Boolean> setter)
        Sets up two-way binding on attribute checked. Changes in the attribute are synchronized both ways between the client and the server. When parameter value changes between two invocations of PushPage.document(), the change is sent to the client. When user's actions cause the browser to change client-side value of the attribute, PushMode javascript sends the change to the server, which then invokes callback specified in setter parameter.
        When setter completes, the next invocation of PushPage.document() should set value parameter to the same value that was passed to the setter. If the value is different, PushMode assumes that setter has performed coercion of the value. Coerced value is then sent to the client where it replaces user's input.
        Bindings require DomElement.id() to be set. Bindings on elements with null ID are ignored.
        Parameters:
        value - Server-supplied value of the attribute.
        setter - Callback accepting the most recent value available on the client side.
        Returns:
        this
        Throws:
        NullPointerException - The setter parameter is null.
      • checked

        public InputElement checked(Boolean value,
                                    Consumer<Boolean> setter)
        Sets up two-way binding on attribute checked. Changes in the attribute are synchronized both ways between the client and the server. When parameter value changes between two invocations of PushPage.document(), the change is sent to the client. When user's actions cause the browser to change client-side value of the attribute, PushMode javascript sends the change to the server, which then invokes callback specified in setter parameter.
        When setter completes, the next invocation of PushPage.document() should set value parameter to the same value that was passed to the setter. If the value is different, PushMode assumes that setter has performed coercion of the value. Coerced value is then sent to the client where it replaces user's input.
        Bindings require DomElement.id() to be set. Bindings on elements with null ID are ignored.
        Parameters:
        value - Server-supplied value of the attribute. If null, false is substituted by this method.
        setter - Callback accepting the most recent value available on the client side.
        Returns:
        this
        Throws:
        NullPointerException - The setter parameter is null.
      • value

        public InputElement value(String value,
                                  Consumer<String> setter)
        Sets up two-way binding on attribute value. Changes in the attribute are synchronized both ways between the client and the server. When parameter value changes between two invocations of PushPage.document(), the change is sent to the client. When user's actions cause the browser to change client-side value of the attribute, PushMode javascript sends the change to the server, which then invokes callback specified in setter parameter.
        When setter completes, the next invocation of PushPage.document() should set value parameter to the same value that was passed to the setter. If the value is different, PushMode assumes that setter has performed coercion of the value. Coerced value is then sent to the client where it replaces user's input.
        Bindings require DomElement.id() to be set. Bindings on elements with null ID are ignored.
        Parameters:
        value - Server-supplied value of the attribute. If null, empty string is substituted by this method.
        setter - Callback accepting the most recent value available on the client side.
        Returns:
        this
        Throws:
        NullPointerException - The setter parameter is null.
      • accesskey

        public InputElement accesskey(String value)
        Description copied from class: AnyHtmlElement
        Sets accesskey attribute on this element.
        Overrides:
        accesskey in class AnyHtmlElement
        Parameters:
        value - New value of accesskey attribute. This method has no effect if it is null.
        Returns:
        this
      • contenteditable

        public InputElement contenteditable(String value)
        Description copied from class: AnyHtmlElement
        Sets contenteditable attribute on this element.
        Overrides:
        contenteditable in class AnyHtmlElement
        Parameters:
        value - New value of contenteditable attribute. This method has no effect if it is null.
        Returns:
        this
      • contextmenu

        public InputElement contextmenu(String value)
        Description copied from class: AnyHtmlElement
        Sets contextmenu attribute on this element.
        Overrides:
        contextmenu in class AnyHtmlElement
        Parameters:
        value - New value of contextmenu attribute. This method has no effect if it is null.
        Returns:
        this
      • dir

        public InputElement dir(String value)
        Description copied from class: AnyHtmlElement
        Sets dir attribute on this element.
        Overrides:
        dir in class AnyHtmlElement
        Parameters:
        value - New value of dir attribute. This method has no effect if it is null.
        Returns:
        this
      • draggable

        public InputElement draggable(String value)
        Description copied from class: AnyHtmlElement
        Sets draggable attribute on this element.
        Overrides:
        draggable in class AnyHtmlElement
        Parameters:
        value - New value of draggable attribute. This method has no effect if it is null.
        Returns:
        this
      • dropzone

        public InputElement dropzone(String value)
        Description copied from class: AnyHtmlElement
        Sets dropzone attribute on this element.
        Overrides:
        dropzone in class AnyHtmlElement
        Parameters:
        value - New value of dropzone attribute. This method has no effect if it is null.
        Returns:
        this
      • hidden

        public InputElement hidden()
        Description copied from class: AnyHtmlElement
        Adds hidden attribute to this element. Boolean attribute hidden is serialized as <... hidden ...>, i.e. without value. This method has no effect if the attribute is already present.
        Overrides:
        hidden in class AnyHtmlElement
        Returns:
        this
      • hidden

        public InputElement hidden(boolean value)
        Description copied from class: AnyHtmlElement
        Adds hidden attribute to this element. Boolean attribute hidden is serialized as <... hidden ...>, i.e. without value. This method has no effect if the parameter is false or the attribute is already present.
        Overrides:
        hidden in class AnyHtmlElement
        Parameters:
        value - If true, the attribute is added. If false, this method has no effect.
        Returns:
        this
      • hidden

        public InputElement hidden(Boolean value)
        Description copied from class: AnyHtmlElement
        Adds hidden attribute to this element. Boolean attribute hidden is serialized as <... hidden ...>, i.e. without value. This method has no effect if the parameter is false or null or if the attribute is already present.
        Overrides:
        hidden in class AnyHtmlElement
        Parameters:
        value - If true, the attribute is added. If false or null, this method has no effect.
        Returns:
        this
      • lang

        public InputElement lang(String value)
        Description copied from class: AnyHtmlElement
        Sets lang attribute on this element.
        Overrides:
        lang in class AnyHtmlElement
        Parameters:
        value - New value of lang attribute. This method has no effect if it is null.
        Returns:
        this
      • role

        public InputElement role(String value)
        Description copied from class: AnyHtmlElement
        Sets role attribute on this element.
        Overrides:
        role in class AnyHtmlElement
        Parameters:
        value - New value of role attribute. This method has no effect if it is null.
        Returns:
        this
      • spellcheck

        public InputElement spellcheck(String value)
        Description copied from class: AnyHtmlElement
        Sets spellcheck attribute on this element.
        Overrides:
        spellcheck in class AnyHtmlElement
        Parameters:
        value - New value of spellcheck attribute. This method has no effect if it is null.
        Returns:
        this
      • tabindex

        public InputElement tabindex(String value)
        Description copied from class: AnyHtmlElement
        Sets tabindex attribute on this element.
        Overrides:
        tabindex in class AnyHtmlElement
        Parameters:
        value - New value of tabindex attribute. This method has no effect if it is null.
        Returns:
        this
      • title

        public InputElement title(String value)
        Description copied from class: AnyHtmlElement
        Sets title attribute on this element.
        Overrides:
        title in class AnyHtmlElement
        Parameters:
        value - New value of title attribute. This method has no effect if it is null.
        Returns:
        this
      • translate

        public InputElement translate(String value)
        Description copied from class: AnyHtmlElement
        Sets translate attribute on this element.
        Overrides:
        translate in class AnyHtmlElement
        Parameters:
        value - New value of translate attribute. This method has no effect if it is null.
        Returns:
        this
      • onabort

        public InputElement onabort(String value)
        Description copied from class: AnyHtmlElement
        Sets onabort attribute on this element.
        Overrides:
        onabort in class AnyHtmlElement
        Parameters:
        value - New value of onabort attribute. This method has no effect if it is null.
        Returns:
        this
      • onautocomplete

        public InputElement onautocomplete(String value)
        Description copied from class: AnyHtmlElement
        Sets onautocomplete attribute on this element.
        Overrides:
        onautocomplete in class AnyHtmlElement
        Parameters:
        value - New value of onautocomplete attribute. This method has no effect if it is null.
        Returns:
        this
      • onautocompleteerror

        public InputElement onautocompleteerror(String value)
        Description copied from class: AnyHtmlElement
        Sets onautocompleteerror attribute on this element.
        Overrides:
        onautocompleteerror in class AnyHtmlElement
        Parameters:
        value - New value of onautocompleteerror attribute. This method has no effect if it is null.
        Returns:
        this
      • onblur

        public InputElement onblur(String value)
        Description copied from class: AnyHtmlElement
        Sets onblur attribute on this element.
        Overrides:
        onblur in class AnyHtmlElement
        Parameters:
        value - New value of onblur attribute. This method has no effect if it is null.
        Returns:
        this
      • oncancel

        public InputElement oncancel(String value)
        Description copied from class: AnyHtmlElement
        Sets oncancel attribute on this element.
        Overrides:
        oncancel in class AnyHtmlElement
        Parameters:
        value - New value of oncancel attribute. This method has no effect if it is null.
        Returns:
        this
      • oncanplay

        public InputElement oncanplay(String value)
        Description copied from class: AnyHtmlElement
        Sets oncanplay attribute on this element.
        Overrides:
        oncanplay in class AnyHtmlElement
        Parameters:
        value - New value of oncanplay attribute. This method has no effect if it is null.
        Returns:
        this
      • oncanplaythrough

        public InputElement oncanplaythrough(String value)
        Description copied from class: AnyHtmlElement
        Sets oncanplaythrough attribute on this element.
        Overrides:
        oncanplaythrough in class AnyHtmlElement
        Parameters:
        value - New value of oncanplaythrough attribute. This method has no effect if it is null.
        Returns:
        this
      • onchange

        public InputElement onchange(String value)
        Description copied from class: AnyHtmlElement
        Sets onchange attribute on this element.
        Overrides:
        onchange in class AnyHtmlElement
        Parameters:
        value - New value of onchange attribute. This method has no effect if it is null.
        Returns:
        this
      • onclick

        public InputElement onclick(String value)
        Description copied from class: AnyHtmlElement
        Sets onclick attribute on this element.
        Overrides:
        onclick in class AnyHtmlElement
        Parameters:
        value - New value of onclick attribute. This method has no effect if it is null.
        Returns:
        this
      • onclose

        public InputElement onclose(String value)
        Description copied from class: AnyHtmlElement
        Sets onclose attribute on this element.
        Overrides:
        onclose in class AnyHtmlElement
        Parameters:
        value - New value of onclose attribute. This method has no effect if it is null.
        Returns:
        this
      • oncontextmenu

        public InputElement oncontextmenu(String value)
        Description copied from class: AnyHtmlElement
        Sets oncontextmenu attribute on this element.
        Overrides:
        oncontextmenu in class AnyHtmlElement
        Parameters:
        value - New value of oncontextmenu attribute. This method has no effect if it is null.
        Returns:
        this
      • oncuechange

        public InputElement oncuechange(String value)
        Description copied from class: AnyHtmlElement
        Sets oncuechange attribute on this element.
        Overrides:
        oncuechange in class AnyHtmlElement
        Parameters:
        value - New value of oncuechange attribute. This method has no effect if it is null.
        Returns:
        this
      • ondblclick

        public InputElement ondblclick(String value)
        Description copied from class: AnyHtmlElement
        Sets ondblclick attribute on this element.
        Overrides:
        ondblclick in class AnyHtmlElement
        Parameters:
        value - New value of ondblclick attribute. This method has no effect if it is null.
        Returns:
        this
      • ondrag

        public InputElement ondrag(String value)
        Description copied from class: AnyHtmlElement
        Sets ondrag attribute on this element.
        Overrides:
        ondrag in class AnyHtmlElement
        Parameters:
        value - New value of ondrag attribute. This method has no effect if it is null.
        Returns:
        this
      • ondragend

        public InputElement ondragend(String value)
        Description copied from class: AnyHtmlElement
        Sets ondragend attribute on this element.
        Overrides:
        ondragend in class AnyHtmlElement
        Parameters:
        value - New value of ondragend attribute. This method has no effect if it is null.
        Returns:
        this
      • ondragenter

        public InputElement ondragenter(String value)
        Description copied from class: AnyHtmlElement
        Sets ondragenter attribute on this element.
        Overrides:
        ondragenter in class AnyHtmlElement
        Parameters:
        value - New value of ondragenter attribute. This method has no effect if it is null.
        Returns:
        this
      • ondragexit

        public InputElement ondragexit(String value)
        Description copied from class: AnyHtmlElement
        Sets ondragexit attribute on this element.
        Overrides:
        ondragexit in class AnyHtmlElement
        Parameters:
        value - New value of ondragexit attribute. This method has no effect if it is null.
        Returns:
        this
      • ondragleave

        public InputElement ondragleave(String value)
        Description copied from class: AnyHtmlElement
        Sets ondragleave attribute on this element.
        Overrides:
        ondragleave in class AnyHtmlElement
        Parameters:
        value - New value of ondragleave attribute. This method has no effect if it is null.
        Returns:
        this
      • ondragover

        public InputElement ondragover(String value)
        Description copied from class: AnyHtmlElement
        Sets ondragover attribute on this element.
        Overrides:
        ondragover in class AnyHtmlElement
        Parameters:
        value - New value of ondragover attribute. This method has no effect if it is null.
        Returns:
        this
      • ondragstart

        public InputElement ondragstart(String value)
        Description copied from class: AnyHtmlElement
        Sets ondragstart attribute on this element.
        Overrides:
        ondragstart in class AnyHtmlElement
        Parameters:
        value - New value of ondragstart attribute. This method has no effect if it is null.
        Returns:
        this
      • ondrop

        public InputElement ondrop(String value)
        Description copied from class: AnyHtmlElement
        Sets ondrop attribute on this element.
        Overrides:
        ondrop in class AnyHtmlElement
        Parameters:
        value - New value of ondrop attribute. This method has no effect if it is null.
        Returns:
        this
      • ondurationchange

        public InputElement ondurationchange(String value)
        Description copied from class: AnyHtmlElement
        Sets ondurationchange attribute on this element.
        Overrides:
        ondurationchange in class AnyHtmlElement
        Parameters:
        value - New value of ondurationchange attribute. This method has no effect if it is null.
        Returns:
        this
      • onemptied

        public InputElement onemptied(String value)
        Description copied from class: AnyHtmlElement
        Sets onemptied attribute on this element.
        Overrides:
        onemptied in class AnyHtmlElement
        Parameters:
        value - New value of onemptied attribute. This method has no effect if it is null.
        Returns:
        this
      • onended

        public InputElement onended(String value)
        Description copied from class: AnyHtmlElement
        Sets onended attribute on this element.
        Overrides:
        onended in class AnyHtmlElement
        Parameters:
        value - New value of onended attribute. This method has no effect if it is null.
        Returns:
        this
      • onerror

        public InputElement onerror(String value)
        Description copied from class: AnyHtmlElement
        Sets onerror attribute on this element.
        Overrides:
        onerror in class AnyHtmlElement
        Parameters:
        value - New value of onerror attribute. This method has no effect if it is null.
        Returns:
        this
      • onfocus

        public InputElement onfocus(String value)
        Description copied from class: AnyHtmlElement
        Sets onfocus attribute on this element.
        Overrides:
        onfocus in class AnyHtmlElement
        Parameters:
        value - New value of onfocus attribute. This method has no effect if it is null.
        Returns:
        this
      • oninput

        public InputElement oninput(String value)
        Description copied from class: AnyHtmlElement
        Sets oninput attribute on this element.
        Overrides:
        oninput in class AnyHtmlElement
        Parameters:
        value - New value of oninput attribute. This method has no effect if it is null.
        Returns:
        this
      • oninvalid

        public InputElement oninvalid(String value)
        Description copied from class: AnyHtmlElement
        Sets oninvalid attribute on this element.
        Overrides:
        oninvalid in class AnyHtmlElement
        Parameters:
        value - New value of oninvalid attribute. This method has no effect if it is null.
        Returns:
        this
      • onkeydown

        public InputElement onkeydown(String value)
        Description copied from class: AnyHtmlElement
        Sets onkeydown attribute on this element.
        Overrides:
        onkeydown in class AnyHtmlElement
        Parameters:
        value - New value of onkeydown attribute. This method has no effect if it is null.
        Returns:
        this
      • onkeypress

        public InputElement onkeypress(String value)
        Description copied from class: AnyHtmlElement
        Sets onkeypress attribute on this element.
        Overrides:
        onkeypress in class AnyHtmlElement
        Parameters:
        value - New value of onkeypress attribute. This method has no effect if it is null.
        Returns:
        this
      • onkeyup

        public InputElement onkeyup(String value)
        Description copied from class: AnyHtmlElement
        Sets onkeyup attribute on this element.
        Overrides:
        onkeyup in class AnyHtmlElement
        Parameters:
        value - New value of onkeyup attribute. This method has no effect if it is null.
        Returns:
        this
      • onload

        public InputElement onload(String value)
        Description copied from class: AnyHtmlElement
        Sets onload attribute on this element.
        Overrides:
        onload in class AnyHtmlElement
        Parameters:
        value - New value of onload attribute. This method has no effect if it is null.
        Returns:
        this
      • onloadeddata

        public InputElement onloadeddata(String value)
        Description copied from class: AnyHtmlElement
        Sets onloadeddata attribute on this element.
        Overrides:
        onloadeddata in class AnyHtmlElement
        Parameters:
        value - New value of onloadeddata attribute. This method has no effect if it is null.
        Returns:
        this
      • onloadedmetadata

        public InputElement onloadedmetadata(String value)
        Description copied from class: AnyHtmlElement
        Sets onloadedmetadata attribute on this element.
        Overrides:
        onloadedmetadata in class AnyHtmlElement
        Parameters:
        value - New value of onloadedmetadata attribute. This method has no effect if it is null.
        Returns:
        this
      • onloadstart

        public InputElement onloadstart(String value)
        Description copied from class: AnyHtmlElement
        Sets onloadstart attribute on this element.
        Overrides:
        onloadstart in class AnyHtmlElement
        Parameters:
        value - New value of onloadstart attribute. This method has no effect if it is null.
        Returns:
        this
      • onmousedown

        public InputElement onmousedown(String value)
        Description copied from class: AnyHtmlElement
        Sets onmousedown attribute on this element.
        Overrides:
        onmousedown in class AnyHtmlElement
        Parameters:
        value - New value of onmousedown attribute. This method has no effect if it is null.
        Returns:
        this
      • onmouseenter

        public InputElement onmouseenter(String value)
        Description copied from class: AnyHtmlElement
        Sets onmouseenter attribute on this element.
        Overrides:
        onmouseenter in class AnyHtmlElement
        Parameters:
        value - New value of onmouseenter attribute. This method has no effect if it is null.
        Returns:
        this
      • onmouseleave

        public InputElement onmouseleave(String value)
        Description copied from class: AnyHtmlElement
        Sets onmouseleave attribute on this element.
        Overrides:
        onmouseleave in class AnyHtmlElement
        Parameters:
        value - New value of onmouseleave attribute. This method has no effect if it is null.
        Returns:
        this
      • onmousemove

        public InputElement onmousemove(String value)
        Description copied from class: AnyHtmlElement
        Sets onmousemove attribute on this element.
        Overrides:
        onmousemove in class AnyHtmlElement
        Parameters:
        value - New value of onmousemove attribute. This method has no effect if it is null.
        Returns:
        this
      • onmouseout

        public InputElement onmouseout(String value)
        Description copied from class: AnyHtmlElement
        Sets onmouseout attribute on this element.
        Overrides:
        onmouseout in class AnyHtmlElement
        Parameters:
        value - New value of onmouseout attribute. This method has no effect if it is null.
        Returns:
        this
      • onmouseover

        public InputElement onmouseover(String value)
        Description copied from class: AnyHtmlElement
        Sets onmouseover attribute on this element.
        Overrides:
        onmouseover in class AnyHtmlElement
        Parameters:
        value - New value of onmouseover attribute. This method has no effect if it is null.
        Returns:
        this
      • onmouseup

        public InputElement onmouseup(String value)
        Description copied from class: AnyHtmlElement
        Sets onmouseup attribute on this element.
        Overrides:
        onmouseup in class AnyHtmlElement
        Parameters:
        value - New value of onmouseup attribute. This method has no effect if it is null.
        Returns:
        this
      • onmousewheel

        public InputElement onmousewheel(String value)
        Description copied from class: AnyHtmlElement
        Sets onmousewheel attribute on this element.
        Overrides:
        onmousewheel in class AnyHtmlElement
        Parameters:
        value - New value of onmousewheel attribute. This method has no effect if it is null.
        Returns:
        this
      • onpause

        public InputElement onpause(String value)
        Description copied from class: AnyHtmlElement
        Sets onpause attribute on this element.
        Overrides:
        onpause in class AnyHtmlElement
        Parameters:
        value - New value of onpause attribute. This method has no effect if it is null.
        Returns:
        this
      • onplay

        public InputElement onplay(String value)
        Description copied from class: AnyHtmlElement
        Sets onplay attribute on this element.
        Overrides:
        onplay in class AnyHtmlElement
        Parameters:
        value - New value of onplay attribute. This method has no effect if it is null.
        Returns:
        this
      • onplaying

        public InputElement onplaying(String value)
        Description copied from class: AnyHtmlElement
        Sets onplaying attribute on this element.
        Overrides:
        onplaying in class AnyHtmlElement
        Parameters:
        value - New value of onplaying attribute. This method has no effect if it is null.
        Returns:
        this
      • onprogress

        public InputElement onprogress(String value)
        Description copied from class: AnyHtmlElement
        Sets onprogress attribute on this element.
        Overrides:
        onprogress in class AnyHtmlElement
        Parameters:
        value - New value of onprogress attribute. This method has no effect if it is null.
        Returns:
        this
      • onratechange

        public InputElement onratechange(String value)
        Description copied from class: AnyHtmlElement
        Sets onratechange attribute on this element.
        Overrides:
        onratechange in class AnyHtmlElement
        Parameters:
        value - New value of onratechange attribute. This method has no effect if it is null.
        Returns:
        this
      • onreset

        public InputElement onreset(String value)
        Description copied from class: AnyHtmlElement
        Sets onreset attribute on this element.
        Overrides:
        onreset in class AnyHtmlElement
        Parameters:
        value - New value of onreset attribute. This method has no effect if it is null.
        Returns:
        this
      • onresize

        public InputElement onresize(String value)
        Description copied from class: AnyHtmlElement
        Sets onresize attribute on this element.
        Overrides:
        onresize in class AnyHtmlElement
        Parameters:
        value - New value of onresize attribute. This method has no effect if it is null.
        Returns:
        this
      • onscroll

        public InputElement onscroll(String value)
        Description copied from class: AnyHtmlElement
        Sets onscroll attribute on this element.
        Overrides:
        onscroll in class AnyHtmlElement
        Parameters:
        value - New value of onscroll attribute. This method has no effect if it is null.
        Returns:
        this
      • onseeked

        public InputElement onseeked(String value)
        Description copied from class: AnyHtmlElement
        Sets onseeked attribute on this element.
        Overrides:
        onseeked in class AnyHtmlElement
        Parameters:
        value - New value of onseeked attribute. This method has no effect if it is null.
        Returns:
        this
      • onseeking

        public InputElement onseeking(String value)
        Description copied from class: AnyHtmlElement
        Sets onseeking attribute on this element.
        Overrides:
        onseeking in class AnyHtmlElement
        Parameters:
        value - New value of onseeking attribute. This method has no effect if it is null.
        Returns:
        this
      • onselect

        public InputElement onselect(String value)
        Description copied from class: AnyHtmlElement
        Sets onselect attribute on this element.
        Overrides:
        onselect in class AnyHtmlElement
        Parameters:
        value - New value of onselect attribute. This method has no effect if it is null.
        Returns:
        this
      • onshow

        public InputElement onshow(String value)
        Description copied from class: AnyHtmlElement
        Sets onshow attribute on this element.
        Overrides:
        onshow in class AnyHtmlElement
        Parameters:
        value - New value of onshow attribute. This method has no effect if it is null.
        Returns:
        this
      • onsort

        public InputElement onsort(String value)
        Description copied from class: AnyHtmlElement
        Sets onsort attribute on this element.
        Overrides:
        onsort in class AnyHtmlElement
        Parameters:
        value - New value of onsort attribute. This method has no effect if it is null.
        Returns:
        this
      • onstalled

        public InputElement onstalled(String value)
        Description copied from class: AnyHtmlElement
        Sets onstalled attribute on this element.
        Overrides:
        onstalled in class AnyHtmlElement
        Parameters:
        value - New value of onstalled attribute. This method has no effect if it is null.
        Returns:
        this
      • onsubmit

        public InputElement onsubmit(String value)
        Description copied from class: AnyHtmlElement
        Sets onsubmit attribute on this element.
        Overrides:
        onsubmit in class AnyHtmlElement
        Parameters:
        value - New value of onsubmit attribute. This method has no effect if it is null.
        Returns:
        this
      • onsuspend

        public InputElement onsuspend(String value)
        Description copied from class: AnyHtmlElement
        Sets onsuspend attribute on this element.
        Overrides:
        onsuspend in class AnyHtmlElement
        Parameters:
        value - New value of onsuspend attribute. This method has no effect if it is null.
        Returns:
        this
      • ontimeupdate

        public InputElement ontimeupdate(String value)
        Description copied from class: AnyHtmlElement
        Sets ontimeupdate attribute on this element.
        Overrides:
        ontimeupdate in class AnyHtmlElement
        Parameters:
        value - New value of ontimeupdate attribute. This method has no effect if it is null.
        Returns:
        this
      • ontoggle

        public InputElement ontoggle(String value)
        Description copied from class: AnyHtmlElement
        Sets ontoggle attribute on this element.
        Overrides:
        ontoggle in class AnyHtmlElement
        Parameters:
        value - New value of ontoggle attribute. This method has no effect if it is null.
        Returns:
        this
      • onvolumechange

        public InputElement onvolumechange(String value)
        Description copied from class: AnyHtmlElement
        Sets onvolumechange attribute on this element.
        Overrides:
        onvolumechange in class AnyHtmlElement
        Parameters:
        value - New value of onvolumechange attribute. This method has no effect if it is null.
        Returns:
        this
      • onwaiting

        public InputElement onwaiting(String value)
        Description copied from class: AnyHtmlElement
        Sets onwaiting attribute on this element.
        Overrides:
        onwaiting in class AnyHtmlElement
        Parameters:
        value - New value of onwaiting attribute. This method has no effect if it is null.
        Returns:
        this
      • onclick

        public InputElement onclick(Runnable handler)
        Description copied from class: AnyHtmlElement
        Adds event handler for click event. Single event can have multiple event handlers. This method adds new event handler to the end of the list. Event handlers are executed in order.
        Overrides:
        onclick in class AnyHtmlElement
        Parameters:
        handler - Event handler to add. If null, an empty event handler is added.
        Returns:
        this
      • onchange

        public InputElement onchange(Runnable handler)
        Description copied from class: AnyHtmlElement
        Adds event handler for change event. Single event can have multiple event handlers. This method adds new event handler to the end of the list. Event handlers are executed in order.
        Overrides:
        onchange in class AnyHtmlElement
        Parameters:
        handler - Event handler to add. If null, an empty event handler is added.
        Returns:
        this
      • oninput

        public InputElement oninput(Runnable handler)
        Description copied from class: AnyHtmlElement
        Adds event handler for input event. Single event can have multiple event handlers. This method adds new event handler to the end of the list. Event handlers are executed in order.
        Overrides:
        oninput in class AnyHtmlElement
        Parameters:
        handler - Event handler to add. If null, an empty event handler is added.
        Returns:
        this
      • key

        public InputElement key(Object key)
        Description copied from class: DomElement
        Sets element's pairing key. Any object implementing Object.equals(Object) and Object.hashCode() can be used as a key. Key, if set, must be unique among siblings in the DOM tree. Once set, the key is available from DomElement.key(). If the key is set to null, DomElement.key() will return DomElement.id().
        While DomElement.id() is sent to the browser, is a String, and it should be unique in the document, DomElement.key() is used only server-side, can be of any type, and it only needs to be unique among sibling elements.
        Key is used in hierarchical DOM diff to pair corresponding elements in cases where some DOM nodes have been inserted or removed from parent's child list. If DomElement.key() is null, DOM diff uses element position to pair elements in compared DOM trees, which might result in unnecessarily big diffs if an element is inserted at the beginning of a long list. Absence of key thus doesn't impact functionality, only performance. And even then it matters only if siblings are inserted or removed.
        Overrides:
        key in class AnyHtmlElement
        Parameters:
        key - New element key. Any object implementing Object.equals(Object) and Object.hashCode() can be used as a key. Key, if set, must be unique among siblings in the DOM tree. If this parameter is null, DomElement.key() will return DomElement.id().
        Returns:
        this
      • id

        public InputElement id(String id)
        Description copied from class: DomElement
        Sets element's ID. Element ID is serialized as an id attribute in HTML. It must therefore fulfill criteria for proper element ID in HTML, which most importantly means the ID should be unique in the document. Element ID has a special meaning in PushMode. Listeners require the element to have an ID. Listeners on ID-less elements are ignored. Once set, the ID is available from DomElement.id() method. ID is the default value of DomElement.key().
        Overrides:
        id in class AnyHtmlElement
        Parameters:
        id - New element ID.
        Returns:
        this
      • clazz

        public InputElement clazz(String clazz)
        Description copied from class: DomElement
        Sets class attribute. If the attribute is already set, this method appends new value to the old value separated by space.
        Overrides:
        clazz in class AnyHtmlElement
        Parameters:
        clazz - Text to set/append to the class attribute. This method has no effect if the parameter is null.
        Returns:
        this
      • data

        public InputElement data(String key,
                                 String value)
        Description copied from class: DomElement
        Sets data-* attribute.
        Overrides:
        data in class AnyHtmlElement
        Parameters:
        key - Name of the attribute if formed from its key and 'data-' prefix, e.g. key hello will set attribute data-hello. This method has no effect if the parameter is null.
        value - Text to write to the data-[key] attribute. This method has no effect if the parameter is null.
        Returns:
        this
      • style

        public InputElement style(String style)
        Description copied from class: DomElement
        Sets style attribute. If the attribute is already set, this method appends new value to the old value separated by semicolon.
        Overrides:
        style in class AnyHtmlElement
        Parameters:
        style - Text to set/append to the style attribute. This method has no effect if the parameter is null.
        Returns:
        this
      • add

        public <C extends DomContentInputElement add(C... children)
        Description copied from class: DomElement
        Adds all nodes in an array to this element.
        Overrides:
        add in class AnyHtmlElement
        Parameters:
        children - Array of child nodes to add. This method has no effect if the parameter is null. Array items that are null are skipped.
        Returns:
        this
        See Also:
        DomElement.add(DomContent)
      • text

        public InputElement text(String text)
        Description copied from class: DomElement
        Adds literal text to this element The text is first wrapped in DomText. If the text is null or empty, this method has no effect.
        Overrides:
        text in class AnyHtmlElement
        Parameters:
        text - Text to add. This method has no effect if the text is null or empty.
        Returns:
        this
        See Also:
        DomElement.add(DomContent)
      • freeze

        public InputElement freeze()
        Description copied from class: DomElement
        Creates frozen deep clone of this element. Mutating methods throw IllegalStateException when executed on frozen element. Frozen elements can be safely shared by all threads. Freezing is recursive. Frozen elements therefore cannot contain mutable nodes.
        Freezing applies several transformations to the cloned element, so that these transformations don't have to be performed repeatedly during rendering. All DomFragment descendants are recursively inlined into their respective parents, so that the frozen element contains no DomFragment descendants. Freezing the element causes all consecutive text nodes to be concatenated into single node. If the resulting text node is empty, it is removed. Listeners are discarded on this and descendant elements with null DomElement.id(). All internal arrays are compacted, so that the frozen DOM tree takes up minimum amount of memory. None of these transformations modifies the original element in any way.
        Overrides:
        freeze in class AnyHtmlElement
        Returns:
        Deep frozen clone. Returns this if this element is already frozen.