use of com.evolveum.midpoint.web.page.admin.home.component.MyAssignmentsPanel in project midpoint by Evolveum.
the class PageSelfDashboard method initAssignments.
private void initAssignments() {
AsyncDashboardPanel<Object, List<AssignmentItemDto>> assignedOrgUnits = new AsyncDashboardPanel<Object, List<AssignmentItemDto>>(ID_ASSIGNMENTS, createStringResource("PageDashboard.assignments"), GuiStyleConstants.CLASS_ICON_ASSIGNMENTS, GuiStyleConstants.CLASS_OBJECT_ROLE_BOX_CSS_CLASSES, true) {
private static final long serialVersionUID = 1L;
@Override
protected SecurityContextAwareCallable<CallableResult<List<AssignmentItemDto>>> createCallable(Authentication auth, IModel callableParameterModel) {
return new SecurityContextAwareCallable<CallableResult<List<AssignmentItemDto>>>(getSecurityEnforcer(), auth) {
@Override
public CallableResult<List<AssignmentItemDto>> callWithContextPrepared() throws Exception {
return loadAssignments();
}
};
}
@Override
protected Component getMainComponent(String markupId) {
return new MyAssignmentsPanel(markupId, new PropertyModel<List<AssignmentItemDto>>(getModel(), CallableResult.F_VALUE));
}
};
assignedOrgUnits.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
UserInterfaceElementVisibilityType visibilityType = getComponentVisibility(PredefinedDashboardWidgetId.MY_ASSIGNMENTS);
return WebComponentUtil.getElementVisibility(visibilityType);
}
});
add(assignedOrgUnits);
}
Aggregations