com.sap.ui.table.client
Class DataTable

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.table.client.DataTable

public class DataTable
extends com.sap.ui.core.client.Control

The class DataTable is the GWT wrapper for the Phoenix control: sap.ui.table.DataTable.

The DataTable Control.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.table.DataTable)

Constructor Summary
protected DataTable()
          constructs the class DataTable
hidden due to JavaScriptObject restriction
 
Method Summary
 DataTable addColumn(Column column)
          Appends a column to the aggregation columns.
 void addSelectedIndex(int index)
          Adds the given index to current selection.
 void addSelectedIndices(Integer[] indices)
          Adds the given indices to selection.
 DataTable attachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener fired when a column of the table has been selected
Event Parameters: {sap.ui.table/Column} column reference to the clicked column
 DataTable attachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener fired when a row of the table has been selected
Event Parameters: {sap.ui.core/int} rowIndex index of the selected row {sap.ui.core/object} rowContext binding context of the selected row
 void bindRows(String path, Object sorter, Object[] filters)
          Binds the rows of the DataTable against the given binding path.
 void clearSelection()
          Removes complete selection.
static DataTable create()
          creates a new instance of the class DataTable
static DataTable create(String idOrConfig)
          creates a new instance of the class DataTable
static DataTable create(String id, String config)
          creates a new instance of the class DataTable
 DataTable destroyColumns()
          Destroys all the columns in the Columns-aggregation.
 DataTable destroyToolbar()
          Destroys the toolbar in the Toolbar-aggregation.
 DataTable detachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener fired when a column of the table has been selected
 DataTable detachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener fired when a row of the table has been selected
 com.sap.ui.core.client.js.JsArray<Column> getColumns()
          Getter for aggregation columns Columns of the Table
 Object getContextByIndex(int index)
          Returns the context of a row by its index.
 int getExpandedVisibleRowCount()
          Getter for property expandedVisibleRowCount Count of visible rows when expanded
 int getFirstVisibleRow()
          Getter for property firstVisibleRow First visible row
 int getSelectedIndex()
          Zero-based index of selected item.
 Integer[] getSelectedIndices()
          Zero-based indices of selected items, wrapped in an array.
 SelectionMode getSelectionMode()
          Getter for property selectionMode Selection mode of the Table
 String getTitle()
          Getter for property title Title of the Table (if not set/empty) the title will be hidden)
 com.sap.ui.commons.client.Toolbar getToolbar()
          Getter for aggregation toolbar Toolbar of the Table (if not set it will be hidden)
 int getVisibleRowCount()
          Getter for property visibleRowCount Count of visible rows
 String getWidth()
          Getter for property width Width of the Table
 int indexOfColumn(Column column)
          Checks for the provided com.sap.ui.table.client.Column in the columns-aggregation and returns its index if found or -1 otherwise.
 DataTable insertColumn(Column column, int index)
          Inserts some column into the aggregation named columns.
 boolean isEditable()
          Getter for property editable Flag whether the controls of the Table are editable or not
 boolean isExpanded()
          Getter for property expanded Flag whether the Table is expanded or not
 boolean isHierarchical()
          Getter for property hierarchical Flag, whether the table displays its content hierarchical or not **experimental**!!
 boolean isIndexSelected(int index)
          Returns whether the given index is selected.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<Column>> removeAllColumns()
          Removes all the items in the columns-aggregation.
 com.sap.ui.core.client.js.JsArray<Column> removeColumn(int index)
          Removes a column from the aggregation named columns.
 void removeSelectedIndex(int index)
          Removes the given index from this selection.
 DataTable setEditable(boolean value)
          Setter for property editable
Default value is: false
 DataTable setExpanded(boolean value)
          Setter for property expanded
Default value is: false
 DataTable setExpandedVisibleRowCount(int value)
          Setter for property expandedVisibleRowCount
 DataTable setFirstVisibleRow(int value)
          Setter for property firstVisibleRow
Default value is: 0
 DataTable setHierarchical(boolean value)
          Setter for property hierarchical
Default value is: false
 void setSelectedIndex(int index)
          Sets the zero-based index of the currently selected item.
 void setSelectedIndices(Integer[] indices)
          Zero-based indices of selected items, wrapped in an array.
 DataTable setSelectionMode(SelectionMode value)
          Setter for property selectionMode
