Re: [Wicket-user] Double quotes in AjaxCall Decorator scripts

2006-08-28 Thread Igor Vaynberg
On 8/28/06, Pierre-Yves Saumont <[EMAIL PROTECTED]> wrote:
Not really a problem for me. It's just that it can be misleading to havean Ajax call failing when Wicket Ajax Debug Window says it succeeded.it really says it succeeded? the call should never be made...
 May be I did not make myself clear : using double quotes in the failurehandler script makes the *Ajax call* fail, not only the failure handler.
 the entire call is not made because the handler has a broken js syntax correct?i think at the end you have to know where in the html this is going to so that you can properly escape stuff. maybe some javadoc on the call decorator - mind creating a patch?
-IgorPierre-YvesIgor Vaynberg a écrit :> not that much we can do since the event script is already in quotes when
> in html eg >>> 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] [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> <
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>> ___> Wicket-user mailing list> 
Wicket-user@lists.sourceforge.net> 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 easierDownload 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.nethttps://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


Re: [Wicket-user] Double quotes in AjaxCall Decorator scripts

2006-08-28 Thread Pierre-Yves Saumont
Not really a problem for me. It's just that it can be misleading to have 
an Ajax call failing when Wicket Ajax Debug Window says it succeeded.

May be I did not make myself clear : using double quotes in the failure 
handler script makes the *Ajax call* fail, not only the failure handler.

Pierre-Yves

Igor Vaynberg a écrit :
> not that much we can do since the event script is already in quotes when 
> in html eg onclick="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]  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


Re: [Wicket-user] Double quotes in AjaxCall Decorator scripts

2006-08-28 Thread Igor Vaynberg
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.-IgorOn 8/28/06, 
Pierre-Yves Saumont <[EMAIL PROTECTED]> wrote:
Hello,When defining a script to use with decorateOnFailureScript inAjaxCallDecorator, 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 DebugDialog Box.2) Some languages (at least French) make heavy use of single quotes. Ifan error message is to be put between single quotes, all single quotes
inside the error message have to be escaped twice (once for Java andonce 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 Englishproperty 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 easierDownload 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.nethttps://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