Hello: I'm seeing some weirdness in the javascript output by an AjaxCallDecorator. This is my call decorator:
protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() { static final long serialVersionUID = 1L; public CharSequence decorateScript(CharSequence script) { final StringBuffer buff = new StringBuffer(); buff.append("var myFields = this.parentNode.getElementsByTagName('input');" + "var thisWindow = document.getElementById(myFields[1].value);" + "myFields[2].value = thisWindow.style.left + ',' + " + "thisWindow.style.top + ',' + " + "thisWindow.style.width + ',' + " + "this.parentNode.parentNode.style.height;"); buff.append(script); return buff; } }; } The javascript output has some extra caret "^" symbols in it and then I get a "Syntax Error: syntax error" in the Wicket Ajax Debug window: <evaluate encoding="wicket1"><![CDATA[ [...snip...] settings.onMoveOrResize = function() { var myFields = this.parentNode.getElementsByTagName('input'); var thisWindow = document.getElementById(myFields[1]^.value); myFields[2]^.value = thisWindow.style.left + ',' + thisWindow.style.top + ',' + thisWindow.style.width + ',' + this.parentNode.parentNode.style.height; var wcall=wicketAjaxGet('../?wicket:interface=:1:dashboardWindow::IBehaviorListener:2:1', function() { }.bind(this), function() { }.bind(this));); Wicket.Window.create(settings).show(); ]]></evaluate></ajax-response> INFO: Response parsed. Now invoking steps... ERROR: Exception evaluating javascript: SyntaxError: syntax error I'm not exactly sure what the syntax error is pointing to, but I'm assuming it's the weird ^'s inserted into myFields[#].value. Can anyone tell what I'm doing wrong? Please Note: this is more messing around with Matej's modal window to make it a dashboard component. The code is still really rough... Thanks for your help! >From NateBot2000 -- View this message in context: http://www.nabble.com/Extra-caret-%5E-symbol-in-AjaxCallDecorator-output-tf4052693.html#a11511381 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user