use of com.googlecode.wicket.jquery.ui.widget.tabs.TabbedPanel 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();
}
use of com.googlecode.wicket.jquery.ui.widget.tabs.TabbedPanel in project openmeetings by apache.
the class TestMainAreas method testRoomsProfileMessages.
@Test
public void testRoomsProfileMessages() throws OmException {
checkArea(AreaKeys.profile, TYPE_MESSAGES, SettingsPanel.class, p -> {
TabbedPanel tp = (TabbedPanel) p.get("main-container:main:contents:child:tabs");
// create behavior
tester.executeBehavior((AbstractAjaxBehavior) tp.getBehaviorById(0));
for (int i = 0; i <= tp.getLastTabIndex(); ++i) {
tester.getRequest().setParameter("index", String.valueOf(i));
// activate
tester.executeBehavior((AbstractAjaxBehavior) tp.getBehaviorById(1));
// add visibility check
}
}, regularUsername);
}
Aggregations