use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.
the class ConfigurationStep method updateConfigurationTabs.
private void updateConfigurationTabs() {
final com.evolveum.midpoint.web.component.form.Form form = getForm();
TabbedPanel<ITab> tabbedPanel = getConfigurationTabbedPanel();
List<ITab> tabs = tabbedPanel.getTabs().getObject();
tabs.clear();
List<ContainerWrapper> wrappers = configurationPropertiesModel.getObject();
for (final ContainerWrapper wrapper : wrappers) {
String tabName = getString(wrapper.getDisplayName(), null, wrapper.getDisplayName());
tabs.add(new AbstractTab(new Model<>(tabName)) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new PrismContainerPanel(panelId, new Model<>(wrapper), true, form, parentPage);
}
});
}
int i = tabbedPanel.getSelectedTab();
if (i < 0 || i > tabs.size()) {
i = 0;
}
tabbedPanel.setSelectedTab(i);
}
use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.
the class PageReport method initLayout.
private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM);
add(mainForm);
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(createStringResource("PageReport.basic")) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new ReportConfigurationPanel(panelId, model);
}
});
tabs.add(new AbstractTab(createStringResource("PageReport.jasperTemplate")) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
return new JasperReportConfigurationPanel(panelId, model);
// IModel<String> title = PageReport.this.createStringResource("PageReport.jasperTemplate");
// IModel<String> data = new Base64Model(new PrismPropertyModel<>(model, ReportType.F_TEMPLATE));
// return new AceEditorPanel(panelId, title, data);
}
});
tabs.add(new AbstractTab(createStringResource("PageReport.jasperTemplateStyle")) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer getPanel(String panelId) {
IModel<String> title = PageReport.this.createStringResource("PageReport.jasperTemplateStyle");
IModel<String> data = new Base64Model(new PropertyModel(model, "templateStyle"));
return new AceEditorPanel(panelId, title, data);
}
});
// tabs.add(new AbstractTab(createStringResource("PageReport.fullXml")) {
//
// @Override
// public WebMarkupContainer getPanel(String panelId) {
// IModel<String> title = PageReport.this.createStringResource("PageReport.fullXml");
//
// AceEditorPanel panel = new AceEditorPanel(panelId, title, createFullXmlModel());
// panel.getEditor().add(createFullXmlValidator());
// return panel;
// }
// });
TabbedPanel<ITab> reportTabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
reportTabPanel.setOutputMarkupId(true);
mainForm.add(reportTabPanel);
initButtons(mainForm);
}
use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.
the class PageSystemConfiguration method initLayout.
private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM, true);
add(mainForm);
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.system.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
systemConfigPanel = new SystemConfigPanel(panelId, model);
return systemConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.notifications.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
notificationConfigPanel = new NotificationConfigPanel(panelId, new PropertyModel<NotificationConfigurationDto>(model, "notificationConfig"));
return notificationConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.logging.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
loggingConfigPanel = new LoggingConfigPanel(panelId, new PropertyModel<LoggingDto>(model, "loggingConfig"));
return loggingConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.profiling.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
profilingConfigPanel = new ProfilingConfigPanel(panelId, new PropertyModel<ProfilingDto>(model, "profilingDto"), PageSystemConfiguration.this);
return profilingConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.adminGui.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
adminGuiConfigPanel = new AdminGuiConfigPanel(panelId, model);
return adminGuiConfigPanel;
}
});
TabbedPanel tabPanel = new TabbedPanel(ID_TAB_PANEL, tabs) {
@Override
protected void onTabChange(int index) {
PageParameters params = getPageParameters();
params.set(SELECTED_TAB_INDEX, index);
}
};
tabPanel.setOutputMarkupId(true);
mainForm.add(tabPanel);
initButtons(mainForm);
}
use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.
the class TaskMainPanel method createTabs.
protected List<ITab> createTabs() {
List<ITab> tabs = new ArrayList<>();
final TaskTabsVisibility visibility = new TaskTabsVisibility();
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.basic")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskBasicTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeBasicVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.scheduleTitle")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskSchedulingTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeSchedulingVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.subtasksAndThreads")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskSubtasksAndThreadsTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeSubtasksAndThreadsVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.progress")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskProgressTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeProgressVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.performance")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskPerformanceTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeEnvironmentalPerformanceVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.approvals")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskApprovalsTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeApprovalsVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.operation")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskOperationTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeOperationVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.result")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskResultTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeResultVisible(parentPage);
}
});
tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.errors")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new TaskErrorsTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
}
@Override
public boolean isVisible() {
return visibility.computeErrorsVisible(parentPage);
}
});
return tabs;
}
Aggregations