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

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

Introduction

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

Prototype

public final Component setRenderBodyOnly(final boolean renderTag) 

Source Link

Document

If false the component's tag will be printed as well as its body (which is default).

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
 *//*w  ww  . ja va  2 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);
}