com.inmethod.grid.column.editable
Class SubmitCancelColumn<M,I,S>
java.lang.Object
com.inmethod.grid.column.AbstractColumn<M,I,S>
com.inmethod.grid.column.editable.SubmitCancelColumn<M,I,S>
- All Implemented Interfaces:
- IGridColumn<M,I,S>, Serializable, IDetachable, IClusterable
- Direct Known Subclasses:
- AddDeleteColumn
public class SubmitCancelColumn<M,I,S>
- extends AbstractColumn<M,I,S>
- See Also:
- Serialized Form
| Methods inherited from class com.inmethod.grid.column.AbstractColumn |
detach, getColSpan, getGrid, getHeaderCssClass, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, getSortProperty, getWrapText, isLightWeight, isReorderable, isResizable, newCell, 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 |
SubmitCancelColumn
public SubmitCancelColumn(String columnId,
IModel<String> headerModel)
newCell
public Component newCell(WebMarkupContainer parent,
String componentId,
IModel<I> rowModel)
- Description copied from class:
AbstractColumn
- Creates a new cell component. This method is called for rows that are not lightweight (
IGridColumn.isLightWeight(IModel) returns false ).
- Specified by:
newCell in interface IGridColumn<M,I,S>- Specified by:
newCell in class AbstractColumn<M,I,S>
- Parameters:
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
- Returns:
- new cell component
getSubmitIcon
protected Icon getSubmitIcon()
getCancelIcon
protected Icon getCancelIcon()
onCancel
protected void onCancel(AjaxRequestTarget target,
IModel<I> rowModel,
WebMarkupContainer rowComponent)
onError
protected void onError(AjaxRequestTarget target,
IModel<I> rowModel,
WebMarkupContainer rowComponent)
onSubmitted
protected void onSubmitted(AjaxRequestTarget target,
IModel<I> rowModel,
WebMarkupContainer rowComponent)
cellClicked
public boolean cellClicked(IModel<I> rowModel)
- Description copied from class:
AbstractColumn
- Allows to override default behavior when a row is clicked. Depending on grid settings the
default behavior can select the item. If this method returns
true the default
behavior will be suppressed.
- Specified by:
cellClicked in interface IGridColumn<M,I,S>- Overrides:
cellClicked in class AbstractColumn<M,I,S>
- Parameters:
rowModel - Model for clicked row
- Returns:
true if the default behavior when row is clicked should be supressed,
false otherwise.
getCellCssClass
public String getCellCssClass(IModel<I> rowModel,
int rowNum)
- Description copied from class:
AbstractColumn
- Returns the cell specified by rowModel. The class is applied to the appropriate <td>
element in the grid.
- Specified by:
getCellCssClass in interface IGridColumn<M,I,S>- Overrides:
getCellCssClass in class AbstractColumn<M,I,S>
- Parameters:
rowModel - model for given rowrowNum - index of row for DataGrid, -1 for TreeGrid
- Returns:
- cell style class or
null
Copyright © 2007–2014 inMethod s.r.o.. All rights reserved.