Assume that you have a top-level layout in "layout.vm" and it contains the
following:
<html>
$tiles.get('head')
$tiles.get('body')
</html>
Now assume that "body" refers to another template "body.vm", which in turn
contains the following:
<body>
$tiles.get('nav')
$tiles.get('someContent')
</body>
I run this, I debug TilesTool with Eclipse, and when TilesTool.get() tries
to get the attribute 'nav', the ComponentContext object contains zero
attributes - so I'll get a ServletException because TilesTool can't find
'nav'..... My solution is to just call #parse. So, layout.vm would call:
<html>
#parse( $tiles.getString('head') )
#parse( $tiles.getString('body') )
</html>
and "body.vm" would have:
<body>
#parse( $tiles.getString('nav') )
#parse( $tiles.getString('someContent') )
</body>
I was going to try to use the veltag so that I could use the Tiles taglib,
but after 5 minutes going down that path, I was reminded of the fact that I
dislike using JSP w/ taglibs - too much typing.
Tim
-----Original Message-----
From: Marin� A. J�nsson [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 6:13 PM
To: 'Velocity Developers List'
Subject: RE: Veltag and JJAR
yup ... you've also aroused *my* curiosity ... since the TilesTool is *my*
baby ;)
have any more info on the problem?
cheers,
Marin�
> -----Original Message-----
> From: Nathan Bubna [mailto:[EMAIL PROTECTED]
> Sent: 4. september 2003 21:46
> To: Velocity Developers List
> Subject: Re: Veltag and JJAR
>
>
> Tim OBrien said:
> > I was using Struts w/ Velocity and I wanted to work with
> the tiles tag
> > library because I was having problems calling
> $tiles.get('blah') from
> > anything but the top layout.
>
> hmm. so this was a problem with the TilesTool? can you give
> an example or any more info on your setup? we'd like to get
> issues with the new tools worked out before the next release,
> and others may be experiencing the same problem.
>
> > After experimenting with mixed JSP/Velocity
> > content, I decided to take a more pragmatic approach and solve my
> > problem by referencing tiles using #parse(
> $tiles.getString('menu') ).
> > So, my initial need to use veltag is no more.
>
> glad you found a way that works for you! there are certainly
> quite a few options for doing layout stuff with
> VelocityView/VelocityStruts. (of course, we'd like them all
> to work for you :)
>
> > But.. trying to build veltag was a confusing experience. Someone
> > should update the build and the site, and make no mention of JJAR -
> > JJAR seems to be dead. I had to login to Minotaur to
> figure that out.
> > I'll volunteer to refactor this build if no one else has the
> > bandwidth.
>
> i believe veltag and it's docs are in the main velocity cvs.
> so, i can't check in those changes, but i'm sure the core
> velocity committers would appreciate any contribution like
> that. just file the report and any patches with bugzilla.
>
> Nathan Bubna
> [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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]