use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.
the class TaskMainPanel method createOperationTab.
private void createOperationTab(List<ITab> tabs, PageTask parentPage) {
ObjectTabVisibleBehavior<TaskType> operationTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_OPERATION_URL, parentPage) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return super.isVisible() && parentPage.getTaskTabVisibilty().isOperationVisible();
}
};
tabs.add(new PanelTab(parentPage.createStringResource("pageTaskEdit.operation"), operationTabVisibility) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new TaskOperationTabPanel(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), TaskType.F_MODEL_OPERATION_CONTEXT));
}
});
}
use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.
the class TaskMainPanel method createSubtasksTab.
// private void createCleanupPoliciesTab(List<ITab> tabs, PageTask parentPage) {
// ObjectTabVisibleBehavior<TaskType> cleanupPoliciesTabVisibility = new ObjectTabVisibleBehavior<TaskType>
// (Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_CLEANUP_POLICIES_URL, parentPage) {
//
// private static final long serialVersionUID = 1L;
//
// @Override
// public boolean isVisible() {
// return super.isVisible() && parentPage.getTaskTabVisibilty().isCleanupPolicyVisible();
// }
// };
// tabs.add(new PanelTab(parentPage.createStringResource("pageTask.cleanupPolicies.title"), cleanupPoliciesTabVisibility) {
// private static final long serialVersionUID = 1L;
//
// @Override
// public WebMarkupContainer createPanel(String panelId) {
// ItemVisibilityHandler visibilityHandler = wrapper -> ItemVisibility.AUTO;
// return createContainerPanel(panelId, TaskType.COMPLEX_TYPE,
// PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_CLEANUP_POLICIES)),
// visibilityHandler, getTaskEditabilityHandler());
// }
// });
//
// }
private void createSubtasksTab(List<ITab> tabs, PageTask parentPage) {
ObjectTabVisibleBehavior<TaskType> subtasksTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_SUBTASKS_URL, parentPage) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return super.isVisible() && parentPage.getTaskTabVisibilty().isSubtasksAndThreadsVisible(getTask());
}
};
tabs.add(new PanelTab(parentPage.createStringResource("pageTask.subtasks.title"), subtasksTabVisibility) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new TaskSubtasksAndThreadsTabPanel(panelId, getObjectModel(), rootTaskModel);
}
});
}
use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.
the class TaskMainPanel method createInternalPerformanceTab.
private void createInternalPerformanceTab(List<ITab> tabs, PageTask parentPage) {
ObjectTabVisibleBehavior<TaskType> internalPerfTabsVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_INTERNAL_PERFORMANCE_URL, parentPage) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return super.isVisible() && parentPage.getTaskTabVisibilty().isInternalPerformanceVisible();
}
};
tabs.add(new PanelTab(parentPage.createStringResource("pageTask.internalPerformance.title"), internalPerfTabsVisibility) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new TaskInternalPerformanceTabPanel(panelId, getObjectModel());
}
});
}
use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.
the class TaskMainPanel method createBasicPanel.
private void createBasicPanel(List<ITab> tabs, PageTask parentPage) {
ObjectTabVisibleBehavior<TaskType> basicTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_BASIC_URL, parentPage) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return super.isVisible() && parentPage.getTaskTabVisibilty().isBasicVisible();
}
};
tabs.add(new PanelTab(parentPage.createStringResource("pageTask.basic.title"), basicTabVisibility) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new TaskBasicTabPanel(panelId, getObjectModel()) {
@Override
protected void updateHandlerPerformed(AjaxRequestTarget target) {
parentPage.refresh(target);
}
};
}
});
}
use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.
the class TaskMainPanel method createResultTab.
private void createResultTab(List<ITab> tabs, PageTask parentPage) {
ObjectTabVisibleBehavior<TaskType> resultTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_RESULT_URL, parentPage) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return super.isVisible() && parentPage.getTaskTabVisibilty().isResultVisible();
}
};
tabs.add(new PanelTab(parentPage.createStringResource("pageTask.result.title"), resultTabVisibility) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new TaskResultTabPanel(panelId, getObjectModel());
}
});
}
Aggregations