Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: EE-4.0.0.GA
-
Fix Version/s: EE-4.1.0.GA
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Tomcat 8, Myfaces libs, all browsers
-
Assignee Priority:P2
-
Workaround Description:
Description
When using myfaces libs and the ace:fileEntry Add row to top or bottom of table apps there is a js console error when using the Add button. This error occurs whether or not the multipart-config is added to the web.xml.
Screen shot of console error is included as there is no description.
To reproduce:
Build ace:fileEntry with myfaces libs.
Use the /fileEntryTableTop.jsf application found at:
http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/fileEntry
Open the browser console and press the Add button.
Screen shot of console error is included as there is no description.
To reproduce:
Build ace:fileEntry with myfaces libs.
Use the /fileEntryTableTop.jsf application found at:
http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/fileEntry
Open the browser console and press the Add button.
r44589: modified test app: moved 'add' button to a separate form
Regardless of which operation was being done, MyFaces was complaining for every request done inside a form that contained <input type="file"/> elements for not being a multipart form. The message I got was "Uncaught clientError: The form with the id frm has an input file element, but is not a multipart form". Even a plain h:commandButton with ajax and no actionListener was causing this issue. The operation done by the listener (i.e. adding a new row) was being performed normally however.
The way ace:fileEntry works is to hijack the request and makes it a multipart request dynamically. Of course, MyFaces doesn't know this and will complain about it. This is just MyFaces behaviour and nothing much can be done about it except for having the ace:fileEntry component(s) in an exclusive form where no other kinds of requests take place. We have already been recommending this practice.
Another option would be to simply specify the enctype="multipart/form-data" attribute in the form to prevent MyFaces from complaining.