gwt-2.2-celltable

Tab from input to input in CellTable

耗尽温柔 提交于 2019-12-04 11:16:08
I have a CellTable with a bunch of cells that render to <input> tags. Tabbing between the inputs is broken because of CellTable's fancy event processing. It seems that tab inspires each cell to finishEditing , but that in turn hogs the focus and the focus never gets to the next <input> . Setting tabIndex on each input does not seem to affect the behavior. How can I restore the usual tabbing functionality? I recently figured this out. Annoying, but simple once you find the magic. Create a new Cell type to use in your table, as the stock TextInputCell specifies a tab index of -1. Basically do

GWT CellTable with checkbox selection and on row click event

喜你入骨 提交于 2019-12-04 09:20:46
问题 How to call a method when some row is clicked using the checkbox selection model? I'm setting the checkbox selection model like this: table.setSelectionModel(selectionModel, DefaultSelectionEventManager.<T> createCheckboxManager(0)); 回答1: I found a solution! Instead of using createCheckboxManager() , use createCustomManager() passing by argument an EventTranslator that extends the CheckboxEventTranslator and do a delegation of the translateSelectionEvent method, intercepting only the events

GWT Table that supports sorting, scrolling and filtering

巧了我就是萌 提交于 2019-12-04 02:05:44
I have a project using GWT and it displays data in a table. I need a Table for GWT that supports: sorting by particular column scrolling the data, while the header is immobile filtering rows for data searched in the table The project is being created for internal purpose of the company, so I look for a solution that does not require commercial licensing for such uses. The standard CellTable supports sorting. (Hopefully more features will come soon.) Here is a table supporting sorting and filtering : http://code.google.com/p/gwt-advanced-table/ Google itself is working on it. Look at this

gwt - celltable - adding extra row

五迷三道 提交于 2019-12-03 23:23:02
问题 enter code hereI have a celltable and the columns contains some numbers. I want to add an extra row at the end of the table which will hold the total for each column. Is there any way to do this? Following is my code: import java.util.*; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.cellview.client.CellTable; import com.google.gwt.user.cellview.client.TextColumn; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.view.client.ListDataProvider;

GWT CellTable with checkbox selection and on row click event

橙三吉。 提交于 2019-12-03 03:27:44
How to call a method when some row is clicked using the checkbox selection model? I'm setting the checkbox selection model like this: table.setSelectionModel(selectionModel, DefaultSelectionEventManager.<T> createCheckboxManager(0)); I found a solution! Instead of using createCheckboxManager() , use createCustomManager() passing by argument an EventTranslator that extends the CheckboxEventTranslator and do a delegation of the translateSelectionEvent method, intercepting only the events ignored by the super ( CheckboxEventTranslator ). The source code: table.setSelectionModel(selectionModel,

gwt - celltable - adding extra row

↘锁芯ラ 提交于 2019-12-01 01:34:17
enter code hereI have a celltable and the columns contains some numbers. I want to add an extra row at the end of the table which will hold the total for each column. Is there any way to do this? Following is my code: import java.util.*; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.cellview.client.CellTable; import com.google.gwt.user.cellview.client.TextColumn; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.view.client.ListDataProvider; public class TestProject implements EntryPoint { private static int totalSalary=0; private static class

GWT Sorting a cell table, probably just something i didn't saw

不想你离开。 提交于 2019-11-30 21:59:57
问题 I've been struggling for the last couple of hour trying to sort a GWT CellTable. It's really a stupid problem because it's been done here http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable But I do not understand what I'm missing in the exemple ... Here is my code I use to create the column: Column<RemoteCommand, String> nbProducts = new Column<RemoteCommand, String>( new TextCell()) { @Override public String getValue(RemoteCommand object) { return object.getNumberProduct(); }

CellTable with custom Header containing SearchBox and Focus Problem

自作多情 提交于 2019-11-30 06:27:31
问题 I am trying to implement a CellTable with a custom Column Header which displays a SearchBox (simple Textbox) below the normal Column text. The SearchBox should allow the user to filter the CellTable. It should look something like this: |Header 1|Header 2 | |SEARCHBOX|SEARCHBOX| ------------------------------------------------------- | ROW 1 ------------------------------------------------------ | ROW 2 As soon as the user types in a character into the SearchBox a RangeChangeEvent is fired

Append custom style to a GWT CellTable (in this case all cells)

非 Y 不嫁゛ 提交于 2019-11-28 07:33:57
I have a case where I want to append white-space: nowrap; to the style of each cell in my CellTable. Currently it applies to all tables, but it would be nice to know both have to apply it for a specific CellTable, and all CellTables. CellTables have their own CssResource . To override this style applied to all cells in a cellTable, create a new css file : /* Incremental changes from CellTable.css */ .cellTableCell { white-space: nowrap; } Then create your own CellTable.Resources interface : public interface TableResources extends CellTable.Resources { /** * The styles applied to the table. */

Adding clickHandler to row in CellTable in GWT?

六月ゝ 毕业季﹏ 提交于 2019-11-27 20:13:50
I have created a basic CellTable and filled it with some data. Now I want to add a clickHandler to each row but I'm not sure how to do this. I've created a clickEvent for the whole table but I want one for each row. table.sinkEvents(Event.ONCLICK); table.setTitle("Click me"); table.setSize("600px", "600px"); table.addDomHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.alert("You clicked!" +); } }, ClickEvent.getType()); Can I do something similar to add clickEvent for each row? Hilbrand Bouwkamp A CellTable has built in support for handling click events.