[ 
http://issues.apache.org/jira/browse/TOMAHAWK-432?page=comments#action_12412750 
] 

Jon Harley commented on TOMAHAWK-432:
-------------------------------------

maxlength is a valid attribute of input for all versions of HTML including 
XHTML. There is NO version of HTML in which it means limit max file size, so 
adding this behaviour to inputFileUpload is inherently confusing.

I agree that configuration of file size should be defined globally, which was 
the only way in MyFaces 1.1.1. Unfortunately the new behaviour of maxlength 
OVERRIDES the global configuration. This caused all my file inputs to break 
when I upgraded, and the same will happen for everyone else who has used 
maxlength on file inputs before upgrading to Tomahawk 1.1.2.

But if you don't care about introducing confusing attribute names and breaking 
people's applications, by all means leave this bug unfixed.

> maxlength attribute of inputFileUpload now sets both the input field size and 
> the file size
> -------------------------------------------------------------------------------------------
>
>          Key: TOMAHAWK-432
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-432
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: File Upload
>     Versions: 1.1.2
>     Reporter: Jon Harley
>     Assignee: Matthias Weßendorf

>
> The maxlength attribute of the inputFileUpload tag is supposed to set the 
> maximum number of characters you can enter in the text input part of the file 
> input. This is documented in the tag library javadoc and was the behaviour in 
> MyFaces 1.1.1 (it is also the intuitive behaviour, since maxlength is used 
> for this in the HTML file input tag).
> As of Tomahawk 1.1.2, the component refuses to upload files with a size IN 
> BYTES greater than the size of the maxlength attribute, giving the message 
> from org.apache.myfaces.FileUpload.SIZE_LIMIT
> It is not appropriate to overload the maxlength attribute to set both the 
> width of the input field and the size of the file - please regress to the 
> behaviour in 1.1.1!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to