Default value is: Multi
 DataTable setTitle(String value)
          Setter for property title
 DataTable setToolbar(com.sap.ui.commons.client.Toolbar toolbar)
          Setter for the aggregated toolbar.
 DataTable setVisibleRowCount(int value)
          Setter for property visibleRowCount
Default value is: 10
 DataTable setWidth(String value)
          Setter for property width
Default value is: auto
 void unbindRows()
          Unbinds the rows of the DataTable.
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataTable

protected DataTable()
constructs the class DataTable
hidden due to JavaScriptObject restriction

Method Detail

create

public static DataTable create()
creates a new instance of the class DataTable


create

public static DataTable create(String idOrConfig)
creates a new instance of the class DataTable

Parameters:
id - id of the DataTable or configuration JSON string

create

public static DataTable create(String id,
                               String config)
creates a new instance of the class DataTable

Parameters:
id - id of the DataTable
config - configuration JSON string

getTitle

public final String getTitle()
Getter for property title Title of the Table (if not set/empty) the title will be hidden)

Returns:
the value of property title

setTitle

public final DataTable setTitle(String value)
Setter for property title

Parameters:
value - String
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width Width of the Table

Returns:
the value of property width

setWidth

public final DataTable setWidth(String value)
Setter for property width
Default value is: auto

Parameters:
value - String
Returns:
this to allow method chaining

getVisibleRowCount

public final int getVisibleRowCount()
Getter for property visibleRowCount Count of visible rows

Returns:
the value of property visibleRowCount

setVisibleRowCount

public final DataTable setVisibleRowCount(int value)
Setter for property visibleRowCount
Default value is: 10

Parameters:
value - int
Returns:
this to allow method chaining

getExpandedVisibleRowCount

public final int getExpandedVisibleRowCount()
Getter for property expandedVisibleRowCount Count of visible rows when expanded

Returns:
the value of property expandedVisibleRowCount

setExpandedVisibleRowCount

public final DataTable setExpandedVisibleRowCount(int value)
Setter for property expandedVisibleRowCount

Parameters:
value - int
Returns:
this to allow method chaining

getFirstVisibleRow

public final int getFirstVisibleRow()
Getter for property firstVisibleRow First visible row

Returns:
the value of property firstVisibleRow

setFirstVisibleRow

public final DataTable setFirstVisibleRow(int value)
Setter for property firstVisibleRow
Default value is: 0

Parameters:
value - int
Returns:
this to allow method chaining

getSelectionMode

public final SelectionMode getSelectionMode()
Getter for property selectionMode Selection mode of the Table

Returns:
the value of property selectionMode

setSelectionMode

public final DataTable setSelectionMode(SelectionMode value)
Setter for property selectionMode
Default value is: Multi

Parameters:
value - com.sap.ui.table.client.SelectionMode
Returns:
this to allow method chaining

isEditable

public final boolean isEditable()
Getter for property editable Flag whether the controls of the Table are editable or not

Returns:
the value of property editable

setEditable

public final DataTable setEditable(boolean value)
Setter for property editable
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

isExpanded

public final boolean isExpanded()
Getter for property expanded Flag whether the Table is expanded or not

Returns:
the value of property expanded

setExpanded

public final DataTable setExpanded(boolean value)
Setter for property expanded
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

isHierarchical

public final boolean isHierarchical()
Getter for property hierarchical Flag, whether the table displays its content hierarchical or not **experimental**!!

Returns:
the value of property hierarchical

setHierarchical

public final DataTable setHierarchical(boolean value)
Setter for property hierarchical
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

getColumns

public final com.sap.ui.core.client.js.JsArray<Column> getColumns()
Getter for aggregation columns Columns of the Table

Returns:
com.sap.ui.table.client.Column[]

insertColumn

public final DataTable insertColumn(Column column,
                                    int index)
Inserts some column into the aggregation named columns.

Parameters:
column - the column to insert
index - int the 0-based index the column should be inserted at.
Returns:
this to allow method chaining

addColumn

public final DataTable addColumn(Column column)
Appends a column to the aggregation columns.

Parameters:
column - com.sap.ui.table.client.Column the column to add
Returns:
this to allow method chaining

