gxt

GXT : How to customize TabPanel close context menu

感情迁移 提交于 2020-02-06 18:49:24
问题 I have a GXT(3.0.1) TabPanel with many tabs. This TabPanel has an out-of-the-box CloseContextMenu with 2 options : Close this tab Close all other tabs In order to react to "close tab" events and be able to eventually cancel them, I use some BeforeCloseHandler. What I need : When the user closes one tab, be able to display a confirmation dialog for this tab. When the user chooses to close all other tabs, display one unique confirmation for all tabs. The problem : The BeforeCloseHandler is

adding the same object twice

爷,独闯天下 提交于 2020-02-04 04:47:10
问题 i have an label and two panels. i want to add the label into each panel, but after rendering is shown only one label. i can create second label, but i think, it must be possible to add the same label twice. Here my code: // Create labels Label sectorLabel = new Label("Bereich"); // Create panels/rows HorizontalPanel row1 = new HorizontalPanel(); HorizontalPanel row2 = new HorizontalPanel(); // Add content to row1 row1.add(sectorLabel); // Add content to row2 row2.add(sectorLabel); 回答1: You

GWT StoreFilterField - auto filter

江枫思渺然 提交于 2020-01-17 05:19:01
问题 I would like to filter a tree without type in the textfield, but when an event is triggered. I tried subclassing StoreFilterField like this: class MyStoreFilter<M extends ModelData> extends StoreFilterField<M>{ public MyStoreFilter() { super(); } public void startFilter(){ super.onFilter(); } @Override protected boolean doSelect(Store<M> store, M parent, M record, String property, String filter) { String name = record.get("name"); name = name.toLowerCase(); if (name.startsWith(filter

GXT 3.x : Dynamic freeze/lock columns. Autosize the grids

狂风中的少年 提交于 2020-01-16 02:22:11
问题 I took the sample code from here How to implement freeze column in GXT 3.x? and I came up with the code below. I've managed to make the columns dynamically move from locked grid to unlocked grid and vice versa. My problem is with the sizing of the grids. The original code used a fixed width. I can't have that. I need the grids (locked and unlocked) to fill as much space as the children columns need. The columns have a fixed width (let's say 50px;). The part that interests me is here

Dynamic Autosuggest Combobox in GXT

前提是你 提交于 2020-01-15 11:36:47
问题 Over the past 5 months we have been prototyping GWT and setting up the infrastructure. WE are using GXT for the widgets with MVP and Command Pattern implementations. However, we are currently looking to do a spike on a ComboBox with autosuggest from a live Database. I would like to do this in the framework of the MVP and Command pattern implementations. Any one out there have any ideas how to go about doing this? 回答1: I solved that using a generic DispatchDataProxy modelled over the Command

Dynamic Autosuggest Combobox in GXT

江枫思渺然 提交于 2020-01-15 11:36:35
问题 Over the past 5 months we have been prototyping GWT and setting up the infrastructure. WE are using GXT for the widgets with MVP and Command Pattern implementations. However, we are currently looking to do a spike on a ComboBox with autosuggest from a live Database. I would like to do this in the framework of the MVP and Command pattern implementations. Any one out there have any ideas how to go about doing this? 回答1: I solved that using a generic DispatchDataProxy modelled over the Command

GXT Combobox : type a value that is not in the list and keep it

谁说胖子不能爱 提交于 2020-01-15 09:16:11
问题 I try to have a GXT combobox (3.0.1) accepting text I type in it but it keeps deleting it on blur. Isn't it possible to tell the combobox to accept a value that's not a part of its liststore ? PS: setForceSelection(false) doesn't do what I want :) 回答1: The bug mentioned in the comments is focused on ComboBox<String> , since there is a natural mapping from the data the user typed in (aka a String) to the data in the combo (also a String). If you don't have such a natural mapping, the latest

How must one use a ListEditor as a child of another Editor?

安稳与你 提交于 2020-01-13 19:39:27
问题 I am using GWT 2.5.0 My intent was to create an editor hierarchy which binds to a ParentBean object. The ParentBean contains a List<Group> , and the Group bean has a List<ChildBean> and List<Group> . From the Editor tutorials I have found, it seemed simple enough to create an editor which contains a ListEditor as one of its sub-editors. But the parent editor never seems to properly initialize the sub ListEditor. Here is an explanation of how I attempted to do this. From the code below, I

Rows are not aligned properly under the Column headers in EditorGrid in GXt 2.2.3

大城市里の小女人 提交于 2020-01-13 15:01:22
问题 I Created an EditorGrid using GXT 2.2.3.Now the problem is rows are not aligned properly under the column header,they are slightly move to left side. Please suggest how to resolve this. 回答1: I solved this by setting the padding and width of each column as below: actioncolumn.setStyle("width:100%;"); actioncolumn.setStyle("padding-right:3px;"); 回答2: We've had problems with column header alignment before... If you are re-initializing your grid with reconfiure() calls, make sure the widget is

GWT (Maven plugin): how to enable assert checking for server side code?

一曲冷凌霜 提交于 2020-01-07 05:36:13
问题 Basically I put a lot of 'assert's allover the service code (server side). I just realized that those were ignored as the execution went through upon hitting 'false' resulting expressions. However, to my surprise, assertions on the client side got checked. I tried the following to no success. mvn gwt:debug -Dgwt.extraJvmArgs="-Xmx1536m -Xms1536m -XX:MaxPermSize=512m -ea" Any clue? 回答1: Maven does not pass VM arguments to java executables started from maven (e.g. unit tests). You have to