From: Parham, C. <cp...@bi...> - 2015-08-06 20:41:46
|
Hello, I continue to struggle to get the RichFaces fileUpload component to work with HTMLUnit 2.18. (http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=fileUpload&skin=blueSky) After setting the file to upload with htmlInput.setValueAttribute and clicking the Upload button, I get this error from HTMLUnit: 2015-08-06 15:23:58,744 INFO main [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine][handleJavaScriptException] Caught script exception ======= EXCEPTION START ======== EcmaError: lineNumber=[403] column=[0] lineSource=[null] name=[TypeError] sourceName=[https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js] message=[TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403)] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "target" from undefined (https://bio206/saas/org.richfaces.resources/javax.faces.resource/org.richfaces/fileupload.js#403) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628) ... == CALLING JAVASCRIPT == function () { return fn.apply(context || this, args.concat(slice.call(arguments))); } ======= EXCEPTION END ======== I've tried debugging and all that I can tell is that "e" is undefined on this line #403 in fileupload.js: switch (e.target.status) { The function in fileupload.js is called from jquery.js but I cannot trace the argument to better understand why it's undefined when HTMLUnit is running. I've attached a testcase. Any suggestions? Thanks, Clint ________________________________ The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message. |