Shawn,
Thanks for your help. I think I'm starting to grasp more of this
Tapestry stuff.
Shawn Church wrote:
You are correct, the @Insert I showed would just render the URL string
itself. I was mainly trying to illustrate the example, but in reality
you would probably want to use an @Any in that case as well, e.g.:
<a jwcid="@Any" href="ognl:yahooUrl">Yahoo</a>
Ahh, that's what I was missing -- arbitrary attributes are also replaced
if they have Tapestry values. With this I can easily see the trade-offs
between the Java code and the other @Any method you suggested. I knew
it couldn't be as hard as I was making it!
Regarding the "possibly cleaner" comment, I wasn't recommending doing
any presentation formatting within your java code, but rather only
providing the data needed by the page. I don't normally encode any html
in my java code unless I'm writing a component which is designed to
render html. By "possibly cleaner", I was really talking about avoiding
a lot of messy OGNL string concatenations and other formatting, since it
may become a problem if you need to (for example) embed single or double
quotes in the string, or if your data objects may contain null values,
or if you need to conditionally alter the format based on certain object
values, etc. [ ... ]
Yes, that makes sense. Clearly if I need to use the same URL format on
multiple pages, Java will be the way to go. I think I may end up doing
it this way anyway, at least for the learning experience.
Thank you again. Your detailed responses have made this quite clear.
And I think I'm starting to like Tapestry.
-- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]