not that much we can do since the event script is already in quotes when in html eg style="color: rgb(255, 0, 0);">"foo();"

if its a big problem write out the message in a standalone js function and call that func from the call decorator.

-Igor


On 8/28/06, Pierre-Yves Saumont <[EMAIL PROTECTED]> wrote:
Hello,

When defining a script to use with decorateOnFailureScript in
AjaxCallDecorator, it is not possible do write:

public CharSequence decorateOnFailureScript(CharSequence script) {
   return "alert(\"message\")";
}

one can only use single quotes:

public CharSequence decorateOnFailureScript(CharSequence script) {
   return "alert('message')";
}

This creates two problems:

1) The first solution does not produce any error message. The Ajax call
just fails silently. There is no error indicated in the Ajax Debug
Dialog Box.

2) Some languages (at least French) make heavy use of single quotes. If
an error message is to be put between single quotes, all single quotes
inside the error message have to be escaped twice (once for Java and
once for _javascript_. A message like :

"S'il vous plait"

has to be written:

'S\\'il vous plait'

Although this is not a problem for a programmer ;-) , is can be more
problematic for the person who is in charge of translating the English
property file to French.

Pierre-Yves


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to