use of com.evolveum.midpoint.web.component.TabbedPanel in project midpoint by Evolveum.
the class AbstractObjectMainPanel method onConfigure.
@Override
protected void onConfigure() {
super.onConfigure();
TabbedPanel tabbedPanel = (TabbedPanel) get(ID_MAIN_FORM + ":" + ID_TAB_PANEL);
WebComponentUtil.setSelectedTabFromPageParameters(tabbedPanel, getPage().getPageParameters(), PARAMETER_SELECTED_TAB);
}
use of com.evolveum.midpoint.web.component.TabbedPanel in project midpoint by Evolveum.
the class TaskMainPanel method initTabPanel.
protected void initTabPanel(Form mainForm) {
List<ITab> tabs = createTabs();
TabbedPanel<ITab> tabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, parentPage, tabs, new TabbedPanel.RightSideItemProvider() {
@Override
public Component createRightSideItem(String id) {
VisibleEnableBehaviour boxEnabled = new VisibleEnableBehaviour() {
@Override
public boolean isEnabled() {
return !parentPage.isEdit();
}
};
TaskShowAdvancedFeaturesPanel advancedFeaturesPanel = new TaskShowAdvancedFeaturesPanel(id, showAdvancedFeaturesModel, boxEnabled) {
@Override
protected void onAdvancedFeaturesUpdate(AjaxRequestTarget target) {
target.add(getTabPanel());
target.add(getButtonPanel());
// we DO NOT call parentPage.refresh here because in edit mode this would erase any model changes
// (well, because - for some strange reasons - even this code erases name and description input fields
// occassionally, we hide 'advanced features' checkbox in editing mode)
}
};
advancedFeaturesPanel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
// we don't distinguish between basic/advanced features for other task types yet
return parentPage.getTaskDto().isWorkflow();
}
});
return advancedFeaturesPanel;
}
});
mainForm.add(tabPanel);
}
use of com.evolveum.midpoint.web.component.TabbedPanel in project midpoint by Evolveum.
the class MultivalueContainerDetailsPanel method initLayout.
private void initLayout() {
List<ITab> tabs = createTabs();
if (isAddDefaultPanel) {
tabs.add(0, addBasicContainerValuePanel());
}
TabbedPanel tabbedPanel = WebComponentUtil.createTabPanel(ID_DETAILS, getPageBase(), tabs, null);
tabbedPanel.setOutputMarkupId(true);
add(tabbedPanel);
DisplayNamePanel<C> displayNamePanel = createDisplayNamePanel(ID_DISPLAY_NAME);
displayNamePanel.setOutputMarkupId(true);
add(displayNamePanel);
}
use of com.evolveum.midpoint.web.component.TabbedPanel in project midpoint by Evolveum.
the class PageCertDefinition method initTabs.
private void initTabs(Form mainForm) {
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(createStringResource("PageCertDefinition.basic")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new DefinitionBasicPanel(panelId, definitionModel);
}
});
tabs.add(new AbstractTab(createStringResource("PageCertDefinition.scopeDefinition")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new DefinitionScopePanel(panelId, new PropertyModel<>(definitionModel, CertDefinitionDto.F_SCOPE_DEFINITION));
}
});
tabs.add(new CountablePanelTab(createStringResource("PageCertDefinition.stagesDefinition")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new DefinitionStagesPanel(panelId, new PropertyModel<>(definitionModel, CertDefinitionDto.F_STAGE_DEFINITION), PageCertDefinition.this);
}
@Override
public String getCount() {
return String.valueOf(definitionModel.getObject().getNumberOfStages());
}
});
tabs.add(new AbstractTab(createStringResource("PageCertDefinition.xmlDefinition")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
return new DefinitionXmlPanel(panelId, definitionModel);
}
});
TabbedPanel tabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
mainForm.add(tabPanel);
}
use of com.evolveum.midpoint.web.component.TabbedPanel 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);
}
Aggregations