Skip to content

Commit

Permalink
fix for Back button from self service section
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Apr 3, 2017
1 parent 425a268 commit 3bd2f44
Showing 1 changed file with 12 additions and 9 deletions.
Expand Up @@ -1683,17 +1683,20 @@ public DeploymentInformationType loadDeploymentInformationType() {

public boolean canRedirectBack() {
List<Breadcrumb> breadcrumbs = getBreadcrumbs();
// first is icon (non clickable), last is for "current page" and if there
// is nothing in between then we don't know where to redirect
if (breadcrumbs.size() < getMinimalBreadcrumbsListSize()) {
return false;
if (breadcrumbs.size() > 2) {
return true;
}
if (breadcrumbs.size() == 2){
BreadcrumbPageClass breadcrumb = null;
if ((breadcrumbs.get(breadcrumbs.size() - 2)) instanceof BreadcrumbPageClass){
breadcrumb = (BreadcrumbPageClass) breadcrumbs.get(breadcrumbs.size() - 2);
}
if (breadcrumb != null && breadcrumb.getPage() != null){
return true;
}
}

return true;
}

protected int getMinimalBreadcrumbsListSize(){
return 3;
return false;
}

public Breadcrumb redirectBack() {
Expand Down

0 comments on commit 3bd2f44

Please sign in to comment.