You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andreas Toom <an...@comitnet.com> on 2005/05/09 16:04:39 UTC

Multiple tiles layouts for single application

Hello, is there a way to switch tiles layout in an applaction depending 
on let's say request url. I have a struts-based application with a 
single purpose and I want to share this functionality with other 
php-based sites that my company have.

So if a request comes in to the site I want different layouts, each 
matching the calling site, for example:

http://myhost/myapp/ <- Original layout
http://myhost/myapp/site1 <- Site1 layout
http://myhost/myapp/site2 <- Site2 layout

The reason I wan't this is because I don't want do duplicate any action 
mappings in my struts-config. The major problem is form validation, 
since the input is just a simple tile definitions the app has no way to 
determine which layout to use. So if I had tiles-defs.xml, 
tiles-defs-site1.xml tiles-defs-site2.xml and a way to tell struts when 
to use which definition I figure the problem would be solved...

Is there a way to solve this without extending the request processor/ 
tiles plugin?, if not can anyone point me in a good start direction?

Any ideas appreciated.

/Andreas


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