blob: 569d4fe30f41d6d53f1a93ca4ed95944c0b94447 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package com.vaadin.tests.tickets;
import java.util.Date;
import com.vaadin.LegacyApplication;
import com.vaadin.server.CustomizedSystemMessages;
import com.vaadin.server.SystemMessages;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI.LegacyWindow;
public class Ticket2106 extends LegacyApplication {
private static CustomizedSystemMessages msgs = new CustomizedSystemMessages();
static {
// We will forward the user to www.vaadin.com when the session expires
msgs.setSessionExpiredURL("http://www.vaadin.com");
msgs.setSessionExpiredMessage(null);
msgs.setSessionExpiredCaption(null);
}
public static SystemMessages getSystemMessages() {
return msgs;
}
@Override
public void init() {
setMainWindow(new LegacyWindow("#2106"));
getMainWindow().addComponent(
new Button("Do nothing", new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().addComponent(
new Label("Last time did nothing: "
+ new Date()));
}
}));
}
}
|