m_currentUser = currentUser;
setEnabled(false);
}
public void init(Component component) {
final DependencyManager dm = component.getDependencyManager();
setEnabled(true);
if (m_userUtil.hasRole(m_currentUser, "editUsers")) {
setCaption("Manage Users");
}
else {
setCaption("My Info");
}
final Window window = new UserAdminWindow(m_currentUser);
window.setModal(true);
// create a new dependency for the window
m_window = dm.createComponent()
.setImplementation(window)
.add(dm.createServiceDependency()
.setService(UserEditor.class)
.setRequired(true)
);
dm.add(m_window);
m_click = new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getWindow().addWindow(window);
}