com.aspose.html.forms

Class SelectElement



  • public class SelectElement
    extends FormElement<HTMLSelectElement>

    The SelectElement represents a wrapper that is associated with the HTMLSelectElement

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getId()
      Represents the Id attribute of the input element.
      boolean getMultiple()
      If true, multiple OPTION elements may be selected in this SELECT.
      java.lang.String getName()
      Represent the name attribute of the input element.
      OptionCollection getOptions()
      Returns a list of options
      com.aspose.ms.System.Collections.Generic.IGenericList<java.lang.String> getSelectedOptions()
      Returns a list of selected options
      java.lang.String getType()
      The type of this form control.
      java.lang.String getValue()
      On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.
      void selectItems(int... indexes)
      This methods allows to select multiple options by their indexes.
      void selectItems(java.lang.String... values)
      This methods allows to select multiple options by their values.
      void setId(java.lang.String value)
      Represents the Id attribute of the input element.
      void setMultiple(boolean value)
      If true, multiple OPTION elements may be selected in this SELECT.
      void setName(java.lang.String value)
      Represent the name attribute of the input element.
      void setValue(java.lang.String value)
      On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SelectElement

        public SelectElement(HTMLSelectElement element)

        Initializes a new instance of the SelectElement class.

        Parameters:
        element - The element.
    • Method Detail

      • getValue

        public java.lang.String getValue()

        On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.

        Overrides:
        getValue in class FormElementBase
      • setValue

        public void setValue(java.lang.String value)

        On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.

        Overrides:
        setValue in class FormElementBase
      • getName

        public java.lang.String getName()

        Represent the name attribute of the input element.

        Value: The name of the element.
        Overrides:
        getName in class FormElementBase
      • setName

        public void setName(java.lang.String value)

        Represent the name attribute of the input element.

        Value: The name of the element.
        Overrides:
        setName in class FormElementBase
      • getId

        public java.lang.String getId()

        Represents the Id attribute of the input element.

        Value: The identifier of the element.
        Overrides:
        getId in class FormElementBase
      • setId

        public void setId(java.lang.String value)

        Represents the Id attribute of the input element.

        Value: The identifier of the element.
        Overrides:
        setId in class FormElementBase
      • getType

        public java.lang.String getType()

        The type of this form control. This is the string "select-multiple" when the multiple attribute is true and the string "select-one" when false.

      • getMultiple

        public boolean getMultiple()

        If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.01.

      • setMultiple

        public void setMultiple(boolean value)

        If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.01.

      • getSelectedOptions

        public com.aspose.ms.System.Collections.Generic.IGenericList<java.lang.String> getSelectedOptions()

        Returns a list of selected options

      • selectItems

        public void selectItems(int... indexes)

        This methods allows to select multiple options by their indexes.

        Parameters:
        indexes - An array of indexes for parameter selection.
      • selectItems

        public void selectItems(java.lang.String... values)

        This methods allows to select multiple options by their values.

        Parameters:
        values - An array of values for parameter selection.