eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
161 stars 110 forks source link

No FileUpload-Component in JSF-API/RI #1471

Closed ren-zhijun-oracle closed 14 years ago

ren-zhijun-oracle commented 14 years ago

The JSF API lacks a standardized FileUpload Component.

I'm now trying for over a week to get a simple file upload working with JSF on Glassfish v3, but with no luck.

There are several "implementations" out there, like RichFaces, PrimeFaces, Tomahawk, Woodstock, etc. but all of them don't quite work for JSF 2 final/Mojara 2.0.3. Also its not acceptable to have to use a whole component library just to get FileUploading working within JSF.

There should be a FileUpload component in the API & RI, so that users don't have to hassle around... when they need something more powerful (multiple file-uploads or whatever) they still can switch to a bigger component library, but this basic use case should be build in, as it is with every other web-framework/technology I know of (Ruby/PHP/ASP.net,etc.)

Environment

Operating System: All Platform: All

Affected Versions

[2.0.2]

ren-zhijun-oracle commented 6 years ago
ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented Reported by domdorn

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented driscoll said: While I sympathize with your problem, the work of getting file upload into the JSF reference implementation will be carried out as part of the spec work - there's already a bug filed for it -

https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=690

One reason for not including this up to now in the spec was that the underlying servlet spec didn't support file upload - that's now addressed in Servlet 3.

As for not wanting to use a component library - the whole point of JSF's extensibility is to enable full featured component libraries, so that you don't have to reinvent the wheel. If you're not using at least one component library, you're probably spending time doing something that's already been solved for you.

And lastly, JSF 2 is supposed to be fully backward compatible with JSF 1.2. Some component libraries used undocumented features (ICEFaces comes to mind), but most should work with JSF 2. If they don't, that's probably a serious bug in either the component library, or in Mojarra. At a minimum, Primefaces has a fileupload which I'm fairly certain works http://www.primefaces.org/

I wish I could close this out as a duplicate of 690, but I cannot, since that's a different bug database. So, instead closing as WONTFIX (but we will fix it, as part of 690)

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented domdorn said: Well I'm using an additional taglib (Primefaces) to do most of the stuff, but as with these two bugs: https://glassfish.dev.java.net/issues/show_bug.cgi?id=11295 http://code.google.com/p/primefaces/issues/detail?id=361 the fileUpload component does work with JSF2 and tomcat6 but not with Glassfishv3 which is the JavaEE6 Reference implementation.

Also, why should I use multiple full blown libraries, e.g. Primefaces + Richfaces/Seam, etc. just because I need ONE SIMPLE FILEUPLOAD COMPONENT that is included in every other web frameworks RI, but just not in JSF?

I want to state, I don't have a problem with using small libraries for some specific, additional use cases, but using multiple full blown libraries which all add stuff to the lifecycle(=making things slow!) are very unattractive for something basic like just fileUpload.

With the help of BalusC I created a taglib just for file-uploading ( http://dominikdorn.com/?p=169 ), but I still think a standardized fileUpload component should be part of the spec/ri.

Maybe you could take a look on the issues posted on top as well.

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented @edburns said: The two bugs you cite are indeed important.

Also important is your assertion that we need a standard file upload component.

Such a component is already on the list for the next revision of the JSF specification. In the meantime, you'll have to get by with the existing third party solutions.

We'll work on the other issues you cite presently.

Sincerely,

Ed Burns JSF spec co-lead.

ren-zhijun-oracle commented 12 years ago

@javaserverfaces Commented @manfredriem said: Closing resolved issue out

ren-zhijun-oracle commented 7 years ago

@javaserverfaces Commented This issue was imported from java.net JIRA JAVASERVERFACES-1467

ren-zhijun-oracle commented 14 years ago

@javaserverfaces Commented Marked as won't fix on Thursday, July 1st 2010, 3:09:26 am