Is there a way to mix bread crumb and normal links.  I don't want the
normal links to append a crumb to the bread crumb bar, but I want the
bread crumb bar to remain on the page.  I have a home page with a
bread crumb link to my modified version of the navomatic example.
Following that link I get a bread crumb bar "Home / Navomatic".  I
want that bar to remain constant as I click the Page1, Page2, and
Page3 navomatic links.  The Home link works on the initial Navomatic
page, but after I follow one of the navomatic links the home link
breaks (it updates the bread crumb bar correctly to "Home", but
doesn't change the content panel to the home page).  I noticed that
the link changes after I click on one of the navomatic links...

?wicket:interface=:0:breadCrumbBar:crumbs:0:crumb:link:9:ILinkListener::
?wicket:interface=:18:breadCrumbBar:crumbs:0:crumb:link::ILinkListener::

Here are some code snippets...

HomePage extends WebPage
                BreadCrumbBar breadCrumbBar = new 
BreadCrumbBar("breadCrumbBar");
                BreadCrumbPanel contentPanel = new HomePanel(CONTENT_PANEL, 
breadCrumbBar);
                breadCrumbBar.setActive(contentPanel);
                add(breadCrumbBar);
                add(contentPanel);

HomePanel extends BreadCrumbPanel
               add(new BreadCrumbPanelLink("navomatic", this, Page1.class));

Page1 extends NavomaticPanel

NavomaticPanel extends BreadCrumbPanel
        public NavomaticPanel(String id, IBreadCrumbModel breadCrumbModel) {
                super(id, breadCrumbModel);
                final BreadCrumbBar breadCrumbBar = (BreadCrumbBar) 
breadCrumbModel;
                List<Link> links = new LinkedList<Link>();
                links.add(link("page1Link", breadCrumbBar, Page1.class));
                links.add(link("page2Link", breadCrumbBar, Page2.class));
                links.add(link("page3Link", breadCrumbBar, Page3.class));
                add(new NavomaticBorder("navomaticBorder", links));
        }

        private static Link link(final String id, final BreadCrumbBar
breadCrumbBar, final Class<? extends NavomaticPanel> panelClass) {
                return new Link(id) {
                        public void onClick() {
                                setResponsePage(new 
NavomaticPage(breadCrumbBar, panelClass));
                        }
                };
        }

NavomaticBorder extends Border
                BoxBorder navBorder = new BoxBorder("navigationBorder");
                add(navBorder);
                for (Link link : links) {
                        navBorder.add(link);
                }

NavomaticPage extends WebPage
                        add(breadCrumbBar);
                        Constructor<? extends NavomaticPanel> constructor =
panelClass.getConstructor(String.class, IBreadCrumbModel.class);
                        NavomaticPanel contentPanel =
constructor.newInstance(CONTENT_PANEL, breadCrumbBar);
                        add(contentPanel);

-- 
Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to