The ]^ sequence is perfectly valid and it should be properly decoded client side (thus encoding='wicket1'). There might be another javascript problem, quickstart would be helpful, as well as full ajax console output.
-Matej On 7/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > On 7/9/07, NateBot2000 <[EMAIL PROTECTED]> wrote: > > > > > 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... > > > ai, there must be a bug somewhere in the ajax handling on clientside. you > see, because we allow html not necessary xhtml markup to be sent via ajax to > clientside we put it into cdata section, but because that markup can easily > contain cdata end sequence ]]> we escape all ] chars with ^], then on > clientside we should be stripping them back. looks like that is not > happening. please file a bug report - in this case it would be really useful > if you could create a quickstart to reproduce the problem. > > -igor > > > > > 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 > > > > > ------------------------------------------------------------------------- > 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 > > ------------------------------------------------------------------------- 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