/** * The base page is built with an empty panel in the page-header section that can be filled by * subclasses calling this method * * @param component The component to be placed at the bottom of the page-header section. The * component must have "page-header" id */ protected void setHeaderPanel(Component component) { if (!HEADER_PANEL.equals(component.getId())) throw new IllegalArgumentException( "The header panel component must have 'headerPanel' id"); remove(HEADER_PANEL); add(component); }
/** * The base page is built with an empty panel in the page-header section that can be filled by * subclasses calling this method * * @param component * The component to be placed at the bottom of the page-header section. The component * must have "page-header" id */ protected void setHeaderPanel(Component component) { if (!HEADER_PANEL.equals(component.getId())) throw new IllegalArgumentException( "The header panel component must have 'headerPanel' id"); remove(HEADER_PANEL); add(component); }
ResourceReference ref = csscontrib.getCSS(); if (ref != null) { add(HeaderContributor.forCss(ref)); add(HeaderContributor.forJavaScript(ref)); add(new ExternalLink("faviconLink", faviconUrl, null)); add(new Label("pageTitle", getPageTitle())); add(loginForm); final Authentication user = GeoServerSession.get().getAuthentication(); final boolean anonymous = user == null || user instanceof AnonymousAuthenticationToken; add(logoutForm); logoutForm.add(new Label("username", anonymous ? "Nobody" : user.getName())); .add( new Label( "label", new StringResourceModel( "home", (Component)null, null ) ) ) ); add(devToolbar); devToolbar.setVisible(Application.DEVELOPMENT.equalsIgnoreCase( getApplication().getConfigurationType())); add(new ListView("category", categories){ public void populateItem(ListItem item){ Category category = (Category)item.getModelObject(); add(new ListView("standalone", standalone){ public void populateItem(ListItem item){
add(new ExternalLink("faviconLink", faviconUrl, null)); add( new Label( "pageTitle", add( new ListView<LoginFormInfo>("loginforms", loginforms) { public void populateItem(ListItem<LoginFormInfo> item) { loggedInAsForm.add(new Label("loggedInUsername", anonymous ? "Nobody" : user.getName())); loggedInAsForm.setVisible(!anonymous); add(loggedInAsForm); add( new ListView<LogoutFormInfo>("logoutforms", logoutforms) { public void populateItem(ListItem<LogoutFormInfo> item) { add( new BookmarkablePageLink("home", GeoServerHomePage.class) .add( add(devToolbar); devToolbar.setVisible( RuntimeConfigurationType.DEVELOPMENT.equals( add( new ListView<Category>("category", categories) { public void populateItem(ListItem<Category> item) {