Changeset 6433


Ignore:
Timestamp:
08/11/15 09:42:36 (9 years ago)
Author:
Twan Goosen
Message:

Merged fix for #784 to 3.2 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.2/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/SimpleSearchPage.java

    r6194 r6433  
    2222import eu.clarin.cmdi.vlo.service.solr.FacetFieldsService;
    2323import eu.clarin.cmdi.vlo.wicket.components.SearchForm;
     24import eu.clarin.cmdi.vlo.wicket.model.PermaLinkModel;
    2425import eu.clarin.cmdi.vlo.wicket.panels.SingleFacetPanel;
    2526import eu.clarin.cmdi.vlo.wicket.panels.TopLinksPanel;
     
    6465
    6566        // add an updatable container for breadcrumbs and top links
    66         navigation = new WebMarkupContainer("navigation");
    67         navigation.setOutputMarkupId(true);
     67        navigation = createNavigation("navigation");
    6868        add(navigation);
    69 
    70         navigation.add(new BookmarkablePageLink("breadcrumb", getApplication().getHomePage()));
    71         navigation.add(new TopLinksPanel("topLinks", null));
    7269
    7370        // add a persistenet panel for selection of a value for the collection facet
     
    8885        browse = new SimpleSearchBrowsePanel("browse", getModel());
    8986        add(browse);
     87    }
     88
     89    private WebMarkupContainer createNavigation(String id) {
     90        final WebMarkupContainer container = new WebMarkupContainer(id);
     91        container.setOutputMarkupId(true);
     92        container.add(new BookmarkablePageLink("breadcrumb", getApplication().getHomePage()));
     93        container.add(new TopLinksPanel("topLinks", new PermaLinkModel(getPageClass(), getModel())) {
     94
     95            @Override
     96            protected void onChange(AjaxRequestTarget target) {
     97                if (target != null) {
     98                    target.add(container);
     99                }
     100            }
     101
     102        });
     103        return container;
    90104    }
    91105
Note: See TracChangeset for help on using the changeset viewer.