|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.inmethod.grid.column.AbstractColumn<M,I,S>
com.inmethod.grid.column.AbstractLightWeightColumn<M,I,S>
com.inmethod.grid.column.PropertyColumn<M,I,P,S>
com.inmethod.grid.column.editable.EditablePropertyColumn<M,I,P,S>
public class EditablePropertyColumn<M,I,P,S>
Property column that uses a TextFieldPanel as cell component when the item is selected.
| Constructor Summary | |
|---|---|
EditablePropertyColumn(IModel<String> headerModel,
String propertyExpression)
Constructor. |
|
EditablePropertyColumn(IModel<String> headerModel,
String propertyExpression,
S sortProperty)
Constructor. |
|
EditablePropertyColumn(String columnId,
IModel<String> headerModel,
String propertyExpression)
Constructor. |
|
EditablePropertyColumn(String columnId,
IModel<String> headerModel,
String propertyExpression,
S sortProperty)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addValidators(FormComponent<P> component)
|
boolean |
cellClicked(IModel<I> rowModel)
Allows to override default behavior when a row is clicked. |
String |
getCellCssClass(IModel<I> rowModel,
int rowNum)
Returns the cell specified by rowModel. |
protected IModel<P> |
getFieldModel(IModel<I> rowModel)
|
protected boolean |
isClickToEdit()
|
boolean |
isLightWeight(IModel<I> rowModel)
Returns whether this column is uses a component for cell in given row (not lightweight) or an IRenderable implementation. |
Component |
newCell(WebMarkupContainer parent,
String componentId,
IModel<I> rowModel)
Creates a new cell component. |
protected EditableCellPanel<M,I,P,S> |
newCellPanel(String componentId,
IModel<I> rowModel,
IModel<P> cellModel)
|
| Methods inherited from class com.inmethod.grid.column.PropertyColumn |
|---|
convertToString, 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 |
|---|
public EditablePropertyColumn(String columnId,
IModel<String> headerModel,
String propertyExpression,
S sortProperty)
columnId - column identified (must be unique within the grid)headerModel - model for column headerpropertyExpression - property expression used to get the displayed value for row objectsortProperty - optional string that will be returned by ISortState to indicate that the
column is being sorted
public EditablePropertyColumn(String columnId,
IModel<String> headerModel,
String propertyExpression)
columnId - column identified (must be unique within the grid)headerModel - model for column headerpropertyExpression - property expression used to get the displayed value for row object
public EditablePropertyColumn(IModel<String> headerModel,
String propertyExpression,
S sortProperty)
headerModel - model for column headerpropertyExpression - property expression used to get the displayed value for row objectsortProperty - optional string that will be returned by ISortState to indicate that the
column is being sorted
public EditablePropertyColumn(IModel<String> headerModel,
String propertyExpression)
headerModel - model for column headerpropertyExpression - property expression used to get the displayed value for row object| Method Detail |
|---|
public boolean isLightWeight(IModel<I> rowModel)
IRenderable implementation. Generally, if the cell is non-interactive (label only),
it's better to use an IRenderable implementation, as it has zero memory footprint
isLightWeight in interface IGridColumn<M,I,S>isLightWeight in class AbstractLightWeightColumn<M,I,S>rowModel - model for given row
true if the cell is lightweight, false otherwiseprotected IModel<P> getFieldModel(IModel<I> rowModel)
protected EditableCellPanel<M,I,P,S> newCellPanel(String componentId,
IModel<I> rowModel,
IModel<P> cellModel)
public Component newCell(WebMarkupContainer parent,
String componentId,
IModel<I> rowModel)
IGridColumn.isLightWeight(IModel) returns false ).
newCell in interface IGridColumn<M,I,S>newCell in class AbstractLightWeightColumn<M,I,S>parent - Parent component. This is passed in only for convenience, the method
implementation is not supposed to add the newly created component to the
parent.componentId - required id of newly created componentsrowModel - model for given row
protected void addValidators(FormComponent<P> component)
public String getCellCssClass(IModel<I> rowModel,
int rowNum)
getCellCssClass in interface IGridColumn<M,I,S>getCellCssClass in class AbstractColumn<M,I,S>rowModel - model for given rowrowNum - index of row for DataGrid, -1 for TreeGrid
nullpublic boolean cellClicked(IModel<I> rowModel)
AbstractColumntrue the default
behavior will be suppressed.
cellClicked in interface IGridColumn<M,I,S>cellClicked in class AbstractColumn<M,I,S>rowModel - Model for clicked row
true if the default behavior when row is clicked should be supressed,
false otherwise.protected boolean isClickToEdit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||