Hi,
I facing very strange behavior.
I'm using disable() to disable button after user click on it and enable() to enable it after service call has ended.
It is used like that so user wont click on button many times while waiting for service to complete call.
If someone knows better solution, let me know :)
My problem is that enable() work in Development mode but does not work in compiled version.The button just wont get enabled.
And in Firefox it doesn't even get disabled.
Code (dsiControl is my button):
Im using
GWT 2.1
SmartGWT 2.4
Tomcat 7.11
Internet Explorer 6.0
Mozilla Firefox 3.6
Windows XP (same behavior on Win2003 and Win2008)
Thanks
Zbynek
I facing very strange behavior.
I'm using disable() to disable button after user click on it and enable() to enable it after service call has ended.
It is used like that so user wont click on button many times while waiting for service to complete call.
If someone knows better solution, let me know :)
My problem is that enable() work in Development mode but does not work in compiled version.The button just wont get enabled.
And in Firefox it doesn't even get disabled.
Code (dsiControl is my button):
Code:
public void onClick(ClickEvent event) { if(!isRunning) { dsiControl.disable(); service.startDSI(name, new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { SC.warn("Unable to start dsi ["+name+"]: " + caught.getMessage()); } @Override public void onSuccess(String result) { if(result.equals(null)) { SC.warn("Error during startup of dsi ["+name+"]"); } else { SC.say("DSI ["+name+"] started !"); isRunning = true; dsiStatus.setContents(TEXT_STATUS_STARTED + result); dsiStatus.setBackgroundColor(COLOR_STARTED); dsiControl.setTitle(TEXT_CONTROL_STOP); dsiControl.enable(); } } }); } }
GWT 2.1
SmartGWT 2.4
Tomcat 7.11
Internet Explorer 6.0
Mozilla Firefox 3.6
Windows XP (same behavior on Win2003 and Win2008)
Thanks
Zbynek
Comment