com.inmethod.grid.column.editable
Class DropDownChoiceColumn<M,I,T>

java.lang.Object
  extended by com.inmethod.grid.column.AbstractColumn<M,I>
      extended by com.inmethod.grid.column.AbstractLightWeightColumn<M,I>
          extended by com.inmethod.grid.column.PropertyColumn<M,I,P>
              extended by com.inmethod.grid.column.editable.EditablePropertyColumn<M,I,T>
                  extended by com.inmethod.grid.column.editable.DropDownChoiceColumn<M,I,T>
All Implemented Interfaces:
IGridColumn<M,I>, Serializable, IClusterable, IDetachable

public class DropDownChoiceColumn<M,I,T>
extends EditablePropertyColumn<M,I,T>

Property column that uses a DropDownChoicePanel as cell component when the item is selected.

Author:
Tom Burton
See Also:
Serialized Form

Constructor Summary
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, IModel<? extends List<? extends T>> choices)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, List<T> choices)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, List<T> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, String sortProperty)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, String sortProperty, IModel<? extends List<? extends T>> choices)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, String sortProperty, IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, String sortProperty, List<T> choices)
          Constructor.
DropDownChoiceColumn(IModel<String> headerModel, String propertyExpression, String sortProperty, List<T> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, IModel<? extends List<? extends T>> choices)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, List<T> choices)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, List<T> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, String sortProperty)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, String sortProperty, IModel<? extends List<? extends T>> choices)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, String sortProperty, IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> renderer)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, String sortProperty, List<T> choices)
          Constructor.
DropDownChoiceColumn(String columnId, IModel<String> headerModel, String propertyExpression, String sortProperty, List<T> choices, IChoiceRenderer<T> renderer)
          Constructor.
 
Method Summary
protected
<C> CharSequence
convertToString(C obj)
          
protected  EditableCellPanel newCellPanel(String componentId, IModel<I> rowModel, IModel<T> cellModel)
          creates the actual editable version of the cell
 
Methods inherited from class com.inmethod.grid.column.editable.EditablePropertyColumn
addValidators, cellClicked, getCellCssClass, getFieldModel, isClickToEdit, isLightWeight, newCell
 
Methods inherited from class com.inmethod.grid.column.PropertyColumn
getConverter, getLocale, getModelObject, getProperty, getPropertyExpression, isEscapeMarkup, newCell, setEscapeMarkup
 
Methods inherited from class com.inmethod.grid.column.AbstractColumn
detach, getColSpan, getGrid, getHeaderCssClass, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, getSortProperty, getWrapText, isReorderable, isResizable, newHeader, setGrid, setHeaderTooltipModel, setInitialSize, setMaxSize, setMinSize, setReorderable, setResizable, setSizeUnit, setWrapText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            IModel<? extends List<? extends T>> choices)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            IModel<? extends List<? extends T>> choices)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            IModel<? extends List<? extends T>> choices)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            IModel<? extends List<? extends T>> choices)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            IModel<? extends List<? extends T>> choices,
                            IChoiceRenderer<T> renderer)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The rendering engine

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            IModel<? extends List<? extends T>> choices,
                            IChoiceRenderer<T> renderer)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The rendering engine

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            IModel<? extends List<? extends T>> choices,
                            IChoiceRenderer<T> renderer)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The rendering engine

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            IModel<? extends List<? extends T>> choices,
                            IChoiceRenderer<T> renderer)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The rendering engine

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            List<T> choices)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            List<T> choices)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            List<T> choices)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            List<T> choices)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            List<T> choices,
                            IChoiceRenderer<T> renderer)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The renderer to use for displaying the data

DropDownChoiceColumn

public DropDownChoiceColumn(String columnId,
                            IModel<String> headerModel,
                            String propertyExpression,
                            List<T> choices,
                            IChoiceRenderer<T> renderer)
Constructor.

Parameters:
columnId - column identified (must be unique within the grid)
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The rendering engine

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            String sortProperty,
                            List<T> choices,
                            IChoiceRenderer<T> renderer)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The renderer to use for displaying the data

DropDownChoiceColumn

public DropDownChoiceColumn(IModel<String> headerModel,
                            String propertyExpression,
                            List<T> choices,
                            IChoiceRenderer<T> renderer)
Constructor. The column id is omitted in this constructor, because the property expression is used as column id.

Parameters:
headerModel - model for column header
propertyExpression - property expression used to get the displayed value for row object
choices - The collection of choices in the drop down when the cell becomes editable
renderer - The rendering engine
Method Detail

newCellPanel

protected EditableCellPanel newCellPanel(String componentId,
                                         IModel<I> rowModel,
                                         IModel<T> cellModel)
creates the actual editable version of the cell

Overrides:
newCellPanel in class EditablePropertyColumn<M,I,T>
Parameters:
componentId - The non-null id of this component
rowModel - model for given row
cellModel - model for given cell
Returns:
EditableCellPanel containing a FormComponent

convertToString

protected <C> CharSequence convertToString(C obj)

Overrides:
convertToString in class PropertyColumn<M,I,T>


Copyright © 2007-2012 inMethod s.r.o.. All Rights Reserved.