struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: [s2] Tag prefixes
Date Thu, 20 Jul 2006 16:27:32 GMT
If you need multi-line bodies, then you are best off sticking to
directives for now.  If you don't need or want line breaks in your
body, then a tool will be fine.

The helpful thing in Velocity 1.5 is that you can have multi-line
string literals, interpolated strings, method calls, and directive
calls.  So you could do:

$tool.body(
"This is a $adjective body.
It has two lines."
)

with tool, where before you'd have had to do

$tool.body("This is a $adjective body.${br}It has two lines.")

Where the value of $br is a line break character.

Of course, we have yet to release Velocity 1.5 though it is extremely
stable and much superior to 1.4, because some of us (occasionally
including myself) are rather determined to knock off a few more old,
obscure bugs first, but haven't made the time to do it.  All the new
features are done though, so there shouldn't be any more API changes.

On 7/19/06, Patrick Lightbody <forum-struts-dev@opensymphony.com> wrote:
> Nathan,
> I don't think "tools" will work for us for now because of the body tag requirements.
Perhaps Velocity 1.5 will help?
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=37739&messageID=74500#74500
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message