use of com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb in project midpoint by Evolveum.
the class PageBase method redirectBack.
public Breadcrumb redirectBack() {
List<Breadcrumb> breadcrumbs = getBreadcrumbs();
if (!canRedirectBack()) {
setResponsePage(getMidpointApplication().getHomePage());
return null;
}
Breadcrumb breadcrumb = breadcrumbs.get(breadcrumbs.size() - 2);
redirectBackToBreadcrumb(breadcrumb);
return breadcrumb;
}
use of com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb in project midpoint by Evolveum.
the class AbstractRoleMainPanel method getPreviousPage.
private Class getPreviousPage(PageAdminObjectDetails<R> parentPage) {
List<Breadcrumb> breadcrumbs = parentPage.getBreadcrumbs();
if (breadcrumbs == null || breadcrumbs.size() < 2) {
return null;
}
Breadcrumb previousBreadcrumb = breadcrumbs.get(breadcrumbs.size() - 2);
Class page = null;
if (previousBreadcrumb instanceof BreadcrumbPageClass) {
page = ((BreadcrumbPageClass) previousBreadcrumb).getPage();
} else if (previousBreadcrumb instanceof BreadcrumbPageInstance) {
page = ((BreadcrumbPageInstance) previousBreadcrumb).getPage().getClass();
}
return page;
}
use of com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb in project midpoint by Evolveum.
the class PageSelfProfile method createBreadcrumb.
@Override
protected void createBreadcrumb() {
super.createBreadcrumb();
Breadcrumb bc = getLastBreadcrumb();
bc.setIcon(new Model("fa fa-user"));
}
use of com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb in project midpoint by Evolveum.
the class CaseWorkItemListWithDetailsPanel method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
AjaxButton cancelButton = new AjaxButton(ID_CANCEL_BUTTON, createStringResource("MultivalueContainerListPanel.cancelButton")) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
setItemDetailsVisible(false);
cancelItemDetailsPerformed(ajaxRequestTarget);
ajaxRequestTarget.add(CaseWorkItemListWithDetailsPanel.this);
ajaxRequestTarget.add(CaseWorkItemListWithDetailsPanel.this.getPageBase().getFeedbackPanel());
}
};
getDetailsPanelContainer().add(cancelButton);
CaseWorkItemActionsPanel actionsPanel = new CaseWorkItemActionsPanel(ID_CASE_WORK_ITEM_ACTIONS_PANEL, new LoadableModel<>() {
private static final long serialVersionUID = 1L;
@Override
protected CaseWorkItemType load() {
return getDetailsPanelItemsList().size() > 0 ? getDetailsPanelItemsList().get(0).getRealValue() : null;
}
}) {
private static final long serialVersionUID = 1L;
@Override
protected WorkItemDelegationRequestType getDelegationRequest(UserType delegate) {
return super.getDelegationRequest(delegate).comment(WorkItemTypeUtil.getComment(getModelObject()));
}
@Override
protected Component getCustomForm() {
return workItemDetails != null ? workItemDetails.getCustomForm() : null;
}
@Override
protected void afterActionFinished(AjaxRequestTarget target) {
Breadcrumb previousBreadcrumb = getPageBase().getPreviousBreadcrumb();
if (previousBreadcrumb instanceof BreadcrumbPageInstance && ((BreadcrumbPageInstance) previousBreadcrumb).getPage() instanceof PageCaseWorkItem) {
getPageBase().redirectBack(3);
} else {
getPageBase().redirectBack();
}
}
};
actionsPanel.setOutputMarkupId(true);
actionsPanel.add(new VisibleBehaviour(() -> {
CaseWorkItemType workItemSelected = getDetailsPanelItemsList().size() > 0 ? getDetailsPanelItemsList().get(0).getRealValue() : null;
return CaseWorkItemUtil.isCaseWorkItemNotClosed(workItemSelected);
}));
getDetailsPanelContainer().add(actionsPanel);
}
use of com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb in project midpoint by Evolveum.
the class PageAbstractSelfCredentials method createBreadcrumb.
@Override
protected void createBreadcrumb() {
super.createBreadcrumb();
Breadcrumb bc = getLastBreadcrumb();
bc.setIcon(new Model<>("fa fa-shield"));
}
Aggregations