Re: [Trinidad] inputFile - upload empty files ?

2007-10-30 Thread Mario Ivankovits
Matthias Wessendorf schrieb: tr:validateUploadedFile / might be the better name. I am very happy with this! Though, should go to the upcoming commons project, shouldn't it? Ciao, Mario -M On 10/30/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: So, why not doing a

Re: [Trinidad] inputFile - upload empty files ?

2007-10-30 Thread Matthias Wessendorf
Sure, but that doesn't stopp us, from adding it now, and moving it over. Validators aren't that hard to write. -M On 10/30/07, Mario Ivankovits [EMAIL PROTECTED] wrote: Matthias Wessendorf schrieb: tr:validateUploadedFile / might be the better name. I am very happy with this! Though,

Re: [Trinidad] inputFile - upload empty files ?

2007-10-30 Thread Andrew Robinson
+1, I like it On 10/30/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: tr:validateUploadedFile / might be the better name. -M On 10/30/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: So, why not doing a tr:validateFileLength / with the following attributes: -minLength -maxLength

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Manfred Geiler
Is an empty file (0 bytes) equal to no file (ie. null)? is the same as Is an empty String (length 0) equal to no String (ie. null)? Technically the answer is no for both questions. Well the pragmatical (and only reasonable) answer to the second question is yes in the JSF spec (comp. required for

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Mario Ivankovits
Hi! Sure, an app-dev could write a validation method, but I think 0-byte is somewhat equal to not submitted. I don't think so. A 0-byte file is a valid file (might be a flag-file to trigger something). If you treat a 0-byte file as fake, what would you do with files with just one space. I

[Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Matthias Wessendorf
Hi, currently Trinidad's inputFile allows the upload of an empty file (0 bytes). I think it shouldn't. When an inputFile object is marked as required, I would expect that a user does a real upload, and not a fake upload. Sure, an app-dev could write a validation method, but I think 0-byte is

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Mario Ivankovits
Hi! Technically the answer is no for both questions. Well the pragmatical (and only reasonable) answer to the second question is yes in the JSF spec (comp. required for h:inputText). Therefore it makes sense to say yes to Q1 as well. I think the difference here is, that if there was a file

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Matthias Wessendorf
I agree with what Manfred said. Also doing the following: D:\thisFileDoesNotExistOnMyComputer.png is handled as an empty file as well. -M On 10/29/07, Mario Ivankovits [EMAIL PROTECTED] wrote: Hi! Technically the answer is no for both questions. Well the pragmatical (and only reasonable)

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Mario Ivankovits
Matthias Wessendorf schrieb: I agree with what Manfred said. Also doing the following: D:\thisFileDoesNotExistOnMyComputer.png is handled as an empty file as well. Really?? Ok, than what Manfred said is true. Ciao, Mario

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Matthias Wessendorf
Ok, I'll go ahead and file a bug, at least to track this *change* This is true for Tomahawk as well, I'll fix that too. (u can try: http://example.irian.at/example-simple-20071029/fileupload.jsf) -M On 10/29/07, Mario Ivankovits [EMAIL PROTECTED] wrote: Matthias Wessendorf schrieb: I agree

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Matthias Wessendorf
Tobago has such a validator, max and contentType yes, should be moved to commons On 10/29/07, Mario Ivankovits [EMAIL PROTECTED] wrote: Hi! Sure, an app-dev could write a validation method, but I think 0-byte is somewhat equal to not submitted. I don't think so. A 0-byte file is a valid

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Andrew Robinson
Strong -1 on this 0 byte files are very valid, especially on a unix based platform. There are many times that a file by its existence implies meaning. Take for example ~/.config/xserver-xgl/disable, if this file is present, xgl mode of the linux X server is disabled for that user. The file should

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Manfred Geiler
Matze, What about providing a standard tr:validateNonEmptyFile Vaidator. This would make everybody happy, right? lg, Manfred On 10/29/07, Andrew Robinson [EMAIL PROTECTED] wrote: Strong -1 on this 0 byte files are very valid, especially on a unix based platform. There are many times that a

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Andrew Robinson
Would a tr:validateFileLength min=1 / be more useful? Then min and max could be used. -A On 10/29/07, Manfred Geiler [EMAIL PROTECTED] wrote: Matze, What about providing a standard tr:validateNonEmptyFile Vaidator. This would make everybody happy, right? lg, Manfred On 10/29/07, Andrew

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Matthias Wessendorf
So, why not doing a tr:validateFileLength / with the following attributes: -minLength -maxLength -contentType Greetings, Matthias On 10/29/07, Andrew Robinson [EMAIL PROTECTED] wrote: Would a tr:validateFileLength min=1 / be more useful? Then min and max could be used. -A On 10/29/07,

Re: [Trinidad] inputFile - upload empty files ?

2007-10-29 Thread Matthias Wessendorf
tr:validateUploadedFile / might be the better name. -M On 10/30/07, Matthias Wessendorf [EMAIL PROTECTED] wrote: So, why not doing a tr:validateFileLength / with the following attributes: -minLength -maxLength -contentType Greetings, Matthias On 10/29/07, Andrew Robinson [EMAIL