You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Derek Richardson <De...@appiancorp.com> on 2003/02/15 01:51:44 UTC

Tiles, Modules, and Multiple Definition Files

I am using 1.1b3.

I have a default module and several explicit modules (say A and B). The default module and the explicit modules all use tiles. I would like to access the default module's definitions in the explicit modules. So this is what I want:

Module   Accessable Definitions
Default  Default
A        Default, A
B        Default, B

Furthermore, I would like the definitions for A and B to be able to extend the definitions for Default.

>From reading the archives, I understand that struts modules have no heirarchical structure. So there's no way to say that default is the supermodule and A and B are submodules and have the inheritance imply visibility. Thus the cleanest way of implementing what I want is not possible.

The next cleanest is to declare multiple tiles definition files in the TilesPlugin in the struts-config of each module. As I understand it, this will make the definitions from all and only the declared files available within the module they are declared (assuming moduleAware=true). Which achieves my accessibility goals.

My real question is: how are the namespaces handled with multiple tiles definition files? Are they all read and dumped into the same space, as if they had been in one file? Or is there some sort of partitioning? Can definitions from one tiles definition file extends definitions from another, assuming they are both loaded in the Plugin? What if there is a naming conflict - how is that resolved?

The worst solution would be to have to cut-n-paste the default definitions into the subapp definition files. From what I've read, I don't think this is necessary.

I have done some reading on this issue, but there does not seem to be a comprehensive treament of the issue in any one place. Not only would I appreciate knowing more about the details of this topic, but I think it would be a useful addition to the archives.

Thanks,

Derek Richardson

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


Re: Tiles, Modules, and Multiple Definition Files

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 14 Feb 2003, Derek Richardson wrote:

>
> I am using 1.1b3.
>
> I have a default module and several explicit modules (say A and B). The default module and the explicit modules all use tiles. I would like to access the default module's definitions in the explicit modules. So this is what I want:
>
> Module   Accessable Definitions
> Default  Default
> A        Default, A
> B        Default, B
>
> Furthermore, I would like the definitions for A and B to be able to
> extend the definitions for Default.
>

The whole topic of "extension" or "inheritance" is on the roadmap for
Struts 1.2 -- it's a cool idea, but not going to be addressed for 1.1.

I will have to let Cedric speak to the rest of the questions - I am by no
means a Tiles guru.

Craig

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