Bug 317403 - [Upload] RCP version
Summary: [Upload] RCP version
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: Incubator (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-06-21 04:07 EDT by Martijn Cremer CLA
Modified: 2011-10-12 06:25 EDT (History)
5 users (show)

See Also:


Attachments
Patch for RWT to introduce functionalety needed for SWT (5.11 KB, text/plain)
2010-06-21 04:41 EDT, Martijn Cremer CLA
no flags Details
Upload Widget RCP version 0.0.1 (68.10 KB, application/octet-stream)
2010-07-14 07:14 EDT, Martijn Cremer CLA
martijn.cremer: review?
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn Cremer CLA 2010-06-21 04:07:04 EDT
Build Identifier: 

Whith the eye on single sourcing RAP and RCP it would be optimal to have a swt version of the Upload Widget so that you can single source it without adjusting code of Views/Editors that use this.

The Upload Widget for RCP would be more focused on creating a inputstream so that it can be processed.

For this there should also  be some minor adjustments to the Upload Widgget of RWT. The errors that are specific to the org.apache.commons library should be handled by a Universal Error that can be used and available in both RCP as RAP.

Reproducible: Didn't try
Comment 1 Martijn Cremer CLA 2010-06-21 04:41:27 EDT
Created attachment 172310 [details]
Patch for RWT to introduce functionalety needed for SWT

This patch addes to the UPloadItem the FileSize paramter and a few small cosmetic changes. This is needed for more independent working of the UploadWidget witch is prefrable if you want to detach it from the Appache.commons library.
Comment 2 Stefan Röck CLA 2010-06-22 03:28:34 EDT
(In reply to comment #1)
Thanks for the patch. I applied it to CVS head with minor changes (I didn't changed the Upload CTor to private as this breaks existing clients).
Comment 3 Martijn Cremer CLA 2010-06-22 03:38:12 EDT
(In reply to comment #2)

No problem one question we need to eventually move the Upload widget from the RWT package to the SWT (for now keeping it RWT is good). I also wonder why its not a fragment now you get Discouraged access warnings. I hope to have a working example of the SWT version somtime soon.
Comment 4 Stefan Röck CLA 2010-06-29 09:48:04 EDT
Still open: As discussed in http://www.eclipse.org/forums/index.php?t=msg&goto=538971& apache commons exceptions should be wrapped for better single sourcing.
Comment 5 Martijn Cremer CLA 2010-07-14 07:14:43 EDT
Created attachment 174282 [details]
Upload Widget RCP version 0.0.1

Ok its the first time I written a SWT widget in general. And I based it on the RAP version. I tried to put as mutch of the Errors in the own package internal.error (for now just copied the Apache errors).

There is a lot 2 do on this. But it basacly gives back an UploadItem now.

Things done:
* remade the upload Demo in RCP variant.
* Same interface
* return a uploadItem

Things 2 do:
* Better Error handling (make the errors universal with the RCP variant).
* use progress bar (with a delay for better use experiance (and look and feel)
* Implement the listner (sorry I coudnt make heads or tales of it from RAP to RCP 2 big a difrence for me to make it in one good go).

Eny thing else let me know maybe somone can help with the Event Listners bc thats somting I dont compleetly understand yet.
Comment 6 Ralf Sternberg CLA 2011-10-10 18:05:30 EDT
The upload widget is obsolete and will be removed in the future. Use the new FileUpload widget or the FileDialog implementation from the incubator instead.

Does the new FileDialog implementation in the incubator make this bug obsolete?
Comment 7 Austin Riddle CLA 2011-10-11 09:55:00 EDT
(In reply to comment #6)
> The upload widget is obsolete and will be removed in the future. Use the new
> FileUpload widget or the FileDialog implementation from the incubator instead.
> 
> Does the new FileDialog implementation in the incubator make this bug obsolete?

I think that the new RWT FileUpload widget and server-side upload framework provides a nice, decoupled point of extension, which allows consumers to produce a widget that is similar to the legacy upload widget.  This bug relates to specific use of the old upload widget, which can still be accomplished, but is not going to be officially supported as a canonical implementation.