Class WMultiSelect

    • Constructor Detail

      • WMultiSelect

        public WMultiSelect()
        Creates an empty WMultiSelect.
      • WMultiSelect

        public WMultiSelect​(Object[] options)
        Creates a WMultiSelect containing the specified options.
        Parameters:
        options - the options to display.
      • WMultiSelect

        public WMultiSelect​(List options)
        Creates a WMultiSelect containing the specified options.
        Parameters:
        options - the options to display.
      • WMultiSelect

        public WMultiSelect​(Object table)
        Creates a WMultiSelect with the options provided by the given table.
        Parameters:
        table - the table to obtain the list's options from.
    • Method Detail

      • setRows

        public void setRows​(int rows)
        Sets the maximum number of rows that are visible in the list at any one time. If the number of rows is less than two, then the default number of rows will be displayed.
        Parameters:
        rows - the number of rows to display.
      • getRows

        public int getRows()
        Returns:
        the number of rows to display in the list.
      • toggleSelection

        public void toggleSelection​(boolean selected)
        Description copied from interface: SelectionToggleable
        Sets the selections for this component.
        Specified by:
        toggleSelection in interface SelectionToggleable
        Parameters:
        selected - if true, select everything. If false, deselect everything.
      • getOrCreateComponentModel

        protected WMultiSelect.MultiSelectModel getOrCreateComponentModel()
        Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.
        Overrides:
        getOrCreateComponentModel in class AbstractWMultiSelectList
        Returns:
        the model for this component