use of com.evolveum.midpoint.gui.impl.component.data.column.PrismReferenceWrapperColumn in project midpoint by Evolveum.
the class ObjectPolicyConfigurationTabPanel method initBasicColumns.
private List<IColumn<PrismContainerValueWrapper<ObjectPolicyConfigurationType>, String>> initBasicColumns() {
List<IColumn<PrismContainerValueWrapper<ObjectPolicyConfigurationType>, String>> columns = new ArrayList<>();
columns.add(new CheckBoxHeaderColumn<>());
columns.add(new PrismPropertyWrapperColumn<ObjectPolicyConfigurationType, QName>(getModel(), ObjectPolicyConfigurationType.F_TYPE, ColumnType.LINK, getPageBase()) {
private static final long serialVersionUID = 1L;
@Override
protected void onClick(AjaxRequestTarget target, IModel<PrismContainerValueWrapper<ObjectPolicyConfigurationType>> rowModel) {
getMultivalueContainerListPanel().itemDetailsPerformed(target, rowModel);
}
@Override
public String getCssClass() {
return " col-lg-1 col-md-2 ";
}
});
columns.add(new PrismPropertyWrapperColumn(getModel(), ObjectPolicyConfigurationType.F_SUBTYPE, ColumnType.VALUE, getPageBase()) {
@Override
public String getCssClass() {
return " col-md-2 ";
}
});
columns.add(new PrismReferenceWrapperColumn(getModel(), ObjectPolicyConfigurationType.F_OBJECT_TEMPLATE_REF, ColumnType.VALUE, getPageBase()));
columns.add(new PrismReferenceWrapperColumn(getModel(), ItemPath.create(ObjectPolicyConfigurationType.F_APPLICABLE_POLICIES, ApplicablePoliciesType.F_POLICY_GROUP_REF), ColumnType.VALUE, getPageBase()));
columns.add(new PrismContainerWrapperColumn<ObjectPolicyConfigurationType>(getModel(), ItemPath.create(ObjectPolicyConfigurationType.F_LIFECYCLE_STATE_MODEL, LifecycleStateModelType.F_STATE), getPageBase()) {
@Override
public String getCssClass() {
return " col-md-2 ";
}
});
List<InlineMenuItem> menuActionsList = getMultivalueContainerListPanel().getDefaultMenuActions();
columns.add(new InlineMenuButtonColumn(menuActionsList, getPageBase()) {
@Override
public String getCssClass() {
return " col-md-1 ";
}
});
return columns;
}
use of com.evolveum.midpoint.gui.impl.component.data.column.PrismReferenceWrapperColumn in project midpoint by Evolveum.
the class FocusProjectionsTabPanel method initBasicColumns.
private List<IColumn<PrismContainerValueWrapper<ShadowType>, String>> initBasicColumns() {
IModel<PrismContainerDefinition<ShadowType>> shadowDef = Model.of(getShadowDefinition());
List<IColumn<PrismContainerValueWrapper<ShadowType>, String>> columns = new ArrayList<>();
columns.add(new CheckBoxHeaderColumn<>());
columns.add(new CompositedIconColumn<PrismContainerValueWrapper<ShadowType>>(Model.of("")) {
private static final long serialVersionUID = 1L;
@Override
protected CompositedIcon getCompositedIcon(IModel<PrismContainerValueWrapper<ShadowType>> rowModel) {
if (rowModel == null || rowModel.getObject() == null || rowModel.getObject().getRealValue() == null) {
return new CompositedIconBuilder().build();
}
ShadowType shadow = createShadowType(rowModel);
return WebComponentUtil.createAccountIcon(shadow, getPageBase(), true);
}
});
columns.add(new PrismPropertyWrapperColumn<ShadowType, String>(shadowDef, ShadowType.F_NAME, ColumnType.LINK, getPageBase()) {
private static final long serialVersionUID = 1L;
@Override
protected void onClick(AjaxRequestTarget target, IModel<PrismContainerValueWrapper<ShadowType>> rowModel) {
getMultivalueContainerListPanel().itemDetailsPerformed(target, rowModel);
target.add(getFeedbackPanel());
}
});
columns.add(new PrismReferenceWrapperColumn<>(shadowDef, ShadowType.F_RESOURCE_REF, ColumnType.STRING, getPageBase()));
columns.add(new PrismPropertyWrapperColumn<ShadowType, String>(shadowDef, ShadowType.F_OBJECT_CLASS, ColumnType.STRING, getPageBase()));
columns.add(new PrismPropertyWrapperColumn<ShadowType, String>(shadowDef, ShadowType.F_KIND, ColumnType.STRING, getPageBase()) {
@Override
public String getCssClass() {
return "col-xs-1";
}
});
columns.add(new PrismPropertyWrapperColumn<ShadowType, String>(shadowDef, ShadowType.F_INTENT, ColumnType.STRING, getPageBase()) {
@Override
public String getCssClass() {
return "col-xs-1";
}
});
columns.add(new PrismContainerWrapperColumn<ShadowType>(shadowDef, ShadowType.F_PENDING_OPERATION, getPageBase()) {
@Override
public String getCssClass() {
return "col-xs-2";
}
@Override
protected <IW extends ItemWrapper> Component createColumnPanel(String componentId, IModel<IW> rowModel) {
IW object = rowModel.getObject();
if (object == null) {
return new WebMarkupContainer(componentId);
}
List<PrismValueWrapper<PendingOperationType>> values = object.getValues();
List<PendingOperationType> pendingOperations = new ArrayList<>();
values.forEach(value -> pendingOperations.add(value.getRealValue()));
return new PendingOperationPanel(componentId, (IModel<List<PendingOperationType>>) () -> pendingOperations);
}
});
columns.add(new InlineMenuButtonColumn(createShadowMenu(), getPageBase()) {
@Override
public String getCssClass() {
return "col-xs-1";
}
});
return columns;
}
Aggregations