Class WDataTable

    • Constructor Detail

      • WDataTable

        public WDataTable()
        Deprecated.
        Creates a WDataTable.
    • Method Detail

      • addColumn

        public void addColumn​(WTableColumn column)
        Deprecated.
        Adds a column to the table.
        Parameters:
        column - the column to add.
      • getColumn

        public WTableColumn getColumn​(int index)
        Deprecated.
        Retrieves the column at the specified index. Bounds checking is not performed, see getColumnCount().
        Parameters:
        index - the column index.
        Returns:
        the column at the specified index.
      • getColumnCount

        public int getColumnCount()
        Deprecated.
        Returns the number of columns contained in this table. Invisible columns still count towards the total.
        Returns:
        the number of columns contained in this table.
      • getRepeater

        public WRepeater getRepeater()
        Deprecated.
        Returns:
        the repeater used to render table rows.
      • getRowHeaderColumn

        public WTableColumn getRowHeaderColumn()
        Deprecated.
        Returns:
        the table column used to display row headers.
      • isDisabled

        public boolean isDisabled()
        Deprecated.
        Indicates whether the WDataTable is disabled in the given context.
        Specified by:
        isDisabled in interface Disableable
        Returns:
        true if the table is disabled, otherwise false.
      • setDisabled

        public void setDisabled​(boolean disabled)
        Deprecated.
        Sets whether the WDataTable is disabled.
        Specified by:
        setDisabled in interface Disableable
        Parameters:
        disabled - true to disable the table, false to enable it.
      • getDataModel

        public TableDataModel getDataModel()
        Deprecated.
        Returns:
        Returns the dataModel.
      • setDataModel

        public void setDataModel​(TableDataModel dataModel)
        Deprecated.
        Sets the data model.
        Parameters:
        dataModel - The dataModel to set.
      • setSeparatorType

        public void setSeparatorType​(WDataTable.SeparatorType separatorType)
        Deprecated.
        Sets the separator used to visually separate rows or columns.
        Parameters:
        separatorType - The separator type to set.
      • getStripingType

        public WDataTable.StripingType getStripingType()
        Deprecated.
        Returns:
        Returns the striping type.
      • setStripingType

        public void setStripingType​(WDataTable.StripingType stripingType)
        Deprecated.
        Sets the striping type used to highlight alternate rows or columns.
        Parameters:
        stripingType - The striping type to set.
      • isShowColumnHeaders

        public boolean isShowColumnHeaders()
        Deprecated.
        Indicates whether table column headers should be displayed.
        Returns:
        true if column headers should be displayed, false otherwise.
      • setShowColumnHeaders

        public void setShowColumnHeaders​(boolean showColumnHeaders)
        Deprecated.
        Sets whether table column headers should be displayed.
        Parameters:
        showColumnHeaders - true to display table column headers, false otherwise.
      • isShowRowHeaders

        public boolean isShowRowHeaders()
        Deprecated.
        Indicates whether row headers should be displayed.
        Returns:
        true if row headers should be displayed, false otherwise.
      • setShowRowHeaders

        public void setShowRowHeaders​(boolean showRowHeaders)
        Deprecated.

        Sets whether row headers should be displayed.

        To set the column heading for the row headers, use: getRowHeaderColumn().getColumnLabel().setText(yourText).

        Parameters:
        showRowHeaders - true to show row headers, false otherwise.
      • isShowRowIndices

        public boolean isShowRowIndices()
        Deprecated.
        Indicates whether row indices should be displayed.
        Returns:
        true if row indices should be displayed, false otherwise.
      • setShowRowIndices

        public void setShowRowIndices​(boolean showRowIndices)
        Deprecated.
        Sets whether row indices should be displayed.
        Parameters:
        showRowIndices - true if row indices should be displayed, false otherwise.
      • isSubmitOnRowSelect

        public boolean isSubmitOnRowSelect()
        Deprecated.
        1.2.0
        Indicates whether the form should submit whenever the row selection changes. This must be false and would be removed if this class was not already deprecated. See #701.
        Returns:
        false
      • setSubmitOnRowSelect

        public void setSubmitOnRowSelect​(boolean submitOnRowSelect)
        Deprecated.
        1.2.0
        Sets whether the form should submit whenever the row selection changes. This must be false and would be removed if this class was not already deprecated. See #701.
        Parameters:
        submitOnRowSelect - true if form submission should occur on row selection change, false otherwise.
      • isFilterable

        public boolean isFilterable()
        Deprecated.
        Indicates whether filtering is enabled.
        Returns:
        true if filtering is enabled, false otherwise.
      • setFilterable

        public void setFilterable​(boolean filterable)
        Deprecated.
        Sets whether filtering is enabled.
        Parameters:
        filterable - true to enable filtering, false otherwise.
      • setActiveFilters

        public void setActiveFilters​(List<String> activeFilters)
        Deprecated.
        Sets the active filters.
        Parameters:
        activeFilters - The active filters to set.
      • getActiveFilters

        public List<String> getActiveFilters()
        Deprecated.
        Returns:
        the active filters.
      • getSelectionChangeAction

        public Action getSelectionChangeAction()
        Deprecated.
        Returns:
        the action to execute when row selection changes.
      • setSelectionChangeAction

        public void setSelectionChangeAction​(Action selectionChangeAction)
        Deprecated.
        Sets the action to execute when row selection changes.
        Parameters:
        selectionChangeAction - the action to execute on row selection change.
      • getNoDataMessage

        public String getNoDataMessage()
        Deprecated.
        Returns:
        the message to display when the table contains no rows.
      • setNoDataMessage

        public void setNoDataMessage​(String noDataMessage)
        Deprecated.
        Sets the message to display when the table contains no rows.
        Parameters:
        noDataMessage - the no data message.
      • getSummary

        public String getSummary()
        Deprecated.
        Returns:
        the table summary text.
      • setSummary

        public void setSummary​(String summary)
        Deprecated.
        Sets the table summary text.
        Parameters:
        summary - The summary to set.
      • getCaption

        public String getCaption()
        Deprecated.
        Returns:
        the table caption text.
      • setCaption

        public void setCaption​(String caption)
        Deprecated.
        Sets the table caption text.
        Parameters:
        caption - The caption to set.
      • getColumnOrder

        public int[] getColumnOrder()
        Deprecated.
        Returns:
        the column order, or null if the default ordering is to be used.
      • setColumnOrder

        public void setColumnOrder​(int[] columnOrder)
        Deprecated.
        Parameters:
        columnOrder - the column order to set, or null to use default ordering.
      • setPaginationMode

        public void setPaginationMode​(WDataTable.PaginationMode paginationMode)
        Deprecated.
        Sets the pagination mode. Mode.SERVER mapped to Mode.DYNAMIC to overcome accessibility problem.
        Parameters:
        paginationMode - The paginationMode to set.
      • getRowsPerPage

        public int getRowsPerPage()
        Deprecated.
        Returns:
        the number of rows to display per page.
      • setRowsPerPage

        public void setRowsPerPage​(int rowsPerPage)
        Deprecated.
        Sets the number of rows to display per page when pagination is enabled.
        Parameters:
        rowsPerPage - The rowsPerPage to set, greater than zero.
      • getSelectMode

        public WDataTable.SelectMode getSelectMode()
        Deprecated.
        Returns:
        the row selection mode..
      • setSelectMode

        public void setSelectMode​(WDataTable.SelectMode selectMode)
        Deprecated.
        Sets the row selection mode.
        Parameters:
        selectMode - The select mode to set.
      • getSelectGroup

        public String getSelectGroup()
        Deprecated.
        Returns:
        Returns the selectGroup.
      • setSelectGroup

        public void setSelectGroup​(String selectGroup)
        Deprecated.
        Parameters:
        selectGroup - The selectGroup to set.
      • getSortMode

        public WDataTable.SortMode getSortMode()
        Deprecated.
        Returns:
        Returns the sort mode.
      • setSortMode

        public void setSortMode​(WDataTable.SortMode sortMode)
        Deprecated.
        Sets the table sort mode. The data model controls which columns are sortable.
        Parameters:
        sortMode - The sort mode to set.
      • getType

        public WDataTable.Type getType()
        Deprecated.
        Returns:
        the table type.
      • setType

        public void setType​(WDataTable.Type type)
        Deprecated.
        Sets the table type.
        Parameters:
        type - the table type to set.
      • getSelectAllMode

        public WDataTable.SelectAllType getSelectAllMode()
        Deprecated.
        Indicates how the table row "select all" function should be displayed.
        Returns:
        Returns the select all mode.
      • setSelectAllMode

        public void setSelectAllMode​(WDataTable.SelectAllType selectAllMode)
        Deprecated.
        Sets how the table row "select all" function should be displayed.
        Parameters:
        selectAllMode - The select all mode to set.
      • getExpandMode

        public WDataTable.ExpandMode getExpandMode()
        Deprecated.
        Returns:
        the row expansion mode.
      • setExpandMode

        public void setExpandMode​(WDataTable.ExpandMode expandMode)
        Deprecated.
        Sets the row expansion mode. ExpandMode.SERVER mapped to ExpandMode.DYNAMIC to overcome accessibility problems.
        Parameters:
        expandMode - The expand mode to set.
      • isExpandAll

        public boolean isExpandAll()
        Deprecated.
        Indicates whether the "expand all" control should be available.
        Returns:
        true if the expand all control should be available, false if not.
      • setExpandAll

        public void setExpandAll​(boolean expandAll)
        Deprecated.
        Sets whether the "expand all" control should be available.
        Parameters:
        expandAll - true if the expand-all control should be available, false if not.
      • getCurrentPage

        public int getCurrentPage()
        Deprecated.
        Returns:
        the current page.
      • setCurrentPage

        public void setCurrentPage​(int currentPage)
        Deprecated.
        Parameters:
        currentPage - The currentPage to set.
      • setExpandedRows

        public void setExpandedRows​(List<Integer> expandedRows)
        Deprecated.
        Parameters:
        expandedRows - The expandedRows to set.
      • getExpandedRows

        public List<Integer> getExpandedRows()
        Deprecated.
        Returns:
        Returns the expandedRows.
      • setSelectedRows

        public void setSelectedRows​(List<Integer> selectedRows)
        Deprecated.
        Parameters:
        selectedRows - The selectedRows to set.
      • getSelectedRows

        public List<Integer> getSelectedRows()
        Deprecated.
        Returns:
        the list of selected row indices, will not be null.
      • setSort

        protected void setSort​(int index,
                               boolean ascending)
        Deprecated.
        For rendering purposes only - has no effect on model.
        Parameters:
        index - the sort column index, or -1 for no sort.
        ascending - true for ascending order, false for descending
      • isSorted

        public boolean isSorted()
        Deprecated.
        Returns:
        true if the table is currently sorted
      • getSortColumnIndex

        public int getSortColumnIndex()
        Deprecated.
        Returns:
        the index of the column the table is sorted by.
      • isSortAscending

        public boolean isSortAscending()
        Deprecated.
        Indicates whether the sort on this table is ascending. Note that a return value of false does not necessarily indicate a descending sort - see isSorted().
        Returns:
        true if the sort order is ascending, false for descending.
      • isSortable

        public boolean isSortable()
        Deprecated.
        Indicates whether the table supports sorting.
        Returns:
        true if the table and model both support sorting, false otherwise.
      • getActions

        public List<WButton> getActions()
        Deprecated.
        Retrieves the actions for the table.
        Returns:
        the list of table actions
      • addAction

        public void addAction​(WButton button)
        Deprecated.
        Adds a component to the set of table actions.
        Parameters:
        button - the button to add.
      • addActionConstraint

        public void addActionConstraint​(WButton button,
                                        WDataTable.ActionConstraint constraint)
        Deprecated.
        Adds a constraint to when the given action can be used.
        Parameters:
        button - the button which the constraint applies to.
        constraint - the constraint to add.
      • getActionConstraints

        public List<WDataTable.ActionConstraint> getActionConstraints​(WButton button)
        Deprecated.
        Retrieves the constraints for the given action.
        Parameters:
        button - the button to retrieve the constraints for.
        Returns:
        the constraints for the given action, or null if there are no constraints.
      • toggleSelection

        public void toggleSelection​(boolean selected)
        Deprecated.
        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.
      • handleRequest

        public void handleRequest​(Request request)
        Deprecated.
        Override handleRequest to add table-specific functionality such as pagination and row selection.
        Specified by:
        handleRequest in interface WComponent
        Overrides:
        handleRequest in class AbstractWComponent
        Parameters:
        request - the request being responded to.
      • isPresent

        protected boolean isPresent​(Request request)
        Deprecated.
        Indicates whether this table was present in the request.
        Parameters:
        request - the request being responded to.
        Returns:
        true if this table was present in the request, false if not.
      • sort

        public void sort​(int sortCol,
                         boolean sortAsc)
        Deprecated.
        Sort the table data by the specified column.
        Parameters:
        sortCol - the column to sort
        sortAsc - true if sort ascending, otherwise sort descending
      • setNamingContext

        public void setNamingContext​(boolean context)
        Deprecated.
        A naming context is only considered active if it has been set active via setNamingContext(boolean) and also has an id name set via AbstractWComponent.setIdName(String).
        Parameters:
        context - set true if this is a naming context.
      • isNamingContext

        public boolean isNamingContext()
        Deprecated.
        A naming context is only considered active if an Id name has been set.
        Specified by:
        isNamingContext in interface NamingContextable
        Returns:
        true if active naming context.
      • getNamingContextId

        public String getNamingContextId()
        Deprecated.
        Allow components that implement NamingContextable to selectively disable prepending their ID to their descendent's IDs by breaking the prepending logic into a seperately callable method.

        See WComponent.getId() for usage.

        By default, this method will call through to WComponent.getId() and return the result.

        Specified by:
        getNamingContextId in interface NamingContextable
        Returns:
        by default, return getId().
      • getChildCount

        public int getChildCount()
        Deprecated.
        Specified by:
        getChildCount in interface Container
        Returns:
        the number of child components currently contained within this component.
      • getChildAt

        public WComponent getChildAt​(int index)
        Deprecated.
        Retrieves a child component by its index.
        Specified by:
        getChildAt in interface Container
        Parameters:
        index - the index of the child component to be retrieved.
        Returns:
        the child component at the given index.
      • getIndexOfChild

        public int getIndexOfChild​(WComponent childComponent)
        Deprecated.
        Retrieves the index of the given child.
        Specified by:
        getIndexOfChild in interface Container
        Parameters:
        childComponent - the child component to retrieve the index for.
        Returns:
        the index of the given child component, or -1 if the component is not a child of this component.
      • getChildren

        public List<WComponent> getChildren()
        Deprecated.
        Description copied from interface: Container
        Retrieves a list of this Container's.
        Specified by:
        getChildren in interface Container
        Returns:
        an immutable list of this Container.
      • toString

        public String toString()
        Deprecated.
        Description copied from class: AbstractWComponent
        Creates a String representation of this component; usually for debugging purposes.
        Overrides:
        toString in class AbstractWComponent
        Returns:
        a String representation of this component, for debugging purposes.
      • getComponentModel

        protected WDataTable.TableModel getComponentModel()
        Deprecated.
        Returns the effective component model for this component. Subclass may override this method to narrow the return type to their specific model type.
        Overrides:
        getComponentModel in class WBeanComponent
        Returns:
        the effective component model
      • getOrCreateComponentModel

        protected WDataTable.TableModel getOrCreateComponentModel()
        Deprecated.
        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 WBeanComponent
        Returns:
        the model for this component