Ticket #1635 (closed defect: fixed)
Out of sync issue in valid application logic
| Reported by: | Jani Laakso | Owned by: | Matti Tahvonen |
|---|---|---|---|
| Priority: | critical | Milestone: | User Interface Library 5.2.0 RC4 |
| Component: | gwt-adapter | Version: | 5.2.0-rc |
| Keywords: | Cc: | marc.englund@… | |
| Known Issue description: | |||
| Hours estimate: | Deadline (dd.mm.yyyy): | ||
| Known Issue version (since): | Known Issue title: | ||
| Hours done: | Depends to: | ||
| Affects documentation: | no | ||
| Known Issue workaround: | |||
| Affects release notes: | yes | Contract: | |
Description
Replace HelloWorld? with this:
package com.itmill.toolkit.demo;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.Window;
import com.itmill.toolkit.ui.Button.ClickEvent;
import com.itmill.toolkit.ui.Button.ClickListener;
public class HelloWorld extends com.itmill.toolkit.Application {
Window mainWindow = new Window("MainWindow");
Button b1 = new Button("Switch to button 2");
Button b2 = new Button("Switch to button 1");
int state = 0;
public void init() {
setMainWindow(mainWindow);
mainWindow.addComponent(b1);
b1.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
System.err.println("Got event from "
+ event.getButton().getCaption());
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
mainWindow.removeAllComponents();
if (event.getButton().getCaption().equals("Switch to button 2")) {
mainWindow.addComponent(b2);
} else {
mainWindow.addComponent(b1);
}
}
});
}
}
Start application and hit button multiple times within five seconds, now observe results (see attachment).
Trunk 4412 in use. Browser should not affect this, but I used Firefox 3 beta 5.
Here's console logs
Starting Jetty servlet container. ------------------------------------------------- Starting IT Mill Toolkit in Web Mode. Running in http://localhost:8888 ------------------------------------------------- 2008-05-09 16:05:40.502::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-05-09 16:05:40.566::INFO: jetty-6.1.7 2008-05-09 16:05:41.340::INFO: Started SelectChannelConnector@0.0.0.0:8888 Starting Web Browser. Got event from Switch to button 2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2 Warning: Ignoring variable change for non-existent component, VAR_PID=PID2
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
