Menu
  • HOME
  • TAGS

Events of multiple cells in single column

gwt,gwt2,gwt-celltable

ButtonCell filters events on the first child element only: https://gwt.googlesource.com/gwt/+/2.6.1/user/src/com/google/gwt/cell/client/ButtonCell.java This is why you don't get an event when clicking the second button (note: the goal of that code is to make sure you clicked on the button, and not on blank space around the button; see https://gwt.googlesource.com/gwt/+/a0dc88c8be7408be9554f746eb1ec93798183a28) The easiest...

ListDataProvider.getList().remove doesn't use the KeyProvider

gwt,celltable,gwt-celltable

No it's not a bug and no it doesn't use the getKey implementation you provided for finding the element in that list, because that method is used for other operations. Bare with me... ListDataProvider uses a ListWrapper which implements the List interface and ListWrapper is backed by an ordinary List...

Multiple ColumnSorting with AsyncDataProvider

java,gwt,gwt2,gwt-celltable

See here for details. Basically view.getDataGridResults().getColumnSortList().get(0).getColumn() will return the column the user clicked on. If you want to get also the other columns (for example for multiple sorting) you have to check also the indices > 0 (i.e. get(1).getColumn()) Once you have the column you can check the direction by...

JAVA GWT cell table action on control click

java,gwt,listener,gwt-celltable

You can use this: table.addCellPreviewHandler(new Handler<MyObject>() { @Override public void onCellPreview(CellPreviewEvent<MyObject> event) { if ("click".equals(event.getNativeEvent().getType())) { if (event.getNativeEvent().getCtrlKey()) { // CTRL button was pressed during the click } } } }); ...

MGWT TapEvent from GWT AbstractCell?

java,javascript,gwt,mgwt,gwt-celltable

You cannot use mgwt touch events with GWT CellTable easily. If GWT-CellTable were more open, you could extend it, take the code related with touch events from Mgwt-CellTable and set the container of your extended class a touch capable widget. But that is impossible because you can not set nor...

GWT : Render a hyperlink in a TextColumn of a CellTable

java,gwt,hyperlink,gwt-celltable

HyperTextCell hyperTextCell = new HyperTextCell(); Column<ServerKeyWord, ServerKeyWord> hyperColumn = new Column<ServerKeyWord, ServerKeyWord>( hyperTextCell) { @Override public ServerKeyWord getValue(ServerKeyWord keyWord) { return keyWord; } }; myCellTable.addColumn(hyperColumn); ...

How to Update Cell Table Footer Dynamically

gwt,gwt-celltable

You need to implement a custom Header and add it to the column which should contain that footer. For example: public class QuantityFooter extends Header<Number> { private final Number totalQty; public QuantityFooter(Number totalQty) { super(new NumberCell()); this.totalQty = totalQty; } public void setQuantity(Number totalQty) { this.totalQty = totalQty; } @Override...

stop click propagation of custom cell in CellTable

events,gwt,gwt-celltable,event-propagation

It's easier to cancel an event before it reaches the cell: table.addCellPreviewHandler(new Handler<Item>() { @Override public void onCellPreview(CellPreviewEvent<Item> event) { //do something event.setCancelled(true); } }); Note that CellPreviewHandler already monitors all events within a table. You can use it for your ClickEvent as well (with finer control like which column...

Get all objects from a GWT CellTable

java,gwt,gwt-celltable

CellTable has method getKeyProvider, which returns object containing data under ProvidesKey interface. You create ListDataProvider and pass it to cell table, so you can get that provider from cell table again at any time: ListDataProvider provider = (ListDataProvider)cellTable.getKeyProvider(); provider.getList().get(0); // get first Keyword ...