/** * Creates a new clickable renderer with the given presentation type and * null representation. * * @param presentationType * the data type that this renderer displays, not * <code>null</code> * @param nullRepresentation * a string that will be sent to the client instead of a regular * value in case the actual cell value is <code>null</code>. May * be <code>null</code>. */ protected ClickableRenderer(Class<V> presentationType, String nullRepresentation) { super(presentationType, nullRepresentation); registerRpc((RendererClickRpc) (String rowKey, String columnId, MouseEventDetails mouseDetails) -> { Grid<T> grid = getParentGrid(); T item = grid.getDataCommunicator().getKeyMapper().get(rowKey); Column<T, V> column = getParent(); fireEvent( new RendererClickEvent<>(grid, item, column, mouseDetails)); }); }