celltable

gwt cell table dynamic columns - sorting

老子叫甜甜 提交于 2019-12-02 04:38:19
You can represent your "rows" as List<String> instances, you have to change your parameterization from String to List in your Grid, Column and data provider; and of course you have to call updateRowData with a List<List<String>> , not a List<String> . You also need one Column instance per column, taking the value out of the List by index: class IndexedColumn extends Column<List<String>, String> { private final int index; public IndexedColumn(int index) { super(new EditTextCell()); this.index = index; } @Override public String getValue(List<String> object) { return object.get(this.index); } }

GWT CellTable columnsorting

*爱你&永不变心* 提交于 2019-12-01 00:38:36
I am trying to sort on a column in GWT using their ListDataProvider Sorting example as a reference http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellTable.html#columnSorting The problem is I can see my table column data is getting sorted (by using the debugger) but the table never gets refreshed. Looking at the example in the above link they do not explicitly refresh the display. Am I missing something here? Thanks. Hamzeh My experience says sort handler (i.e. ListHandler) is sensitive to the List, which ListDataProvider has, when you are creating it. So I recommend not to delete or

GWT CellTable columnsorting

為{幸葍}努か 提交于 2019-11-30 19:55:50
问题 I am trying to sort on a column in GWT using their ListDataProvider Sorting example as a reference http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellTable.html#columnSorting The problem is I can see my table column data is getting sorted (by using the debugger) but the table never gets refreshed. Looking at the example in the above link they do not explicitly refresh the display. Am I missing something here? Thanks. 回答1: My experience says sort handler (i.e. ListHandler) is sensitive

In search of a GWT validation example… where art thou?

那年仲夏 提交于 2019-11-30 07:01:28
As a follow-up to Why are there no decent examples of CompositeCell in use within a CellTable? I am trying to add-on JSR-303 validation support. I have followed Koma's config advice here: How to install gwt-validation with gwt-2.4.0 (Note: I'm using GWT 2.4's built-in validation, not GWT-Validation). Again, in order to get some re-use I crafted a pair of classes, ValidatableInputCell and AbstractValidatableColumn . I got inspiration for them from: http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/validation/src/main/java/com/google/gwt/sample/validation/client

Dynamic styles for GWT cellTable cells

谁说胖子不能爱 提交于 2019-11-29 16:50:09
I'm having an issue using GWT. I'm building the columns of a cellTable and I want the style of a cell to depends of the value of that cell: Column<MyProxy, MyProxy> editButtonColumn = new Column<MyProxy, MyProxy>(new ActionCell<MyProxy>("", new ActionCell.Delegate<MyProxy>() { @Override public void execute(MyProxy record) { if (object.isEditable()) { doSomething(record); } } })) { @Override public MyProxy getValue(MyProxy object) { if (object.isEditable()) { this.setCellStyleNames("editButtonCell"); } return object; } }; I've checked in debug mode the style "editButtonCell" is applied

In search of a GWT validation example… where art thou?

核能气质少年 提交于 2019-11-29 08:04:17
问题 As a follow-up to Why are there no decent examples of CompositeCell in use within a CellTable? I am trying to add-on JSR-303 validation support. I have followed Koma's config advice here: How to install gwt-validation with gwt-2.4.0 (Note: I'm using GWT 2.4's built-in validation, not GWT-Validation). Again, in order to get some re-use I crafted a pair of classes, ValidatableInputCell and AbstractValidatableColumn . I got inspiration for them from: http://code.google.com/p/google-web-toolkit

GWT Datagrid does not show data , but contains it

安稳与你 提交于 2019-11-28 08:34:09
I'm trying to convert a cellTable into a datagrid , because I want to add a search handler later and therefor I need fixed column headers. At the moment I extend the celltable / datagrid class and put the widget into a simplelayoutpanel and add this to my tabpanel . If I use the celltable , all works fine and the data shows up. If I change the type of the class to datagrid , the data shows sometimes up (The column names are always there). To add something to the table I used setRowData or a dataProvider . If I set breakpoints to delay the loading of the table content, the table does sometimes

GWT CellTable CheckboxCell Not working in IE8

自作多情 提交于 2019-11-26 18:38:46
问题 I am having a CellTable with CheckboxCell in it. I have added the following handler to it: private static Column<AIDataRecord, Boolean> m_checkColumn = new Column<AIDataRecord, Boolean>(new CheckboxCell(true, false)) { @Override public Boolean getValue(AIDataRecord object) { // Get the value from the selection model. return object.isSelected(); } @Override public void onBrowserEvent(Context context, Element elem, AIDataRecord object, NativeEvent event) { System.out.println("Browser Event