Examples of FileUploadField


Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    form.add(new TextField("question1"));

    form.add(new CheckBox("afficherQuestion2"));
    form.add(new TextField("question2"));

    form.add(fileUploadField = new FileUploadField("fileInput"));
    form.setMultiPart(true);
    form.setMaxSize(Bytes.kilobytes(5000));

    form.add(new Button("submit", new ResourceModel("submit"))
    {
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    // create a textfield to demo non-file content
    form.add(text = new TextField<String>("text", new Model<String>()));
    text.add(StringValidator.minimumLength(2));

    // create the file upload field
    form.add(file = new FileUploadField("file"));

    form.add(new Label("max", new AbstractReadOnlyModel<String>()
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    };
    add(form);
    form.setMultiPart(true);
    form.setMaxSize(Bytes.kilobytes(100));
    form.add(new TextField<String>("text"));
    fileUploadField = new FileUploadField("file", new ListModel<FileUpload>());
    StringValue requiredParam = param.get("required");
    boolean required = requiredParam.toBoolean();
    fileUploadField.setRequired(required);
    form.add(fileUploadField);
  }
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    return importOptions.isParallel() ? parallelImporter : serialImporter;

  }

  private Form<?> initFileUpload(final ImportOptions importOptions) {
    final FileUploadField scriptFile = new FileUploadField("scriptFile");

    final Form<?> form = new Form<Void>("form") {
      @Override
      protected void onSubmit() {
      }
    };
    form.setMaxSize(Bytes.megabytes(conf.queryImport.maxFileSizeMb));
    add(form);
    form.add(scriptFile);

    form.add(new AjaxButton("ajaxSubmit") {
      @Override
      protected void onError(AjaxRequestTarget target, Form<?> form) {
        LOG.info("Got error on import upload: {}", form);
        sendJsResponse(target, ErrorCodes.FILE_SIZE_LIMIT.name());
      }

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        FileUpload upload = scriptFile.getFileUpload();
        if (upload == null) {
          return;
        }
        executeImport(target, importOptions, upload);
      }
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

  private static final long serialVersionUID = 1L;
  private FileUploadField fileUploadField;

    public HomePage(final PageParameters parameters) {
     
      fileUploadField = new FileUploadField("fileUploadField");
     
      Form form = new Form("form"){
        @Override
        protected void onSubmit() {
          super.onSubmit();
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    }

    private void addForm()
    {
      add(form = new TraceableForm("uploadForm"));
      form.add(new FileUploadField("fileInput"));
      form.add(new UploadProgressBar("progress", form));
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    // create a textfield to demo non-file content
    form.add(text = new TextField<String>("text", new Model<String>()));

    // create the file upload field
    form.add(file = new FileUploadField("file"));

    form.add(new Label("max", new AbstractReadOnlyModel<String>()
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

      // set this form to multipart mode (allways needed for uploads!)
      setMultiPart(true);

      // Add one file input field
      add(fileUploadField = new FileUploadField("fileInput"));

      // Set maximum size to 100K for demo purposes
      setMaxSize(Bytes.kilobytes(100));
    }
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    };
    add(form);
    form.setMultiPart(true);
    form.setMaxSize(Bytes.kilobytes(100));
    form.add(new TextField<String>("text"));
    fileUploadField = new FileUploadField("file", new ListModel<FileUpload>());
    StringValue requiredParam = param.get("required");
    boolean required = requiredParam.toBoolean();
    fileUploadField.setRequired(required);
    form.add(fileUploadField);
  }
View Full Code Here

Examples of org.apache.wicket.markup.html.form.upload.FileUploadField

    }

    private void addForm()
    {
      add(form = new TraceableForm("uploadForm"));
      form.add(new FileUploadField("fileInput"));
      form.add(new UploadProgressBar("progress", 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.