Put the OGNL inside the xml file:
<binding name="foo">
'"' + propertyToBeEnclosedInQuotes + '"'
</binding>
See, that's a double quote inside single quotes. You can do this in
the XML very easily, but its all but impossible in the HTML template.
You can also try:
<span jwcid="mycomponent" value="ognl:enquote(propertyToBeEnclosedInQuotes)"/>
And in the Java code:
public String enquote(String value)
{
return String.format("\"%s\", value);
}
That is .. do the heavy lifting inside Java code and call it from the
template via OGNL. In fact, if the value may itself contain double
quotes, you may want to add logic to escape those quotes with
backslashes.
There's a method in TapestryUtils named enquote(), but it encloses
inside single quotes.
The point is ... figure out where it's easiest to express, and do it there.
On 4/4/06, Greg Cormier <[EMAIL PROTECTED]> wrote:
> How can I output double quotes in OGNL?
>
> I have a moderately complicated Border setup. There's lots of @If's for
> opening and closing new sub-menu's.
>
> Unfortunately, Tapestry dies because nested tags confuse it (as they should).
> So to work around this, I just use @Insert with raw=true and print out my UL
> or LI tags as appropriate, and close them when needed.
>
> Thanks,
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]