1
2
3
4
5
6
7
8
9
10
11
Link logoutLink = new Link(LOGOUT_ID) {
private static final long serialVersionUID = 1L;
public void onClick() {
getUbSession().setLogin(false);
}
};
SimpleAttributeModifier sam = new SimpleAttributeModifier(
"onclick","if(!confirm('确定退出?')) return false;");

logoutLink.add(sam);
add(logoutLink);