Package org.zeroexchange.web.navigation.breadcrumb

Examples of org.zeroexchange.web.navigation.breadcrumb.Breadcrumb


        ListView<Breadcrumb> breadcrumbsView = new ListView<Breadcrumb>("breadcrumbsItems", path) {
            private static final long serialVersionUID = 1L;

            @Override
            protected void populateItem(ListItem<Breadcrumb> item) {
                Breadcrumb breadcrumb = item.getModelObject();
                String breadcrumbTitle = getBreadcrumbTitle(breadcrumb);
               
                try {
                    item.add(linkFactory.getLink("breadcrumbLink", breadcrumb.getTarget()).
                            add(new Label("breadcrumbSign", breadcrumbTitle))
                    );
                } catch (BusinessLogicException e) {
                    log.error("Cannot create link component for the breadcrumb", e);
                    throw new BusinessLogicException("Cannot create link component for the breadcrumb", e);
                }
                item.add(new Label("breadcrumbsDivider", BREADCRUMB_DIVIDER).
                          setVisible(breadcrumb.getIndex() > 0));
            }
        };
       
        add(breadcrumbsView);
    }
View Full Code Here


     * Returns to the parameters of the previous 'breadcrumbed' page.
     */
    protected PageTarget getPreviousPage() {
        List<Breadcrumb> breadcrumbs = breadcrumbsStore.getBreadcrumbs();
        for(int i = breadcrumbs.size() - 2; i >= 0; i--){
            Breadcrumb breadcrumb = breadcrumbs.get(i);
            Target target = breadcrumb.getTarget();
            if(target instanceof PageTarget) {
                return (PageTarget) target;
            }
        }
        return null;
View Full Code Here

        if(leftMenu == null) {
            List<Breadcrumb> breadcrumbs = breadcrumbsStore.getBreadcrumbs();
            if(breadcrumbInfoAccessor.isBreadcrumbedPage(currentPageClass) &&
                    !breadcrumbInfoAccessor.isRootPage(currentPageClass)) {
                for(int i = breadcrumbs.size() - 1; i >= 0 && leftMenu == null; i--) {
                    Breadcrumb lastBreadcrumb = breadcrumbs.get(i);
                    if(lastBreadcrumb != null) {
                        leftMenu = menuService.getSubmenu(lastBreadcrumb.getTitleKey());
                    }
                }
            }
        }
        return leftMenu;
View Full Code Here

TOP

Related Classes of org.zeroexchange.web.navigation.breadcrumb.Breadcrumb

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.