logo       

[HtmlUnit] [ htmlunit-Bugs-1377638 ] Problem with taconite ajax: msg#00048

java.htmlunit.devel

Subject: [HtmlUnit] [ htmlunit-Bugs-1377638 ] Problem with taconite ajax

Bugs item #1377638, was opened at 2005-12-10 12:10
Message generated for change (Comment added) made by mguillem
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1377638&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Richard HALLIER (rhallier)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with taconite ajax

Initial Comment:
Hi all,
My webapp is using the taconite ajax implementation and
I run my tests under Canoo Web Test.
Filling a combobox, with an ajax action, depends of the
value selected by the user from another combobox.
The xml response received by the server for an ajax
call is the following :

<taconite-root>
<taconite-replace-children contextNodeID="country"
parseInBrowser="false">
<![CDATA[
var element0 = document.createDocumentFragment();
element0.appendChild(document.createTextNode(" "));

var element1 = document.createElement("option");
element1.setAttribute("value", "");
element0.appendChild(element1);
element0.appendChild(document.createTextNode(" "));
element0.appendChild(document.createTextNode(" "));

element1 = document.createElement("option");
element1.setAttribute("value", "30");
element0.appendChild(element1);
element1.appendChild(document.createTextNode("Brésil"));element0.appendChild(document.createTextNode("
"));

and so on ...

The error is the following :

[webtest] Exception in thread "XMLHttpRequest.send()
Thread" org.mozilla.javascript.EvaluatorException: La
classe Java
"com.sun.org.apache.xerces.internal.dom.DeferredElementImpl"
ne possède aucun champ ou aucune méthode d'instance
publique appelé "0"
(http://localhost:8080/xxxx/scripts/taconite-client.js#268)
[webtest] at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:95)
[webtest] at
org.mozilla.javascript.Context.reportRuntimeError(Context.java:966)
[webtest] at
org.mozilla.javascript.Context.reportRuntimeError(Context.java:1022)
[webtest] at
org.mozilla.javascript.Context.reportRuntimeError2(Context.java:992)
[webtest] at
org.mozilla.javascript.JavaMembers.reportMemberNotFound(JavaMembers.java:635)
[webtest] at
org.mozilla.javascript.NativeJavaObject.get(NativeJavaObject.java:106)
[webtest] at
org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1340)
[webtest] at
org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1301)
[webtest] at
org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1285)
[webtest] at
org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2845)
[webtest] at
script(http://localhost:8080/xxxx/scripts/taconite-client.js:268)
[webtest] at
script(http://localhost:8080/xxxx/scripts/taconite-client.js:225)
[webtest] at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2250)
[webtest] at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:149)
[webtest] at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
[webtest] at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
[webtest] at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:147)
[webtest] at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:127)
[webtest] at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:347)
[webtest] at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.access$000(XMLHttpRequest.java:68)
[webtest] at
com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest$1.run(XMLHttpRequest.java:309)


Have you any pointers ?
Thank you for your help.
R.

----------------------------------------------------------------------

>Comment By: Marc Guillemot (mguillem)
Date: 2006-03-23 08:46

Message:
Logged In: YES
user_id=402164

In fact this is the same problem as exposed in bug 1415496
[1]: the object returned by XMLHttpRequest.responseXML is
not a js host object for the JavaScript engine. The
consequence is that expressions like
XMLHttpRequest.responseXML.childNodes[0] fail with an
exception like the one you get.

[1]
https://sourceforge.net/tracker/index.php?func=detail&aid=1415496&group_id=47038&atid=448266

----------------------------------------------------------------------

Comment By: Brad Clarke (yourgod)
Date: 2006-03-23 01:04

Message:
Logged In: YES
user_id=257129

Since the exception is not in english I can't tell for sure,
but it's probably because we have no support for
createDocumentFragment yet.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1377638&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise