|
Re: Updates to upload widget [message #537408 is a reply to message #531551] |
Wed, 02 June 2010 11:27 |
|
Hey Stefan,
Your uploadException trough the Lister works like a charm, how ever I have a at this moment you throw back an Exception, how ever there are several error type the FileUploadBase can throw that are interesting to catch to give a clearer error for example the FileSizeLimitExceededException so that you can give a decent error. How ever at this moment we only get the Message of that error not the error it self.
If you want to check if its a FileSizeLimitExceededException you need to cast it to it. Maybe there should eb somting like a method that alouws you to see what kind of excpetion it is with the help of an Enum so that the implemantiont is free of links to org.apache.commons.fileupload.FileUploadBase.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
|
Re: Updates to upload widget [message #537956 is a reply to message #537951] |
Fri, 04 June 2010 10:23 |
|
That by introducing that code you have to import the org.apache.commons.fileupload package to a GUI element while you would expect that the RWT package would handle this. You do not want have to import such a thing to a GUI element the RWT widget should handle this. If you do it like that you import the org.apache.commons.fileupload plugin your creating a duble dependesie while you want it as loose as posible.
The whole I dea I have in my mind is that you try to have the most loosless dependesies between packages (eg OSGi like) and not importing things your sub package has.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
[Updated on: Fri, 04 June 2010 10:24] Report message to a moderator
|
|
|
|
Re: Updates to upload widget [message #538971 is a reply to message #538734] |
Wed, 09 June 2010 08:48 |
|
Stefan Röck wrote on Tue, 08 June 2010 16:00 | Hi Martijn,
I understand your point. However, I'm not sure if its a good idea to
wrap all possible exceptions with a own type (with the risk to miss new
exceptions that come with newer versions...).
What do others think?
Regards,
Stefan.
|
I think the main problem is that we need to catch mostly the errors concerning the FileUploadBase Errors should be cough these Exeptions are the ones you want to give your end user a proper error. (a.t.m.I am importing these Errors in the GUI so I can give decent errors to the end user).
I was thinking in the lines you can have 2 types of errors from the Widget 1st is a FileUploadExeption that gives all the information from the FileUploadBase errors and also makes sure its containing the information needed (size, max size etc). And a normal Exception for all the types you don't process. These are more often Unhanded Exceptions that have nothing directly to do with the Upload Action it self.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
|
Re: Updates to upload widget [message #541062 is a reply to message #540944] |
Fri, 18 June 2010 08:17 |
|
Stefan,
That's great news. Im starting to make a RCP Upload widget based on this code so when I got that working ill try to use the Same Error (if needed we can see if there is a good option in between the to extremes).
Whit kind regards,
Martijn
Stefan Röck wrote on Thu, 17 June 2010 18:39 | Martijn,
I understand your request under the aspect of single sourcing. I think
this is a valid use case and a good reason to hide the Apache specific
API. I will change this as you suggested.
Regards,
Stefan.
|
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
Re: Updates to upload widget [message #541462 is a reply to message #541062] |
Mon, 21 June 2010 09:33 |
|
I created an enhancement request for the Upload widget to create a SWT version of this widget so that Single Sourcing with the use of the Upload Widget is possible.
I would like some feedback on this from all of you. I already had to make small changes to the current Upload Widget to make it a bit more manageable to change it to SWT.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317403
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
[Updated on: Mon, 21 June 2010 09:36] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03849 seconds