removeColumn

public final com.sap.ui.core.client.js.JsArray<Column> removeColumn(int index)
Removes a column from the aggregation named columns.

Parameters:
index - int the position of the column to remove.
Returns:
reference to this instance

removeAllColumns

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<Column>> removeAllColumns()
Removes all the items in the columns-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfColumn

public final int indexOfColumn(Column column)
Checks for the provided com.sap.ui.table.client.Column in the columns-aggregation and returns its index if found or -1 otherwise.

Parameters:
column - the column whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyColumns

public final DataTable destroyColumns()
Destroys all the columns in the Columns-aggregation.

Returns:
this to allow method chaining

getToolbar

public final com.sap.ui.commons.client.Toolbar getToolbar()
Getter for aggregation toolbar Toolbar of the Table (if not set it will be hidden)

Returns:
com.sap.ui.commons.client.Toolbar

setToolbar

public final DataTable setToolbar(com.sap.ui.commons.client.Toolbar toolbar)
Setter for the aggregated toolbar.

Parameters:
otoolbar - {com.sap.ui.commons.client.Toolbar}
Returns:
this to allow method chaining

destroyToolbar

public final DataTable destroyToolbar()
Destroys the toolbar in the Toolbar-aggregation.

Returns:
this to allow method chaining

attachRowSelectEvent

public final DataTable attachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener fired when a row of the table has been selected
Event Parameters:
{sap.ui.core/int} rowIndex index of the selected row
{sap.ui.core/object} rowContext binding context of the selected row

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachRowSelectEvent

public final DataTable detachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener fired when a row of the table has been selected

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

attachColumnSelectEvent

public final DataTable attachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener fired when a column of the table has been selected
Event Parameters:
{sap.ui.table/Column} column reference to the clicked column

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachColumnSelectEvent

public final DataTable detachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener fired when a column of the table has been selected

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

bindRows

public final void bindRows(String path,
                           Object sorter,
                           Object[] filters)
Binds the rows of the DataTable against the given binding path.

Parameters:
path - Binding path for the rows of the DataTable.
sorter - Initial sorting property (defined by sap.ui.model/Sorter).
filters - Predefined filter for the DataTable (defined by sap.ui.model/Filter).

unbindRows

public final void unbindRows()
Unbinds the rows of the DataTable.


getSelectedIndex

public final int getSelectedIndex()
Zero-based index of selected item. Index value for no selection is -1. When multi-selection is enabled and multiple items are selected, the method returns the first selected item.


setSelectedIndex

public final void setSelectedIndex(int index)
Sets the zero-based index of the currently selected item. This method removes any previous selections. When the given index is invalid, the call is ignored.

Parameters:
index - Index to be selected.

addSelectedIndex

public final void addSelectedIndex(int index)
Adds the given index to current selection. When multi-selection is disabled, this replaces the current selection. When the given index is invalid, the call is ignored.

Parameters:
index - Index to add to selection.

removeSelectedIndex

public final void removeSelectedIndex(int index)
Removes the given index from this selection. When the index is invalid or not selected, the call is ignored.

Parameters:
index - Index that shall be removed from selection.

getSelectedIndices

public final Integer[] getSelectedIndices()
Zero-based indices of selected items, wrapped in an array. An empty array means "no selection".


setSelectedIndices

public final void setSelectedIndices(Integer[] indices)
Zero-based indices of selected items, wrapped in an array. An empty array means "no selection". When multi-selection is disabled and multiple items are given, the selection is set to the index of the first valid index in the given array. Any invalid indices are ignored.

Parameters:
indices - Indices of the items to be selected.

addSelectedIndices

public final void addSelectedIndices(Integer[] indices)
Adds the given indices to selection. Any invalid indices are ignored.

Parameters:
indices - Indices of the items that shall additionally be selected.

isIndexSelected

public final boolean isIndexSelected(int index)
Returns whether the given index is selected.

Parameters:
index - Index which is checked for selection state.

clearSelection

public final void clearSelection()
Removes complete selection.


getContextByIndex

public final Object getContextByIndex(int index)
Returns the context of a row by its index.

Parameters:
index - Index of the row to return the context from.


Copyright © 2011 SAP. All Rights Reserved.