I met a problem.In a tabSheet, I create a table and let it hold the data which get from the server. and Then, a new a Thread to get the data from server 3 second per and update the table’s data. But the data still hold the old data and never change any more. But if I click the Item in the table, the data can be updata.I see the data packages, find that when I click the Item, browser comunicate with the server and get the newly data.
At last, I guess the data change in server but the browser don’t know it. When click, it’s sync.
I used ICEpush add-on to let the broser know the changes, but also met some problem.The browser tips that:
Widgetset does not contain implementation for org.vaadin.artur.icepush.ICEPush. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
-Unrendered UIDL
-org.vaadin.artur.icepush.ICEPush(NO CLIENT IMPLEMENTATION FOUND) id=PID2 pushGroup=ICEPush-1 codeLocation=/EM_testing/code.icepush
can you help me? Thanks.
I put some codes below:
web.xml:
[code]
Emasp Application
org.vaadin.artur.icepush.ICEPushServlet
Emasp application class to start
application
com.siemens.emasp.action.MainApplication
widgetset
com.siemens.emasp.ui.widgetset
1
To use ICEPush, you will have to
recompile your widgetset . You could also use a non-visible ProgressBar as that (Core-)Component would also query the server periodically.
Sorry, I am a newly to Vaadin. If I recompile, it will work? Does any other process I should do? In ICEPush.zip package which I download,there are three jars and no widgets,and put jar files in lib of the WEB-INFO, why recompile again?
Can you give me a simple demo for ICEPush, thanks! My Email is gengchenzhong@163.com.
and your widgetset should inherit the default widgetset and the IcePush widgetset.
See
this help page for general instructions on how to use add-ons with custom widgets - it even has a video showing how to do this in Eclipse.
For corresponding files in one of the IcePush demo projects, see e.g.
MultiusercalendarWidgetset.gwt.xml and
web.xml of one of the demos, then recompile the widgetset (using the Vaadin add-on for Eclipse “Compile widgetset” button in the toolbar or a build script.
I write another sample referenced from demo project of the ICEPush. This time the browser tips that:
"Fail to load the widgetset:
/ICEPushDemo/VAADIN/widgetsets/com.vaadin.terminia.gwt.DefaultWidgetSet
/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1336723778359".
In my sample,there are two file total. the all code below:(How can I get the “ICEPushDemo/VAADIN/widgetsets/…”? Do I recompile, it will produce or else)
public class ICEPushDemo extends Application {
private ICEPush pusher = new ICEPush();
@Override
public void init() {
System.out.println("Enter the init==============================");
Window mainWindow = new Window("Icepushaddon Application");
setMainWindow(mainWindow);
// Add the push component
mainWindow.addComponent(pusher);
System.out.println("begin to addComponent to window===================");
// Add a button for starting background work
getMainWindow().addComponent(
new Button("Do stuff in the background", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow()
.addComponent(
new Label(
"Waiting for background process to complete..."));
new BackgroundThread().start();
}
}));
}
public class BackgroundThread extends Thread {
@Override
public void run() {
// Simulate background work
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
// Update UI
synchronized (ICEPushDemo.this) {
getMainWindow().addComponent(new Label("All done"));
}
// Push the changes
pusher.push();
}
}
}
In case still unresolved, check my previous post (posted around the same time you posted this).
Your project should have its own widgetset (referring to DefaultWidgetSet and the ICEPush add-on widgetset) and you need to compile it. Then add a parameter in your web.xml to use it. See the links in my post for more information.
I’m sorry to reply you so late. I had solve this problem. At last, I found that I configure the wrong path for ICEPush. Because ICEPush related URL should match with org.vaadin.artur.icepush.ICEPushServlet.so the url-pattern should /, I had configued it "/admin/", now It’s ok, thank you very much.
Hello Henri Sara!
I am testing Vaadin 7 rc2 with Spring integration - how to add the ICEPush servlet to web.xml? My the primary servlet is a SpringIntegrationServlet… i tryed create a second servlet ICEPushServlet in web.xml, but in application push method do not work.
This is a very different topic and should be in a separate thread, but: you need to combine the code of the two servlets - probably inherit one and add the relevant code from the other to your servlet subclass. When we get built-in push support (currently targeted for 7.1 in the roadmap) this should get easier.