use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class AssignmentsDetailsPanel method createConditionTab.
private PanelTab createConditionTab() {
return new PanelTab(createStringResource("AssignmentType.condition")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new SingleContainerPanel<>(panelId, PrismContainerWrapperModel.fromContainerValueWrapper(getModel(), AssignmentType.F_CONDITION), MappingType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
ItemPath assignmentConditionExpressionPath = ItemPath.create(AssignmentHolderType.F_ASSIGNMENT, AssignmentType.F_CONDITION, MappingType.F_EXPRESSION);
ItemPath inducementConditionExpressionPath = ItemPath.create(AbstractRoleType.F_INDUCEMENT, AssignmentType.F_CONDITION, MappingType.F_EXPRESSION);
ItemPath itemPath = itemWrapper.getPath();
if (itemPath.namedSegmentsOnly().equivalent(assignmentConditionExpressionPath) || itemPath.namedSegmentsOnly().equivalent(inducementConditionExpressionPath)) {
return ItemVisibility.AUTO;
} else {
return ItemVisibility.HIDDEN;
}
}
};
}
};
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class AssignmentConstructionPanel method initLayout.
private void initLayout() {
SingleContainerPanel<ConstructionType> baseConstructionPanel = new SingleContainerPanel<>(ID_BASIC, getModel(), ConstructionType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
ItemPath itemPath = itemWrapper.getPath();
if (isAssociation(itemPath)) {
return ItemVisibility.HIDDEN;
}
if (isAttributePath(itemPath)) {
return ItemVisibility.HIDDEN;
}
if (ConstructionType.F_KIND.equivalent(itemPath.lastName())) {
return ItemVisibility.HIDDEN;
}
if (ConstructionType.F_INTENT.equivalent(itemPath.lastName())) {
return ItemVisibility.HIDDEN;
}
if (ConstructionType.F_RESOURCE_REF.equivalent(itemPath.lastName())) {
return ItemVisibility.HIDDEN;
}
return ItemVisibility.AUTO;
}
};
add(baseConstructionPanel);
ResourceAttributePanel attrsPanel = new ResourceAttributePanel(ID_ATTRIBUTES, PrismContainerWrapperModel.fromContainerWrapper(getModel(), ConstructionType.F_ATTRIBUTE), null);
add(attrsPanel);
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class LoggingContentPanel method initLayout.
@Override
protected void initLayout() {
SingleContainerPanel panel = new SingleContainerPanel(ID_MAIN_PANEL, PrismContainerWrapperModel.fromContainerWrapper(getObjectWrapperModel(), ItemPath.create(SystemConfigurationType.F_LOGGING)), LoggingConfigurationType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
ItemPath path = itemWrapper.getPath();
if (path == null || path.isEmpty()) {
return ItemVisibility.AUTO;
}
QName name;
if (path.size() == 1) {
name = path.firstToQName();
} else {
name = path.rest().firstToQName();
}
boolean hide = LoggingConfigurationType.F_CLASS_LOGGER.equals(name) || LoggingConfigurationType.F_SUB_SYSTEM_LOGGER.equals(name) || LoggingConfigurationType.F_APPENDER.equals(name);
return hide ? ItemVisibility.HIDDEN : ItemVisibility.AUTO;
}
};
add(panel);
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class ObjectCollectionDefaultViewPanel method initLayout.
@Override
protected void initLayout() {
SingleContainerPanel panel = new SingleContainerPanel<>(ID_PANEL, PrismContainerWrapperModel.fromContainerWrapper(getObjectWrapperModel(), ObjectCollectionType.F_DEFAULT_VIEW), GuiObjectListViewType.COMPLEX_TYPE);
add(panel);
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class MessageTemplateContentPanel method initLayout.
@Override
protected void initLayout() {
SingleContainerPanel panel = new SingleContainerPanel(ID_MAIN_PANEL, PrismContainerWrapperModel.fromContainerWrapper(getObjectWrapperModel(), ItemPath.create(MessageTemplateType.F_DEFAULT_CONTENT)), MessageTemplateContentType.COMPLEX_TYPE);
add(panel);
}
Aggregations