Search in sources :

Example 1 with PrismContainerPanel

use of com.evolveum.midpoint.web.component.prism.PrismContainerPanel 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);
}
Also used : ContainerWrapper(com.evolveum.midpoint.web.component.prism.ContainerWrapper) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ListModel(org.apache.wicket.model.util.ListModel) Model(org.apache.wicket.model.Model) NonEmptyLoadableModel(com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) PrismContainerPanel(com.evolveum.midpoint.web.component.prism.PrismContainerPanel)

Example 2 with PrismContainerPanel

use of com.evolveum.midpoint.web.component.prism.PrismContainerPanel in project midpoint by Evolveum.

the class GenericHandlerPanel method initLayout.

private void initLayout(final PageTaskEdit parentPage) {
    PrismContainerPanel containerPanel = new PrismContainerPanel(ID_CONTAINER, new PropertyModel<>(getModel(), GenericHandlerDto.F_CONTAINER), false, parentPage.getForm(), parentPage);
    add(containerPanel);
}
Also used : PrismContainerPanel(com.evolveum.midpoint.web.component.prism.PrismContainerPanel)

Aggregations

PrismContainerPanel (com.evolveum.midpoint.web.component.prism.PrismContainerPanel)2 NonEmptyLoadableModel (com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel)1 ContainerWrapper (com.evolveum.midpoint.web.component.prism.ContainerWrapper)1 AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 Model (org.apache.wicket.model.Model)1 ListModel (org.apache.wicket.model.util.ListModel)1