Package org.projectforge.web.wicket.flowlayout

Examples of org.projectforge.web.wicket.flowlayout.FileUploadPanel


        {
          final ReportScriptingStorage storage = getReportScriptingStorage();
          return storage != null ? storage.getLastAddedFilename() : "";
        }
      }));
      fs.add(new FileUploadPanel(fs.newChildId(), fileUploadField));
      final Button uploadButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("upload")) {
        @Override
        public final void onSubmit()
        {
          parentPage.upload();
View Full Code Here


    super.init();
    gridBuilder.newGridPanel();
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("file"), "*.xls");
      fileUploadField = new FileUploadField(FileUploadPanel.WICKET_ID);
      fs.add(new FileUploadPanel(fs.newChildId(), fileUploadField));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("uploadAccounts")) {
        @Override
        public final void onSubmit()
        {
          parentPage.importAccountList();
View Full Code Here

    }
    if ((isNew() == true && right.hasInsertAccess(getUser()) == true) //
        || (right.hasUpdateAccess(getUser(), data, null) == true && right.isLicenseKeyVisible(getUser(), data) == true)) {
      gridBuilder.newSplitPanel(GridSize.COL50);
      FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString("plugins.licensemanagement.file1"));
      fileUploadPanel1 = new FileUploadPanel(fs.newChildId(), fs, this, true, new PropertyModel<String>(data, "filename1"),
          new PropertyModel<byte[]>(data, "file1"));
      if (isNew() == false && (data.getFile1() != null || data.getFile2() != null)) {
        // Swap files:
        fs.add(new IconButtonPanel(fs.newChildId(), IconType.SWAP, getString("plugins.licensemanagement.swapFiles")) {
          /**
           * @see org.projectforge.web.wicket.flowlayout.IconButtonPanel#onSubmit()
           */
          @Override
          protected void onSubmit()
          {
            final byte[] swap = data.getFile1();
            final String swapFilename = data.getFilename1();
            data.setFile1(data.getFile2());
            data.setFilename1(data.getFilename2());
            data.setFile2(swap);
            data.setFilename2(swapFilename);
          }
        });
      }
      gridBuilder.newSplitPanel(GridSize.COL50);
      fs = gridBuilder.newFieldset(gridBuilder.getString("plugins.licensemanagement.file2"));
      fileUploadPanel2 = new FileUploadPanel(fs.newChildId(), fs, this, true, new PropertyModel<String>(data, "filename2"),
          new PropertyModel<byte[]>(data, "file2"));
      gridBuilder.newGridPanel();
    } else if (right.isLicenseKeyVisible(getUser(), data) == true) {
    }
    {
View Full Code Here

    gridBuilder.newFormHeading(getString("import"));
    {
      // Upload dump file
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.setup.dumpFile"));
      fileUploadField = new FileUploadField(FileUploadPanel.WICKET_ID);
      fs.add(new FileUploadPanel(fs.newChildId(), fileUploadField));
    }
    final RepeatingView actionButtons = new RepeatingView("buttons");
    add(actionButtons);
    {
      final Button importButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("import")) {
View Full Code Here

    super.onInitialize();
    gridBuilder.newSplitPanel(GridSize.COL50);
    final FieldsetPanel newFieldset = gridBuilder.newFieldset(getString("address.book.vCardImport.fileUploadPanel"));

    final FileUploadField uploadField = new FileUploadField(FileUploadPanel.WICKET_ID, new PropertyModel<List<FileUpload>>(this, "uploads"));
    newFieldset.add(new FileUploadPanel(newFieldset.newChildId(), uploadField));
  }
View Full Code Here

      fs.add(calDropDownChoice);
    }
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("file"), "*.ics");
      fileUploadField = new FileUploadField(FileUploadPanel.WICKET_ID);
      fs.add(new FileUploadPanel(fs.newChildId(), fileUploadField));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("importEvents")) {
        @Override
        public final void onSubmit()
        {
          parentPage.importEvents();
View Full Code Here

        {
          return parentPage.getReportStorage() == null;
        }
      };
      fileUploadField = new FileUploadField(FileUploadPanel.WICKET_ID);
      fs.add(new FileUploadPanel(fs.newChildId(), fileUploadField));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("import")) {
        @Override
        public final void onSubmit()
        {
          parentPage.importReportObjectivs();
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.flowlayout.FileUploadPanel

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.