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

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


      "Click this link to go to Google in a popup").setPopupSettings(googlePopupSettings));

    // Shared resource link
    add(new ResourceLink<>("cancelButtonLink", new SharedResourceReference("cancelButton")));

    add(new DownloadLink("downloadLink", new AbstractReadOnlyModel<File>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public File getObject()
View Full Code Here


      "Click this link to go to Google in a popup").setPopupSettings(googlePopupSettings));

    // Shared resource link
    add(new ResourceLink<Void>("cancelButtonLink", new SharedResourceReference("cancelButton")));

    add(new DownloadLink("downloadLink", new AbstractReadOnlyModel<File>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public File getObject()
View Full Code Here

    add( new StyleSheetReference( WicketConstants.ID_STYLE_SHEET, AttachmentsComponent.class, "AttachmentsComponent.css" ) );
    add( new ListView<File>( "attachments", new ArrayList<File>( resourceFiles ) ) {
      @Override
      protected void populateItem( @Nonnull ListItem<File> item ) {
        final File file = item.getModelObject();
        DownloadLink link = new DownloadLink( "downloadLink", file );
        item.add( link );
        link.add( new Label( "label", file.getName() ) );
      }
    } );
  }
View Full Code Here

      "Click this link to go to Google in a popup").setPopupSettings(googlePopupSettings));

    // Shared resource link
    add(new ResourceLink<Void>("cancelButtonLink", new SharedResourceReference("cancelButton")));

    add(new DownloadLink("downloadLink", new AbstractReadOnlyModel<File>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public File getObject()
View Full Code Here

    add( new StyleSheetReference( WicketConstants.ID_STYLE_SHEET, AttachmentsComponent.class, "AttachmentsComponent.css" ) );
    add( new ListView<File>( "attachments", new ArrayList<File>( resourceFiles ) ) {
      @Override
      protected void populateItem( @NotNull ListItem<File> item ) {
        final File file = item.getModelObject();
        DownloadLink link = new DownloadLink( "downloadLink", file );
        item.add( link );
        link.add( new Label( "label", file.getName() ) );
      }
    } );
  }
View Full Code Here

    add( new StyleSheetReference( WicketConstants.ID_STYLE_SHEET, AttachmentsComponent.class, "AttachmentsComponent.css" ) );
    add( new ListView<File>( "attachments", new ArrayList<File>( resourceFiles ) ) {
      @Override
      protected void populateItem( @NotNull ListItem<File> item ) {
        final File file = item.getModelObject();
        DownloadLink link = new DownloadLink( "downloadLink", file );
        item.add( link );
        link.add( new Label( "label", file.getName() ) );
      }
    } );
  }
View Full Code Here

        feedback.setOutputMarkupId(true);
        addOrReplace(feedback);

        final LoadableDetachableModel<File> fileModel = new ExcelFileModel(model);
        final String xlsxFileName = xlsxFileNameFor(model);
        final DownloadLink link = new ExcelFileDownloadLink(ID_DOWNLOAD, fileModel, xlsxFileName);
       
        addOrReplace(link);
    }
View Full Code Here

      int row, int column)
  {
    final File f = (File)model.getObject();
    if (f != null && f.exists())
    {
      return new DownloadLink(id, f, f.getName())
      {
        @Override
        protected void onComponentTag(ComponentTag tag)
        {
          tag.setName("a");
View Full Code Here

class LinkPanel extends Panel {

    LinkPanel(String id, IModel<File> file, IModel<String> type, IModel<String> name) {
        super(id);
        add(new DownloadLink("file", file, name).setBody(new FileNameAndFormatAndSizeModel(file, type, name)));
    }
View Full Code Here

        feedback.setOutputMarkupId(true);
        addOrReplace(feedback);

        final LoadableDetachableModel<File> fileModel = new ExcelFileModel(model);
        final String xlsxFileName = xlsxFileNameFor(model);
        final DownloadLink link = new ExcelFileDownloadLink(ID_DOWNLOAD, fileModel, xlsxFileName);
       
        addOrReplace(link);
    }
View Full Code Here

TOP

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

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.