Hmm, it is actually working, and I do agree that you write wouldn't work...
This is the output on the html generated by wicket:
<input value="Generer rapport" type="submit" disabled="disabled"
onclick="showContent('uglyfix');showContent('uniquename');" name="wordbutton"
id="wordbutton"/>
<input value="< Tilbage" type="submit"
name="previousbutton" id="previousbutton"/>
As you see the \" apparently are escaped to ' when processed by wicket.. Im
running on wicket 1.2.
About the pattern script, yeah it does not feel like the best solution, but
currently I cant see any other.
Regards Nino
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Klochkov
Sent: 8. december 2006 13:35
To: [email protected]
Subject: Re: [Wicket-user] javascript handlers in html - quotes escaping
Nino Wael wrote:
> <input id="wordbutton" disabled="disabled"
> type="submit" value="Generer rapport" wicket:id="wordbutton"
> onclick="showContent('uglyfix');showContent('uniquename');" />
>
How can you run this example with wicket?? It escapes qoutes in a
strange wa so you should have the following code in the result html:
<input id="wordbutton" disabled="disabled" type="submit" value="Generer
rapport" wicket:id="wordbutton"
onclick="showContent(\"uglyfix\");showContent(\"uniquename\");" />
And this script wouldn't work in IE and Firefox at least!
BTW I found a workaround for IDs problem using
TextTemplateHeaderContributor: I place all IDs in variables and have
javascript template file which uses these variables, so wicket replaces
variables with actual IDs in runtime.
> Small code snip on howto workaround the path generated by wicket:
>
Thanks for this one. It's not very clean solution but anyway it's better
than placing all handlers in java components.
--
Andrew Klochkov
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user