Examples of ExternalLink


Examples of org.apache.wicket.markup.html.link.ExternalLink

        }
    }

    private void addHomePageLinkAndApplicationName() {
        // this is a bit hacky, but it'll do...
        ExternalLink homePageLink = new ExternalLink(ID_HOME_PAGE_LINK, "/wicket/");
        homePageLink.setContextRelative(true);
        themeDiv.add(homePageLink);
        homePageLink.add(new Label(ID_APPLICATION_NAME, applicationName));
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

    definition = new Label("definition", mDefinition);
    definition.setOutputMarkupId(true);
    definition.setEscapeModelStrings(false);
    body.add(definition);

    link = new ExternalLink("wordnikLink", new Model<String>(""));
    link.setOutputMarkupId(true);
    body.add(link);

    Form<Void> toolbarForm = new Form<Void>("toolbarForm");
    add(toolbarForm);
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

                String imageName = item.getModelObject();
                imageParameters.set("name", imageName);
               
                // generates nice looking url (the mounted one) to the current image
                CharSequence urlForWordAsImage = getRequestCycle().urlFor(imagesResourceReference, imageParameters);
                ExternalLink link = new ExternalLink("link", urlForWordAsImage.toString());
                link.setBody(Model.of(imageName));
                item.add(link);
               
            }
        };
        add(listView);
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

    // Popup example
    add(new BookmarkablePageLink<Void>("popupButtonLink", Popup.class).setPopupSettings(popupSettings));

    // External site link
    add(new ExternalLink("google", "http://www.google.com", "Click this link to go to Google"));

    // And that link as a popup
    PopupSettings googlePopupSettings = new PopupSettings(PopupSettings.RESIZABLE |
      PopupSettings.SCROLLBARS).setHeight(500).setWidth(700);
    add(new ExternalLink("googlePopup", "http://www.google.com",
      "Click this link to go to Google in a popup").setPopupSettings(googlePopupSettings));

    // Shared resource link
    add(new ResourceLink("cancelButtonLink", new SharedResourceReference("cancelButton")));
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

                    return new Label(id, property.getModel(itemModel));
                } else if (property == COMMON) {
                    // openlayers preview
                    Fragment f = new Fragment(id, "commonLinks", MapPreviewPage.this);
                    final String olUrl = layer.getWmsLink() + "&format=application/openlayers";
                    f.add(new ExternalLink("ol", olUrl, "OpenLayers"));
                   
                    // kml preview
                    final String kmlUrl = "../wms/kml?layers=" + layer.getName();
                    f.add(new ExternalLink("kml", kmlUrl, "KML"));
                   
                    // gml preview (we actually want it only for vector layers)
                    final String gmlUrl =
                        "../ows?service=WFS&version=1.0.0&request=GetFeature&typeName="
                        + layer.getName() + "&maxFeatures=50";
                    Component gmlLink = new ExternalLink("gml", gmlUrl, "GML");
                    f.add(gmlLink);
                    gmlLink.setVisible(layer.getType() == PreviewLayerType.Vector);
                   
                    return f;
                } else if (property == ALL) {
                    return buildJSWMSSelect(id, wmsOutputFormats, wfsOutputFormats, layer);
                }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

                        return new Label(id, "");
                    }
                } else if(property == COMMANDS) {
                    Fragment f = new Fragment(id, "preview", ImportSummaryPage.this);

                    ExternalLink link = new ExternalLink("preview", "#");
                    if(layerSummary.getStatus().successful()) {
                        // TODO: move the preview link generation ability to some utility object
                        PreviewLayer preview = new PreviewLayer(layer);
                        String url = "window.open(\"" + preview.getWmsLink() + "&format=application/openlayers\")";
                        link.add(new AttributeAppender("onclick", new Model(url), ";"));
                    } else {
                        link.setEnabled(false);
                    }
                    f.add(link);
                   
                    return f;
                }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

    public GeoServerHomePage() {
        GeoServer gs = getGeoServer();
        ContactInfo contact = gs.getGlobal().getContact();

        //add some contact info
        add(new ExternalLink("contactURL", contact.getOnlineResource())
            .add( new Label("contactName", contact.getContactOrganization())));
        {
            String version = String.valueOf(new ResourceModel("version").getObject());
            String contactEmail = contact.getContactEmail();
            HashMap<String, String>params = new HashMap<String, String>();
            params.put("version", version);
            params.put("contactEmail", contactEmail);
            Label label = new Label("footerMessage", new StringResourceModel("GeoServerHomePage.footer", this, new Model(params)));
            label.setEscapeModelStrings(false);
            add(label);
        }
       
        Authentication auth = getSession().getAuthentication();
        if(isAdmin(auth)) {
            Fragment f = new Fragment("catalogLinks", "catalogLinksFragment", this);
            Catalog catalog = getCatalog();
            f.add(new BookmarkablePageLink("layersLink", LayerPage.class)
                .add(new Label( "nlayers", ""+catalog.getLayers().size())));
            f.add(new BookmarkablePageLink("addLayerLink", NewLayerPage.class));
           
            f.add(new BookmarkablePageLink("storesLink",StorePage.class)
                .add(new Label( "nstores", ""+catalog.getStores(StoreInfo.class).size())));
            f.add(new BookmarkablePageLink("addStoreLink", NewDataPage.class));
           
            f.add(new BookmarkablePageLink("workspacesLink",WorkspacePage.class)
                .add(new Label( "nworkspaces", ""+catalog.getWorkspaces().size())));
            f.add(new BookmarkablePageLink("addWorkspaceLink", WorkspaceNewPage.class));
            add(f);
        } else {
            Label placeHolder = new Label("catalogLinks");
            placeHolder.setVisible(false);
            add(placeHolder);
        }
       
        // when hacking this service listing code please refer to
        // http://jira.codehaus.org/browse/GEOS-2114
        ListView view = new ListView("services", getServices()) {
            @Override
            protected void populateItem(ListItem item) {
                ServiceInfo service = (ServiceInfo) item.getModelObject();
                final String serviceId = service.getId();
                item.add( new Label("service", service.getId().toUpperCase()) );
                item.add( new ListView( "versions", service.getVersions()) {
                    @Override
                    protected void populateItem(ListItem item) {
                        Version version = (Version) item.getModelObject();
                        ExternalLink link = new ExternalLink("link", "../ows?service=" + serviceId
                                + "&version=" + version.toString() + "&request=GetCapabilities");
                        item.add( link );
                       
                        link.add( new Label( "version", version.toString() ) );
                    }
                });
            }
        };
        add(view);
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

    }

    public SimpleExternalLink(String id, IModel linkModel, IModel labelModel) {
        super(id, linkModel);
       
        add(link = new ExternalLink("link", linkModel));
        link.add(label = new Label("label", labelModel));
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

        add(new WebMarkupContainer("loggedOut").setVisible(!trace));

        WebMarkupContainer wmc = new WebMarkupContainer("trace-explanation");
        wmc.setVisible(trace);
        wmc.add(new ExternalLink(
                    "jiraLink",
                    new Model("http://jira.codehaus.org/browse/GEOS/"),
                    new ResourceModel("GeoServerErrorPage.jiraName")
                    ).setVisible(trace)
       );
View Full Code Here

Examples of org.apache.wicket.markup.html.link.ExternalLink

        // favicon
        if(faviconReference == null) {
            faviconReference = new ResourceReference(GeoServerBasePage.class, "favicon.ico");
        }
        String faviconUrl = RequestCycle.get().urlFor(faviconReference).toString();
        add(new ExternalLink("faviconLink", faviconUrl, null));
     
      // page title
      add(new Label("pageTitle", getPageTitle()));

        // login form
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.