Reputation: 2967
I trying to set fileLimit="4"
in my application in <p:fileUpload>
to validate when user uploads multiple files but not more than four. But this is not working.
When I checked primefaces showcase for this multiple=true
scenario, there also not working. And the most weird thing is when I try to autocomplete in eclipse for the attributes inside <p:fileUpload>
I don't see any fileLimit
, fileLimitMessage
etc. I am using Primefaces 3.5v.Is this a bug in Primefaces file upload?
Upvotes: 3
Views: 1704
Reputation: 1108632
For some reason, PrimeFaces main showcase site is showcasing current alpha/beta/RC version instead of latest stable version. You can verify this by looking at the version information in the footer of the showcase site. This is indeed confusing. Previously, all PrimeFaces alpha/beta/RC versions were showcased on a different showcase site (called PrimeFaces labs).
In your particular case, the fileLimit
attribute of <p:fileUpload>
is indeed added in PrimeFaces 4.0 and absent in 3.5. In order to utilize this attribute, you'd need to upgrade to PrimeFaces 4.0. It's currently only available as a snapshot (note: you're supposed to report all issues directly to them then). The final release is scheduled in a few weeks.
Upvotes: 2