I have a bit sophisticated ComboBoxItem with GWT-DataSource and some important code in EditorExitHandler. When GWT-DataSource is loading data from server I am covering screen by modal-masked ProgressBar window.
This construction has 3 advantages:
1) User can see, that loading of data is in progress (same progressBar in all loading-situations of the application)
2) Even with progressBar on the screen, user still can continue in typing of letters into ComboBox
3) User can not change any other formItem, while loading and related code is not finished. In this case it's important, because of functionality in EditorExitHandler, too.
In some of recent night-builds SmartGwt changed behaviour. Now the ComboBoxItem gets EditorExitEvent every time, when the progressBar-window is shown and besides this user can not continue in typing into ComboBox. Even more - I don't know how to distinguish between EditorExitEvent as intention of user and EditorExitEvent caused by showing progressBar window.
Is it possible to revert to previous functionality?
In last production version of SmartGwt and at least up to SmartGWT 5.1d (Tue Jan 27 11:40:00 CET 2015) everything worked fine.
I made for you some simplified code (you can use new and old SmartGwt to see the difference):
This construction has 3 advantages:
1) User can see, that loading of data is in progress (same progressBar in all loading-situations of the application)
2) Even with progressBar on the screen, user still can continue in typing of letters into ComboBox
3) User can not change any other formItem, while loading and related code is not finished. In this case it's important, because of functionality in EditorExitHandler, too.
In some of recent night-builds SmartGwt changed behaviour. Now the ComboBoxItem gets EditorExitEvent every time, when the progressBar-window is shown and besides this user can not continue in typing into ComboBox. Even more - I don't know how to distinguish between EditorExitEvent as intention of user and EditorExitEvent caused by showing progressBar window.
Is it possible to revert to previous functionality?
In last production version of SmartGwt and at least up to SmartGWT 5.1d (Tue Jan 27 11:40:00 CET 2015) everything worked fine.
I made for you some simplified code (you can use new and old SmartGwt to see the difference):
Code:
@Override public void onModuleLoad() { final Window progressWnd = createWindowInstance(); final StaticTextItem infoText = new StaticTextItem("editorExit", "editorExit"); infoText.setValue("-"); // TEST CASE: ComboBoxItem combo = new ComboBoxItem("combo", "combo"); combo.setValueMap("1", "2"); combo.addEditorExitHandler(new EditorExitHandler() { @Override public void onEditorExit(EditorExitEvent aEvent) { infoText.setValue((String)infoText.getValue() + " EditorExit!"); } }); combo.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent aEvent) { progressWnd.show(); Timer timer = new Timer() { @Override public void run() { progressWnd.hide(); } }; timer.schedule(3000); } }); // form final DynamicForm form = new DynamicForm(); form.setItems(combo, infoText); // GWT / SmartGwt versions String versionString = "Versions: " + "GWT " + GWT.getVersion() + ", SmartGWT " + Version.getVersion() + " (" + Version.getBuildDate() + ")"; Label gwtVersion = new Label(versionString); System.out.println(versionString); // layout + draw VLayout layout = new VLayout(); layout.setWidth100(); layout.setMembers(gwtVersion, form); layout.draw(); } private static Window createWindowInstance() { Progressbar progressbar = new Progressbar(); Window result = new Window(); result.addItem(progressbar); result.setTitle(""); result.setStyleName(""); result.setWidth(300); result.setHeight(40); result.setOverflow(Overflow.HIDDEN); result.setBorder("0px"); result.setShowCloseButton(Boolean.FALSE); result.setShowMinimizeButton(Boolean.FALSE); result.setShowMaximizeButton(Boolean.FALSE); result.setShowBody(Boolean.TRUE); result.setShowHeader(Boolean.FALSE); result.setShowTitle(Boolean.FALSE); result.setAutoCenter(Boolean.TRUE); result.setCanDragReposition(Boolean.FALSE); result.setCanDragResize(Boolean.FALSE); result.setShowModalMask(Boolean.TRUE); result.setModalMaskOpacity(25); result.setIsModal(Boolean.TRUE); return result; }
Comment