Example usage for org.apache.wicket.extensions.ajax.markup.html.form.upload UploadProgressBar setOutputMarkupId

List of usage examples for org.apache.wicket.extensions.ajax.markup.html.form.upload UploadProgressBar setOutputMarkupId

Introduction

In this page you can find the example usage for org.apache.wicket.extensions.ajax.markup.html.form.upload UploadProgressBar setOutputMarkupId.

Prototype

public final Component setOutputMarkupId(final boolean output) 

Source Link

Document

Sets whether or not component will output id attribute into the markup.

Usage

From source file:org.artifactory.common.wicket.panel.upload.FileUploadForm.java

License:Open Source License

/**
 * @param id            The wicket component id
 * @param tempUploadDir Path to a temp upload directory
 * @param listener      Parent component holding this upload form which will receive events
 *//*from  w w w  .  j a v  a2 s .c o m*/
public FileUploadForm(String id, String tempUploadDir, UploadListener listener) {
    super(id);
    this.listener = listener;
    tempUploadsDir = new File(tempUploadDir);

    //Set this form to multi-part mode (always needed for uploads!)
    setMultiPart(true);
    //Add one file input field
    add(fileUploadField = new FileUploadField("fileInput", new ListModel<FileUpload>()));
    // Add the progress bar
    UploadProgressBar progress = new UploadProgressBar("progress", this);
    progress.setOutputMarkupId(true);
    progress.setRenderBodyOnly(false);
    progress.setMarkupId("uploadProgress");
    add(progress);
}