hi all,

when i try to send data via "tapestry.bind" to my Tapestry page from
a page with a dojo editor (editor2) i get following javascript exception:

[exception]
DEBUG: [Exception... "Component returned failure code: 0x80004005
(NS_ERROR_FAILURE) [nsIXMLHttpRequest.open]" nsresult: "0x80004005
(NS_ERROR_FAILURE)" location: "JS frame ::
http://localhost:8080/gp/js/dojo.js.uncompressed.js :: anonymous :: line
10642" data: no] when calling onKeyPress$joinpoint$method on [Widget
dojo:editor2, dojo_Editor2_0] with arguments [object Object]
FATAL exception raised: Component returned failure code: 0x80004005
(NS_ERROR_FAILURE) [nsIXMLHttpRequest.open]
[/exception]

i set up a maven project where i can reproduce this anytime but i
dont know what is causing this exception. When i view the raw html
template in FF (... the not generated html ) everything works fine.

i hope someone can give me a hint. is it related to the keyhandlers of
the editor? why does it matter if do a ajax call?

please help

my code looks like this:

editor.js
var editor = null;

function startEdit(e) {
   editor = dojo.widget.createWidget("Editor2", {
         toolbarTemplatePath:null
      }, dojo.byId("edit"));

   var k = dojo.event.browser.keys;
   // listen to key events
   editor.addKeyHandler(k.KEY_ESCAPE,null,listenESC);
   editor.addKeyHandler(k.KEY_ENTER ,null,listenENTER);
}

function initEditor() {
   dojo.event.connect(dojo.byId("edit"), "ondblclick", "startEdit");
}

function listenESC() {}

function listenENTER() {
   ...
   asyncListenerDoSave(data);
   ...
}

asyncCaller component:
dojo.require("dojo.dom");
dojo.require("dojo.dnd.*");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.Editor2");
dojo.require("tapestry.event");


function asyncListenerDoSave(data) {
   tapestry.bind("/gp/app?component=async&page=Editor&service=direct",
data, false);
}

g,
kris




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to