Class AutoFocus

  • All Implemented Interfaces:
    TagBase, InputAttributable,, java.lang.Cloneable

    public class AutoFocus
    extends AbstractAttribute
    implements InputAttributable
    autofocus attribute for the element.
    This Boolean attribute lets you specify that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form element in a document can have the autofocus attribute, which is a Boolean. It cannot be applied if the type attribute is set to hidden (that is, you cannot automatically set focus to a hidden control). Note that the focusing of the control may occur before the firing of the DOMContentLoaded event.
    See Also:
    Serialized Form
    • Constructor Detail

      • AutoFocus

        public AutoFocus​()
      • AutoFocus

        public AutoFocus​(java.lang.String value)
    • Method Detail

      • setValue

        public void setValue​(java.lang.String value)
      • setValue

        public void setValue​(boolean updateClient,
                             java.lang.String value)
        sets the value for this attribute
        updateClient - true to update client browser page if it is available. The default value is true but it will be ignored if there is no client browser page.
        value - the value for the attribute.
      • getValue

        public java.lang.String getValue​()
      • init

        protected void init​()
        invokes only once per object