use of com.evolveum.midpoint.gui.api.prism.wrapper.ItemEditabilityHandler in project midpoint by Evolveum.
the class TaskBasicPanel method initLayout.
protected void initLayout() {
SingleContainerPanel mainPanel = new SingleContainerPanel(ID_MAIN_PANEL, getObjectWrapperModel(), getPanelConfiguration()) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
return getBasicTabVisibility(itemWrapper.getPath());
}
@Override
protected ItemEditabilityHandler getEditabilityHandler() {
return wrapper -> getBasicTabEditability(wrapper.getPath());
}
@Override
protected IModel<PrismContainerWrapper> createVirtualContainerModel(VirtualContainersSpecificationType virtualContainer) {
if (isDeprecatedVirtualContainer(virtualContainer)) {
return null;
}
return super.createVirtualContainerModel(virtualContainer);
}
};
add(mainPanel);
}
use of com.evolveum.midpoint.gui.api.prism.wrapper.ItemEditabilityHandler in project midpoint by Evolveum.
the class TaskMainPanel method createScheduleTab.
private void createScheduleTab(List<ITab> tabs, PageTask parentPage) {
ObjectTabVisibleBehavior<TaskType> scheduleTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_SCHEDULE_URL, parentPage) {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return super.isVisible() && parentPage.getTaskTabVisibilty().isSchedulingVisible();
}
};
tabs.add(new PanelTab(parentPage.createStringResource("pageTask.schedule.title"), scheduleTabVisibility) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new SingleContainerPanel<ScheduleType>(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), TaskType.F_SCHEDULE), ScheduleType.COMPLEX_TYPE) {
@Override
protected ItemEditabilityHandler getEditabilityHandler() {
return TaskMainPanel.this.getTaskEditabilityHandler();
}
};
}
});
}
Aggregations