Hi and thank you for the wonderful work (and forum).
I have an issue with a DynamicForm and FocusChangedHandler in it.
My idea is to show a "save changes" dialog when the user clicks outside the form and it works fine in Chrome. However in IE8 the FocusChanged events are not captured and I don't know what to do.
I am using SmartGWT 2.4 and GWT 2.2.
Here is the handler code (that works in Chrome, but not in IE).
I would really appreciate any help, as I don't really see a way out.
I have an issue with a DynamicForm and FocusChangedHandler in it.
My idea is to show a "save changes" dialog when the user clicks outside the form and it works fine in Chrome. However in IE8 the FocusChanged events are not captured and I don't know what to do.
I am using SmartGWT 2.4 and GWT 2.2.
Here is the handler code (that works in Chrome, but not in IE).
Code:
public TRPDynamicForm() { super(); this.setAutoFocus(false); this.addFocusChangedHandler(new FocusChangedHandler() { @Override public void onFocusChanged(FocusChangedEvent event) { if (!event.getHasFocus() && isEditting && valuesHaveChanged()) { SC.ask("Title", "Save unsaved data?", new BooleanCallback() { @Override public void execute(Boolean value) { if (value) { saveData(); setReadOnly(true); } else { setReadOnly(true); } } }); } } ; }); }
Comment