com.inmethod.grid.column.editable
Class AddDeleteColumn<M,I,S>

java.lang.Object
  extended by com.inmethod.grid.column.AbstractColumn<M,I,S>
      extended by com.inmethod.grid.column.editable.SubmitCancelColumn<M,I,S>
          extended by com.inmethod.grid.column.editable.AddDeleteColumn<M,I,S>
All Implemented Interfaces:
IGridColumn<M,I,S>, Serializable, IDetachable, IClusterable

public class AddDeleteColumn<M,I,S>
extends SubmitCancelColumn<M,I,S>

Column that Displays Confirm, Cancel and Delete buttons

Author:
Tom Burton
See Also:
Serialized Form

Constructor Summary
AddDeleteColumn(String columnId, IModel<String> headerModel)
          Create a new AddDeleteColumn
 
Method Summary
protected  Icon getDeleteIcon()
           
 Component newCell(WebMarkupContainer parent, String componentId, IModel<I> rowModel)
          Creates a new cell component.
protected  void onDelete(AjaxRequestTarget target, IModel<I> rowModel, WebMarkupContainer rowComponent)
           
 
Methods inherited from class com.inmethod.grid.column.editable.SubmitCancelColumn
cellClicked, getCancelIcon, getCellCssClass, getSubmitIcon, onCancel, onError, onSubmitted
 
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
 

Constructor Detail

AddDeleteColumn

public AddDeleteColumn(String columnId,
                       IModel<String> headerModel)
Create a new AddDeleteColumn

Parameters:
columnId - column identifier - must be unique within the grid
headerModel - model for column title
Method Detail

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>
Overrides:
newCell in class SubmitCancelColumn<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 components
rowModel - model for given row
Returns:
new cell component

getDeleteIcon

protected Icon getDeleteIcon()

onDelete

protected void onDelete(AjaxRequestTarget target,
                        IModel<I> rowModel,
                        WebMarkupContainer rowComponent)


Copyright © 2007–2014 inMethod s.r.o.. All rights reserved.