I was going to if Unicode didn't fly -- but I should have anyway: it
works perfectly, of course, and it's more portable (list of browsers
that support Unicode: http://www.alanwood.net/unicode/browsers.html ).
Though if you don't have to worry about browsers that don't support
Unicode, Unicode /does/ have more alternatives (like using
double-primes, quotes that turn inward, etc.).

Thanks!
Jim
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ron Piterman
Sent: Wednesday, October 11, 2006 5:31 AM
To: [email protected]
Subject: Re: Escaping quotes in OGNL expressions in Tapestry templates

have you tried:

value="ognl:'Section: "' + section.name + '"'"

?

Cheers, Ron


Jim Steinberger wrote:
> Hello,
> 
> I ran into the situation where I needed to insert a double-quote in an
OGNL expression.  I wanted to do: value="ognl:'Section: \"' +
section.name + '\"'", but the Tapestry parser doesn't like that very
much.
> 
> A solution offered in the archives is to explicitly declare the
component in the .page or .jwc file, where you can escape strings in the
parameter-bindings just like in Java.
> 
> 
> I prefer anonymous components directly in the template, myself, and
wanted to offer the alternative of using Java's Unicode capability:
"ognl:'Section: \u0022' + section.name + '\u0022'".   Double Quote =
\u0022, Single Quote = \u0027.  Works great for me in Tapestry 4.0.2.
> 
>  
> Jim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to