Tiles does not solve the problem. As far as I can see, Tiles makes it easy to configure your presentation pages, and pass variables between templates. It makes your presentation design work more OO.
However, my issue is more of an archietecture problem, not a presentation problem. Keith -----Original Message----- From: rajesh kalluri [mailto:[EMAIL PROTECTED]] Sent: Thursday, 7 March 2002 10:46 a.m. To: Struts Users Mailing List Subject: Re: design flaw if using a template... Keith, check out............... http://www.lifl.fr/~dumoulin/tiles/ .............the new examples that come with it solve some related problem. > Hi > > Struts provides us with a nice MVC architecture, where: > - a user's click maps to an Action > - based on the results, the user is forwarded to the view > > <template:insert template="news.jsp"/> > > In news.jsp we can access the database and retrieve the news for display. > This breaks the MVC pattern, since the view is accessing the model. > Alternatively, we have have this in the template.jsp: > <template:insert template="news.do"/> ---Every tile is associated with a controller (make sure you check out the struts-config.xml that comes with tiles distrib) --- Controller for each tile prepares the data required for each tile (eliminating the need for your - news.jsp we can access the database and retrieve the news for display) ---then in your template news.jsp you can import the data with tiles specific tags like <tiles:importAttribute name="catalog" /> <tiles:importAttribute name="userItems" /> > Here's an example: > (1) User clicks on viewUserDetail.do > (2) ViewDetialAction forwards to user.jsp > (3) In template.jsp (used by user.jsp), news.do invokes NewsAction, and it > forwards to news.jsp > > Basically, I want to call > > <template:insert template="news.do"/> > > in the JSP. Has anyone done something like this? > > Keith > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

