net.sf.echobinding.table
Class SelectableBoundTable<T>

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.app.Table
          extended by net.sf.echobinding.table.BoundTable<T>
              extended by net.sf.echobinding.table.SelectableTable<T>
                  extended by net.sf.echobinding.table.SelectableBoundTable<T>
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, TableSelectionListener<T>, nextapp.echo2.app.event.ActionListener, nextapp.echo2.app.RenderIdSupport

public abstract class SelectableBoundTable<T>
extends SelectableTable<T>

A data bound table with selectable rows. On selection, the abstract method showEditForm() is called, which provides a BindingContext for the selected row. Use this binding context to arrange your data bound widgets within a form. Changes made through this form will be reflected by the table.

See Also:
BoundTable, Serialized Form

Field Summary
static java.lang.String ACTION_SHOW_DETAIL
           
 
Fields inherited from class net.sf.echobinding.table.BoundTable
_ctx, _list
 
Fields inherited from class nextapp.echo2.app.Table
ACTION_LISTENERS_CHANGED_PROPERTY, AUTO_CREATE_COLUMNS_FROM_MODEL_CHANGED_PROPERTY, COLUMN_MODEL_CHANGED_PROPERTY, DEFAULT_HEADER_RENDERER_CHANGED_PROPERTY, DEFAULT_RENDERER_CHANGED_PROPERTY, DEFAULT_TABLE_CELL_RENDERER, HEADER_ROW, HEADER_VISIBLE_CHANGED_PROPERTY, INPUT_ACTION, MODEL_CHANGED_PROPERTY, PROPERTY_ACTION_COMMAND, PROPERTY_BORDER, PROPERTY_INSETS, PROPERTY_ROLLOVER_BACKGROUND, PROPERTY_ROLLOVER_BACKGROUND_IMAGE, PROPERTY_ROLLOVER_ENABLED, PROPERTY_ROLLOVER_FONT, PROPERTY_ROLLOVER_FOREGROUND, PROPERTY_SELECTION_BACKGROUND, PROPERTY_SELECTION_BACKGROUND_IMAGE, PROPERTY_SELECTION_ENABLED, PROPERTY_SELECTION_FONT, PROPERTY_SELECTION_FOREGROUND, PROPERTY_WIDTH, SELECTION_CHANGED_PROPERTY, SELECTION_MODEL_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
SelectableBoundTable(java.util.List<T> list, BindingContext ctx)
          Creates a new SelectableBoundTable from a list and a binding context.
SelectableBoundTable(java.lang.String listBindingId, BindingContext ctx)
          Creates a new SelectableBoundTable using a bounded list and a binding context.
 
Method Summary
protected  void initialize()
          Initializes the table.
abstract  void onSelect(BindingContext ctx)
          Defines what will happen on row selection..
 void rowIndexChanged(int rowIndex)
           
 
Methods inherited from class net.sf.echobinding.table.SelectableTable
addRowSelectionListener, getSelectedItem, setSelectedItem
 
Methods inherited from class net.sf.echobinding.table.BoundTable
actionPerformed, addColumn, addColumn, createTableData, createTableHeaderData, createTableModel, getActionListener, getAdapterId, getBindingContext, getColumnAdapters, getContext, getDetailHandler, getHeaderBackground, getItem, getList, getTableCellRenderer, getTableHeaderRenderer, init, propertyChange, removeColumn, setActionListener, setColumnAdapters, setContext, setDetailHandler, setHeaderBackground, setList, showDetails
 
Methods inherited from class nextapp.echo2.app.Table
addActionListener, createDefaultColumnsFromModel, doRender, getActionCommand, getBorder, getCellComponent, getColumnModel, getDefaultHeaderRenderer, getDefaultRenderer, getInsets, getModel, getRolloverBackground, getRolloverBackgroundImage, getRolloverFont, getRolloverForeground, getSelectionBackground, getSelectionBackgroundImage, getSelectionFont, getSelectionForeground, getSelectionModel, getWidth, hasActionListeners, invalidate, isAutoCreateColumnsFromModel, isHeaderVisible, isRolloverEnabled, isSelectionEnabled, processInput, removeActionListener, setActionCommand, setAutoCreateColumnsFromModel, setBorder, setColumnModel, setDefaultHeaderRenderer, setDefaultRenderer, setHeaderVisible, setInsets, setModel, setRolloverBackground, setRolloverBackgroundImage, setRolloverEnabled, setRolloverFont, setRolloverForeground, setSelectionBackground, setSelectionBackgroundImage, setSelectionEnabled, setSelectionFont, setSelectionForeground, setSelectionModel, setWidth, validate
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_SHOW_DETAIL

public static final java.lang.String ACTION_SHOW_DETAIL
See Also:
Constant Field Values
Constructor Detail

SelectableBoundTable

public SelectableBoundTable(java.util.List<T> list,
                            BindingContext ctx)
Creates a new SelectableBoundTable from a list and a binding context.

Parameters:
list -
ctx -

SelectableBoundTable

public SelectableBoundTable(java.lang.String listBindingId,
                            BindingContext ctx)
Creates a new SelectableBoundTable using a bounded list and a binding context.

Parameters:
listBindingId -
ctx -
Method Detail

onSelect

public abstract void onSelect(BindingContext ctx)
Defines what will happen on row selection..

Parameters:
ctx -

rowIndexChanged

public void rowIndexChanged(int rowIndex)
Specified by:
rowIndexChanged in interface TableSelectionListener<T>
Overrides:
rowIndexChanged in class SelectableTable<T>

initialize

protected void initialize()
Description copied from class: BoundTable
Initializes the table. Extracts the table headers from the binding context and creates the table data.

Overrides:
initialize in class SelectableTable<T>


Copyright © 2007. All Rights Reserved.