Hello,
I’m new in vaadin and liferay. I would like to use the push tchnology.
In liferay 6.2, I change the version of vaadin from 6 to 7.6.1
I have added the jar for the push
I have added the @push annotation
Then i have one button, when I clicked on, a background thread is sleeping then watch a notification.
But Now, I always need to click on a button or anything else to watch the notification.
I think, it’s possible to refresh the UI with the push. But I don’t know where is the problem
public void buttonClick(ClickEvent event) {
if (event.getButton() == pushButton1) {
new Push1Thread().start();
}
class Push1Thread extends Thread
{
public void run() {
try {
Thread.sleep(5000);
final UI localUi = UI.getCurrent();
localUi.access(new Runnable() {
public void run() {
// Here the UI is locked and can be update
Notification.show("Je suis réveillé push 1", Notification.Type.ERROR_MESSAGE);
}
});
} catch ( InterruptedException e ) {
e.printStackTrace();
}
}
}
Can anyone help me ?
Thanks a lot
Bertrand