From: Ahmed A. <asa...@ya...> - 2015-08-06 22:39:17
|
Hi, You can use "alert(arguments.callee.caller);" Please read some hints in http://htmlunit.sourceforge.net/submittingJSBugs.html#JavaScript_hints Ahmed From: "Parham, Clinton" <cp...@bi...> To: "htm...@li..." <htm...@li...> Sent: Thursday, August 6, 2015 10:41 PM Subject: [Htmlunit-user] RichFaces 4 fileUpload This message is eligible for Automatic Cleanup! (cp...@bi...) Add cleanup rule | More info <!--#yiv1812243964 _filtered #yiv1812243964 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv1812243964 #yiv1812243964 p.yiv1812243964MsoNormal, #yiv1812243964 li.yiv1812243964MsoNormal, #yiv1812243964 div.yiv1812243964MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}#yiv1812243964 a:link, #yiv1812243964 span.yiv1812243964MsoHyperlink {color:blue;text-decoration:underline;}#yiv1812243964 a:visited, #yiv1812243964 span.yiv1812243964MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv1812243964 span.yiv1812243964EmailStyle17 {font-family:"Calibri", "sans-serif";color:windowtext;}#yiv1812243964 .yiv1812243964MsoChpDefault {} _filtered #yiv1812243964 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv1812243964 div.yiv1812243964WordSection1 {}-->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. | ------------------------------------------------------------------------------ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |