The evolution of RAP’s FileDialog

The ability to upload files is key functionality for every Web application and, naturally RAP can upload files too. In the beginning ( RAP 1.2 ), this functionality was provided by a custom widget called Upload. This widget was based on an early version of the Qooxdoo UploadWidget contribution project.
upload control The evolution of RAPs FileDialog
In RAP 1.4 the old Upload widget was deprecated and replaced by a new FileUpload RWT widget responsible for file selection and submission, and a server-side component (FileUpload Incubator project) that receives and stores uploaded files. We’ve encapsulated the entire upload process in an implementation of the SWT FileDialog, which is also available in the incubator.
FileDialog1 The evolution of RAPs FileDialog
This FileDialog had several shortcomings:

  • Uploading multiple files required too many user interactions
  • Selecting and uploading multiple files was not possible
  • The implementation for file filtering was confusing

RAP 2.2M2 makes these improvements:

    • RWT FileUpload widget has been extended to support multiple file selection and submission.
    • FileUploadHandler now supports multiple files in single request.
    • FileDialog has a redesigned and simplified UI.

FileDialog new The evolution of RAPs FileDialog

  • FileDialog automatically uploads files after selection.
  • The confusing FileDialog file filtering API has been removed.

Enjoy the new FileDialog!

You may also like...

Share this Post

Twitter4
Google+0
LinkedIn
Facebook

Tags

10 Responses to “The evolution of RAP’s FileDialog”

  1. david says:

    Hi,

    How to validate or check file size and format on the browser client?

    thanks

  2. ( SWT ) FileDialog does not provide an API for checking size/format. You need a custom dialog implementation based on FileUploadHandler. Information for uploaded file is available in the event passed to the FileUploadListener. You can find an example here.

  3. Rajesh Hariharan says:

    Hi,

    i am unable to find the RAP 2.2M2 compatible latest File incubator at the link http://eclipse.org/rap/incubator/

    Could you clarify whether it is out for development or not?

    Raj

  4. Hi,
    the nightly build (p2 repo) is the one, which is compatible with RAP 2.2M2 ( git master) and contains the new FileDialog/FileUploadHandler.
    Regards!

  5. Rajesh Hariharan says:

    Got it Ivan,

    Thanks for your instant response

    Raj

  6. mgsoft says:

    Is there already a plan to release that component? My point is that it is very nice and it’s necessary for many projects but it is loitering in the incubation area for years now!
    I understand that it is necessary that basic widgets must be tested very carefully but at some point of time testing must come to an end…

  7. FileDialog (org.eclipse.rap.addons.fileupload bundle) currently have a dependency to third-party bundles (Apache Commons FileUpload/IO). We don’t want to introduce such a dependency to RAP core bundles. This is the reason why it lives in the incubator.

  8. mgsoft says:

    OK, I see!
    But is there any chance that I get a jar-file containing the FileDialog somewhere (for 2.1.1) ? I don’t want to build it by myself.

    This would help me really a lot!!

  9. FileUpload/FileDialog p2 repositories are listed in RAP Incubator page [1]. Latest FileDialog version (master) requires RAP 2.2. RAP 2.1 compatible version is available from the following p2 repository – [2].

    [1] http://eclipse.org/rap/incubator/
    [2] http://download.eclipse.org/rt/rap/incubator/2.1/fileupload/

  10. mgsoft says:

    Thank you Ivan,

    I have found the links already but my first impression was that the links were broken and I didn’t see “Show Directory Contents”!

    Best regards!

10 responses so far

Written by . Published in Categories: EclipseSource News