The tiles controller should never perform any view logic. The controller just gets data and puts it in the request for the tile to display.

David



From: John Nikolai <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Each Tile can have its own controller ?
Date: Fri, 28 Feb 2003 10:11:45 -0800


What are the advantages of using this method as opposed to creating a taglib? I did read the last part of the document:


"Tiles can�act as�"quasi" tag libraries - I could have written " .penguin.header " Tile as a tag library instead of a tile. But if a tile has significant display�logic, do I want to bury that in Java code where my interface guys can't tweak it? Taglibs are a vehicle for reuse; invest some time, get some reuse. What are the odds I going to reuse my " .penguin.header " tile in another project?"

Using a combination of taglib and a template engine like Velocity would solve the problem of having to embed HTML code into the java code. Are there other uses for tile controllers besides a taglib replacement? I guess it comes down to user preference and it's always good to have several options to choose from. =)

- John

On Friday, February 28, 2003, at 06:42 AM, David Graham wrote:

http://blogs.browsermedia.com/patrick/index.do?date=20030211#130200



From: "Rick Ashley" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Each Tile can have its own controller ?
Date: Fri, 28 Feb 2003 12:46:42 +0000

Tiles site http://www.lifl.fr/~dumoulin/tiles/
says that each tile can have its own controller.
=>It is now possible to associate a controller to each Tile.
This controller (Java code or struts action) is called immediately before the Tile jsp page. It is useful to prepare data to be shown by jsp page.


Has anyone a sample code how to do this in Struts application?

Thanks

- rick






_________________________________________________________________ MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk


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


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



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



Reply via email to