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

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


  private static final String TEST_LINK = "http://google.com";

  public EnclosurePanel(String id) {
    super(id);
   
    ExternalLink externalLink = new ExternalLink("externalLink", TEST_LINK);
    add(externalLink);
  }
View Full Code Here


    private String licenseUrl;

    public InfoModalPage() {
        super();

        add(new ExternalLink("syncopeLink", siteUrl));
        add(new ExternalLink("licenseLink", licenseUrl));
        add(new Label("version", SyncopeSession.get().getVersion()));
    }
View Full Code Here

    public static WebMarkupContainer getJexlHelpWebContainer(final String wicketId) {
        final WebMarkupContainer jexlHelp = new WebMarkupContainer(wicketId);
        jexlHelp.setVisible(false);
        jexlHelp.setOutputMarkupPlaceholderTag(true);
        jexlHelp.setOutputMarkupId(true);
        jexlHelp.add(new ExternalLink("jexlLink", JEXL_SYNTAX_URL));
        return jexlHelp;
    }
View Full Code Here

                addLink.setVisible(false);
            }
           
            if (node.getDocType() == SiteTreeNode.FileType.Link)
            {
                ExternalLink viewLink = new ExternalLink("view", new Model(getDocument().getUrl()), new ResourceModel("common.view"))
                {
                    @Override
                    protected void onComponentTag(ComponentTag tag)
                    {
                        super.onComponentTag(tag);
                       
                        if (tag.getName().equalsIgnoreCase("input") && ((getLabel() != null) && (getLabel().getObject() != null)))
                        {
                            tag.put("value", getDefaultModelObjectAsString(getLabel().getObject()));
                        }
                    }
                };
                viewLink.setPopupSettings(new PopupSettings());
                infoForm.add(viewLink);
            }
            else
            {
                RequestContext context = (RequestContext) getPortletRequest().getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
                String basePath = context.getPortalURL().getBasePath().replace("portal", "configure");
                ExternalLink viewLink = new ExternalLink("view", new Model(basePath + getDocument().getPath()), new ResourceModel("common.view"))
                {
                    @Override
                    protected void onComponentTag(ComponentTag tag)
                    {
                        super.onComponentTag(tag);
                       
                        if (tag.getName().equalsIgnoreCase("input") && ((getLabel() != null) && (getLabel().getObject() != null)))
                        {
                            tag.put("value", getDefaultModelObjectAsString(getLabel().getObject()));
                        }
                    }
                };
                viewLink.setPopupSettings(new PopupSettings());
                infoForm.add(viewLink);
            }

            infoForm.add(new AjaxButton("remove",new ResourceModel("common.remove"),infoForm)
            {
View Full Code Here

  private static final String TEST_LINK = "http://google.com";

  public EnclosurePanel(String id) {
    super(id);
   
    ExternalLink externalLink = new ExternalLink("externalLink", TEST_LINK);
    add(externalLink);
  }
View Full Code Here

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

        }
    }

    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

    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

                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

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

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.