David,

Thanks for your reply on this. I haven't had a chance to look at the
controller idea yet, hence have not replied. I will investigate when I am
not up to my ears in other things.

Thanks for you time.

Kevin 

-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED] 
Sent: 25 November 2005 04:23
To: Struts Users Mailing List
Subject: RE: Tiles Again - Can anyone help?

Kevin,

What you described is perfect for a controllerClass="..." or
controllerUrl="..." attribute inside a tile definition, as I suggested ina
previous post. A controller lets you add, remove, or alter the pieces of a
tile.  It sounds like you might want one of your items to be a list which
you could add pieces to for automatic insertion of additional
text/buttons/etc.  Check out the tilesAdvancedFeatures.pdf file for more
details.   Again, you could make your Action
class a tiles Action type class or simply put the logic into the tile using
the controllerXXX="..." syntax options.

Regards,
David

-----Original Message-----
From: Leahy, Kevin [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 24, 2005 7:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Tiles Again - Can anyone help?


Yes what you provided works fine, but it doesn't allow me to 'put' other
components into the 'OuterLayout' as well as into the 'InnerLayout'.

What I'm trying to do is to have one generic layout that all pages following
and then sublayouts that are more geared to different parts of the site.

For example every page has the menu and a title ( and some other things ) so
this would be reflected in the OuterLayout.

But certain subsets of the pages are also very similar to one another. So
pages 1,2,3,4 might have core components in common. And 5,6,7,8 might share
a core of components, but have little in common with 1,2,3,4. These
groupings seem like they should be given layouts of their own.

So what I want is tiles that combine the outer and inner layouts so that I
can put the title for each page into the 'OuterLayout' and to put other
components to the inner layouts.

I think what you've described below will force me to build a Form1Layout and
Form2Layout which will both have the menu and the title components etc. (
cut and paste in other words ). When I want to change something that applies
across the site ( i.e. where I would like it to be in the 'OuterLayout' ) I
will have to change all the layouts.

I apologise if I'm misunderstanding your suggestion, but at the moment
that's how I see it.

Of course this isn't going to stop me developing the site. I can work around
as I'm currently doing, but it just seemed that this was something Tiles
would allow you to do, so I figured there was probably a way of doing it.

I followed your example of defining a tile with an innerlayout and then
putting it into the body of the outerlayout and it worked fine and I could
put components into the outerlayout, but I couldn't put components into the
innerlayout at the same time. Is this something you think is possible?

Thanks again.

Kevin


-----Original Message-----
From: Greg Reddin [mailto:[EMAIL PROTECTED]
Sent: 23 November 2005 22:35
To: Struts Users Mailing List
Subject: Re: Tiles Again - Can anyone help?


On Nov 23, 2005, at 4:13 PM, Leahy, Kevin wrote:

> <definition name="tile.page1" extends="tile.outer" >
>     <!-- insert into OuterLayout -->
>     <put name="Title" value="/pageComponents/GenericTitle.jsp" />
>     <put name="Content" value="tile.inner" >
>         <put name="Optional1" value="/pageComponents/Optional1.jsp"
> />
>         <put name="Optional2" value="/pageComponents/Optional2.jsp"
> />
>     </put>
> </definition>
>
> However the put tag doesn't take nested elements. I tried already.

You're right, that's not supported.  I like the idea though.  I wonder how
hard it would be to support that.

> I'm sure
> there must be way to do this though. Is there a way to make layouts 
> extend other layouts. I.e. in the example above could I specify a 
> third layout that combined the inner and outer into a third one 
> somehow?

I thought the code I posted in my last response would basically do this.
With Tiles anything can be a definition.  If you just wrap up what you need
in another definition then insert that, you should be able to accomplish
what you want.  Does the code reposted below not do that?

> Unfortunately, the only way I can think of to do that in definitions 
> is
> this:
>
> <definition name="tile.form" path="/layout/FormLayout.jsp" >
>      <put name="AlwaysThereFilter"
>          value="/pageComponents/AlwaysThereFilter.jsp" />
>   </definition>
>
> <definition name="tile.form.withSomeFilter" extends="tile.form">
>      <put name="SometimeFilter"
>          value="/pageComponents/SometimeFilter.jsp" /> </definition>
>
>   <definition name="tile.form1" extends="tile.base" >
>       <put name="title" value="Form 1 Page" />
>       <put name="body" value="tile. form.withSomeFilter" /> </
> definition>
>

Greg


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


----------------------------------------------------------------------------
----
The information contained herein is confidential and is intended solely for
the addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient,
please contact the sender either via the company switchboard on +44 (0)20
7623 8000, or via e-mail return. If you have received this e-mail in error
or wish to read our e-mail disclaimer statement and monitoring policy,
please refer to http://www.drkw.com/disc/email/ or contact the sender. 3167
----------------------------------------------------------------------------
----


---------------------------------------------------------------------
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]


--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167
--------------------------------------------------------------------------------


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

Reply via email to