public class EditablePropertyColumn<M,I,P,S> extends PropertyColumn<M,I,P,S>
TextFieldPanel
as cell component when the item is selected.Constructor and Description |
---|
EditablePropertyColumn(org.apache.wicket.model.IModel<String> headerModel,
String propertyExpression)
Constructor.
|
EditablePropertyColumn(org.apache.wicket.model.IModel<String> headerModel,
String propertyExpression,
S sortProperty)
Constructor.
|
EditablePropertyColumn(String columnId,
org.apache.wicket.model.IModel<String> headerModel,
String propertyExpression)
Constructor.
|
EditablePropertyColumn(String columnId,
org.apache.wicket.model.IModel<String> headerModel,
String propertyExpression,
S sortProperty)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addValidators(org.apache.wicket.markup.html.form.FormComponent<P> component) |
boolean |
cellClicked(org.apache.wicket.model.IModel<I> rowModel)
Allows to override default behavior when a row is clicked.
|
String |
getCellCssClass(org.apache.wicket.model.IModel<I> rowModel,
int rowNum)
Returns the cell specified by rowModel.
|
protected org.apache.wicket.model.IModel<P> |
getFieldModel(org.apache.wicket.model.IModel<I> rowModel) |
protected boolean |
isClickToEdit() |
boolean |
isLightWeight(org.apache.wicket.model.IModel<I> rowModel)
Returns whether this column is uses a component for cell in given row (not lightweight) or an
IRenderable implementation. |
org.apache.wicket.Component |
newCell(org.apache.wicket.markup.html.WebMarkupContainer parent,
String componentId,
org.apache.wicket.model.IModel<I> rowModel)
Creates a new cell component.
|
protected EditableCellPanel<M,I,P,S> |
newCellPanel(String componentId,
org.apache.wicket.model.IModel<I> rowModel,
org.apache.wicket.model.IModel<P> cellModel) |
convertToString, getConverter, getLocale, getModelObject, getProperty, getPropertyExpression, isEscapeMarkup, newCell, setEscapeMarkup
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
public EditablePropertyColumn(String columnId, org.apache.wicket.model.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 sortedpublic EditablePropertyColumn(String columnId, org.apache.wicket.model.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 objectpublic EditablePropertyColumn(org.apache.wicket.model.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 sortedpublic EditablePropertyColumn(org.apache.wicket.model.IModel<String> headerModel, String propertyExpression)
headerModel
- model for column headerpropertyExpression
- property expression used to get the displayed value for row objectpublic boolean isLightWeight(org.apache.wicket.model.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 footprintisLightWeight
in interface IGridColumn<M,I,S>
isLightWeight
in class AbstractLightWeightColumn<M,I,S>
rowModel
- model for given rowtrue
if the cell is lightweight, false
otherwiseprotected org.apache.wicket.model.IModel<P> getFieldModel(org.apache.wicket.model.IModel<I> rowModel)
protected EditableCellPanel<M,I,P,S> newCellPanel(String componentId, org.apache.wicket.model.IModel<I> rowModel, org.apache.wicket.model.IModel<P> cellModel)
public org.apache.wicket.Component newCell(org.apache.wicket.markup.html.WebMarkupContainer parent, String componentId, org.apache.wicket.model.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 rowprotected void addValidators(org.apache.wicket.markup.html.form.FormComponent<P> component)
public String getCellCssClass(org.apache.wicket.model.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
null
public boolean cellClicked(org.apache.wicket.model.IModel<I> rowModel)
AbstractColumn
true
the default
behavior will be suppressed.cellClicked
in interface IGridColumn<M,I,S>
cellClicked
in class AbstractColumn<M,I,S>
rowModel
- Model for clicked rowtrue
if the default behavior when row is clicked should be supressed,
false
otherwise.protected boolean isClickToEdit()
Copyright © 2015. All rights reserved.