Skip to main content

form encoding type through ajax submit

1 reply [Last post]
jweight
Offline
Joined: 2007-11-12

I'm trying to get some sort of upload control support. I tried the primefaces upload component, but it wasn't really rock solid, so I went to a solution provided by BalusC on his blog (http://balusc.blogspot.com/2009/12/uploading-files-with-jsf-20-and-servl...)

I have everything in place but the enctype for the form was never getting set to multipart. When I removed the f:ajax for the command link that was submitting the form, then I saw the encoding type come through correctly.

So, it looks like f:ajax ignores the enctype specified on the h:form. I'm new to the whole upload arena, so is this expected behavior? Is there something about ajax submission that prohibits a different encoding type for the form?

Thanks,
Joel

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jweight
Offline
Joined: 2007-11-12

For those that are interested, there has been a bug logged against this, and resolved. The gist being that javascript frameworks can't read the file.

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1203

Joel