public PageInstance getPageInstance(int index) { if(index >= 0) { return getPageInstancePath()[index]; } else { return getPageInstancePath()[getPageInstancePath().length + index]; } }
public Breadcrumbs(Dispatch dispatch) { this(dispatch, dispatch.getPageInstancePath().length); }
public int getClosestSubtreeRootIndex() { PageInstance[] path = getPageInstancePath(); for(int i = path.length - 1; i > 0; i--) { if(path[i].getPage().getActualNavigationRoot() != NavigationRoot.INHERIT) { return i; } } return 0; }
pagePath = new ArrayList<PageInstance>(Arrays.asList(dispatch.getPageInstancePath())); String[] fragments = StringUtils.split(path.substring(subPath.length()), '/');
PageInstance current = dispatch.getPageInstancePath()[i]; sb.append("/"); Page page = current.getPage();
HttpServletRequest request = actionContext.getRequest(); logger.debug("Preparing PageActions"); for(PageInstance page : dispatch.getPageInstancePath()) { if(page.getParent() == null) { logger.debug("Not preparing root");
private void buildTree() { int rootPageIndex = dispatch.getClosestSubtreeRootIndex(); PageInstance[] pageInstances = dispatch.getPageInstancePath(rootPageIndex); if (pageInstances == null || pageInstances.length == 0) { return; null, true, rootSelected, rootGhost); LinkedList<Page> pages = new LinkedList<Page>(); PageInstance[] allInstances = dispatch.getPageInstancePath(); for(int i = 0; i <= rootPageIndex; i++) { pages.add(allInstances[i].getPage());
dispatch.getPageInstancePath().length > 2 && SecurityLogic.hasPermissions( portofinoConfiguration, dispatch.getPageInstance(-2), subject, AccessLevel.EDIT);