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.


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
Wicket-user mailing list

Reply via email to