use of com.googlecode.wicket.jquery.ui.widget.tabs.AjaxTab in project openmeetings by apache.
the class SettingsPanel method onInitialize.
@Override
protected void onInitialize() {
List<ITab> tabs = new ArrayList<>();
tabs.add(new AjaxTab(Model.of(getString("1170"))) {
private static final long serialVersionUID = 1L;
UserProfilePanel profilePanel = null;
@Override
protected WebMarkupContainer getLazyPanel(String panelId) {
if (profilePanel == null) {
profilePanel = new UserProfilePanel(panelId, getUserId());
profilePanel.setOutputMarkupId(true);
}
return profilePanel;
}
@Override
public boolean load(AjaxRequestTarget target) {
if (profilePanel != null) {
profilePanel.setDefaultModelObject(userDao.get(getUserId()));
target.add(profilePanel);
}
return super.load(target);
}
});
tabs.add(new AjaxTab(Model.of(getString("1188"))) {
private static final long serialVersionUID = 1L;
@Override
protected WebMarkupContainer getLazyPanel(String panelId) {
return new MessagesContactsPanel(panelId);
}
});
tabs.add(new AbstractTab(Model.of(getString("1171"))) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new ProfilePanel(panelId);
}
});
tabs.add(new AbstractTab(Model.of(getString("1172"))) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new UserSearchPanel(panelId);
}
});
tabs.add(new AbstractTab(Model.of(getString("1548"))) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new WidgetsPanel(panelId);
}
});
add(new TabbedPanel("tabs", tabs, new Options("active", active)).setActiveTab(active));
super.onInitialize();
}
Aggregations