Package org.apache.wicket.markup.html.link

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


                        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

    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

    }

    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

        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

        // 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

          params.add("tab", "File Manager");
          setResponsePage(ConfigPage.class, params)
        }
    });
   
    add(new ExternalLink("ganglia_link", app.getGangliaUrl()));
   
    add(new ExternalLink("contact_link", "mailto:"+((OpsuiApp)getApplication()).getEmailContactLink()));
  }
View Full Code Here

        setResponsePage(WorkflowInstanceViewerPage.class, params);
       
      }
    });
   
    add(new ExternalLink("ganglia_link", app.getGangliaUrl()));
   
    add(new Link("config_link"){
      /* (non-Javadoc)
       * @see org.apache.wicket.markup.html.link.Link#onClick()
       */
 
View Full Code Here

            filePath = new File(new URI(r.getDataStoreReference()))
                .getAbsolutePath();
          } catch (Exception ignore) {
          }
         
          ExternalLink refLink = new ExternalLink("ref_file_path_link",
              "/" + app.getRootContext() + "/data?productID="+productId);
          refLink.add(new Label("ref_file_path", filePath));
          refItem.add(refLink);
          refItem.add(new Label("ref_file_size",
              String.valueOf(r.getFileSize())));
          try {
            refItem.add(new Label("ref_pct_transferred", NumberFormat
View Full Code Here

      protected void populateItem(ListItem item) {

        String qxri = item.getModelObjectAsString();
        String hxri = ((OpenXRIAdminApplication) this.getApplication()).getProperties().getProperty("hxri-prefix") + qxri;

        ExternalLink link = new ExternalLink("hxri", hxri);
        link.add(new Label("qxri", qxri));
        item.add(link);
      }
    });

    this.add(new PageLink("createSubSegmentLink", new IPageLink() {

      private static final long serialVersionUID = 2192286434779574430L;

      public Page getPage() {

        return(new CreateSubSegment(AuthorityDetails.this.authority));
      }

      public Class<?> getPageIdentity() {

        return(CreateSubSegment.class);
      }
    }));

    this.add(new PageLink("createAliasSubSegmentLink", new IPageLink() {

      private static final long serialVersionUID = -1394803236007989039L;

      public Page getPage() {

        return(new CreateAliasSubSegment(AuthorityDetails.this.authority));
      }

      public Class<?> getPageIdentity() {

        return(CreateAliasSubSegment.class);
      }
    }));

    this.add(new ListView("subSegments") {

      private static final long serialVersionUID = 8793019471745319174L;

      @Override
      protected void populateItem(ListItem item) {

        final SubSegment subSegment = (SubSegment) item.getModelObject();

        PageLink link = new PageLink("link", new IPageLink() {

          private static final long serialVersionUID = 4182879013901656829L;

          public Page getPage() {

            return(new SubSegmentDetails(subSegment));
          }

          public Class<?> getPageIdentity() {

            return(SubSegmentDetails.class);
          }
        });
        link.add(new Label("name", subSegment.getName()));
        item.add(link);
      }
    });
    this.add(new ListView("childSubSegments") {

      private static final long serialVersionUID = 1273612869821409740L;

      @Override
      protected void populateItem(ListItem item) {

        final SubSegment subSegment = (SubSegment) item.getModelObject();

        PageLink link = new PageLink("link", new IPageLink() {

          private static final long serialVersionUID = -1232152334705755201L;

          public Page getPage() {

            return(new SubSegmentDetails(subSegment));
          }

          public Class<?> getPageIdentity() {

            return(SubSegmentDetails.class);
          }
        });
        link.add(new Label("name", subSegment.getName()));
        item.add(link);
      }
    });
    this.add(new XrdForm("xrdForm"));
    this.add(new TemplateForm("templateForm"));
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.link.ExternalLink

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.