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
-
-
Constructor Summary
Constructors Constructor Description SubmitCancelColumn(String columnId, IModel<String> headerModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancellClicked(IModel<I> rowModel)Allows to override default behavior when a row is clicked.protected IcongetCancelIcon()StringgetCellCssClass(IModel<I> rowModel, int rowNum)Returns the cell specified by rowModel.protected IcongetSubmitIcon()ComponentnewCell(WebMarkupContainer parent, String componentId, IModel<I> rowModel)Creates a new cell component.protected voidonCancel(AjaxRequestTarget target, IModel<I> rowModel, WebMarkupContainer rowComponent)protected voidonError(AjaxRequestTarget target, IModel<I> rowModel, WebMarkupContainer rowComponent)protected voidonSubmitted(AjaxRequestTarget target, IModel<I> rowModel, WebMarkupContainer rowComponent)-
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
-
-
-
-
Method Detail
-
newCell
public Component newCell(WebMarkupContainer parent, String componentId, IModel<I> rowModel)
Description copied from class:AbstractColumnCreates a new cell component. This method is called for rows that are not lightweight (IGridColumn.isLightWeight(IModel)returns false ).- Specified by:
newCellin interfaceIGridColumn<M,I,S>- Specified by:
newCellin classAbstractColumn<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:AbstractColumnAllows to override default behavior when a row is clicked. Depending on grid settings the default behavior can select the item. If this method returnstruethe default behavior will be suppressed.- Specified by:
cellClickedin interfaceIGridColumn<M,I,S>- Overrides:
cellClickedin classAbstractColumn<M,I,S>- Parameters:
rowModel- Model for clicked row- Returns:
trueif the default behavior when row is clicked should be supressed,falseotherwise.
-
getCellCssClass
public String getCellCssClass(IModel<I> rowModel, int rowNum)
Description copied from class:AbstractColumnReturns the cell specified by rowModel. The class is applied to the appropriate <td> element in the grid.- Specified by:
getCellCssClassin interfaceIGridColumn<M,I,S>- Overrides:
getCellCssClassin classAbstractColumn<M,I,S>- Parameters:
rowModel- model for given rowrowNum- index of row forDataGrid, -1 forTreeGrid- Returns:
- cell style class or
null
-
-