Examples of FileUploadField


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

            uploadForm.setVisible(false);
            if (node.getDocType().equals(FileType.Folder))
            {
                uploadForm.setMultiPart(true);
                // Add one file input field
                uploadForm.add(new FileUploadField("fileInput",
                        new PropertyModel(this, "fileUploadField")));
                uploadForm.add(new CheckBox("copyIdsOnImport", new PropertyModel(this, "copyIdsOnImport")));
                uploadForm.add(new Button("uploadFile")
                {
View Full Code Here

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

                    return ((ItemUser) o).getUser().getId() + "";
                }
            }, true);
            add(itemUsers);
            // attachment ======================================================
            fileUploadField = new FileUploadField("file");
            add(fileUploadField);
            setMaxSize(Bytes.megabytes(getJtrac().getAttachmentMaxSizeInMb()));
            // send notifications===============================================
            add(new CheckBox("sendNotifications"));
            // validation that assignedTo is not null if status is not null and not CLOSED
View Full Code Here

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

        return excelFile;
    }                   
   
    public ExcelImportPage() {
        add(new FeedbackPanel("feedback"));
        final FileUploadField fileUploadField = new FileUploadField("file");       
        Form uploadForm = new Form("uploadForm") {
            @Override
            public void onSubmit() {
                if(fileUploadField.getFileUpload() == null) {
                    return;
                }
                InputStream is = null;
                try {
                    is = fileUploadField.getFileUpload().getInputStream();
                    excelFile = new ExcelFile(is);
                } catch(Exception e) {
                    error(localize("excel_upload.error.invalidFile"));
                    return;
                }                               
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<>("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

    protected void onBeforeRenderWhenEnabled() {
        updateRegularFormComponents(InputFieldVisibility.VISIBLE);
    }

    private FileUploadField createFileUploadField(String componentId) {
        final FileUploadField fileUploadField = new FileUploadField(componentId, new IModel<List<FileUpload>>() {
   
            private static final long serialVersionUID = 1L;
   
            @Override
            public void setObject(final List<FileUpload> fileUploads) {
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 Model<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

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

    public FileUploadForm(String name)
    {
      super(name);

      setMultiPart(true);
      add(fileUploadField = new FileUploadField("fileInput"));
      setMaxSize(Bytes.kilobytes(5000));
    }
View Full Code Here

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

        new ParametreChoiceRenderer());
    formatDDC.setRequired(true);

    form.add(formatDDC);

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