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);
|