[OT] Re: Best practice for dynamic Title values using Tiles?
Hello Rick. Happy New Year to you. I'm just curious. Why are you switching? I remember you advocating Sitemesh (I think it was on your site) instead of Tiles at some point. I haven't tried either one yet, but was going to try Sitemesh based largely on your recommendation, next time I saw a good opportunity. So far I haven't needed a layout framework, but I've gotta catch up with the times at some point . . . Erik Rick Reumann wrote: I'm switching back to using Tiles instead of Sitemesh and I remember one issue that I found annoying with Tiles and I'd be curious how you guys handle it. Say I have a form that is going to be reused for both Edit and Add. I want the title attribute to read something like Add Employee or Edit Employee, depending on what I'm doing. It seems silly to have to create multiple definitions in my tiles-definitions that are essentially the same exact definition except that the title has changed (potentially you might want a definition to be used for more than just the two that I mentioned). This also requires that my struts config has to be set up to forward to multiple tiles definitions when its really the same page layout but with a different title and could really just require one definition to use. I've thought of different ways I might want to handle this (ie set a title in request scope before leaving action and have the header.jsp look for this, or maybe use a filter or over-ride RequestProcessor?) I'm curious if others have run into this. Maybe the latest Struts/Tiles has a solution that I have not looked into. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Re: Best practice for dynamic Title values using Tiles?
+1 on Erik's request. I sometimes go about things the wrong way. I was thinking I should use SiteMesh to figure out which HTML page to use as the final layout for each virtual host (the SiteMesh decorator I'm going to write will figure that out and make sure it exists) OR use tiles with div's plus a CSS to lay out the locations of the divs. The SiteMesh option will work with older browsers who aren't handy with CSS but the tiles+div+CSS option would be much more modern. I could then use tiles to change the CSS if someone wanted a more printable layout (i.e. hide ads or other un-printer friendly components). This makes me curious about what shortcoming you found in SiteMesh related to your particular project. Regards, David -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 10:47 PM To: Struts Users Mailing List Subject: [OT] Re: Best practice for dynamic Title values using Tiles? Hello Rick. Happy New Year to you. I'm just curious. Why are you switching? I remember you advocating Sitemesh (I think it was on your site) instead of Tiles at some point. I haven't tried either one yet, but was going to try Sitemesh based largely on your recommendation, next time I saw a good opportunity. So far I haven't needed a layout framework, but I've gotta catch up with the times at some point . . . Erik Rick Reumann wrote: I'm switching back to using Tiles instead of Sitemesh and I remember one issue that I found annoying with Tiles and I'd be curious how you guys handle it. Say I have a form that is going to be reused for both Edit and Add. I want the title attribute to read something like Add Employee or Edit Employee, depending on what I'm doing. It seems silly to have to create multiple definitions in my tiles-definitions that are essentially the same exact definition except that the title has changed (potentially you might want a definition to be used for more than just the two that I mentioned). This also requires that my struts config has to be set up to forward to multiple tiles definitions when its really the same page layout but with a different title and could really just require one definition to use. I've thought of different ways I might want to handle this (ie set a title in request scope before leaving action and have the header.jsp look for this, or maybe use a filter or over-ride RequestProcessor?) I'm curious if others have run into this. Maybe the latest Struts/Tiles has a solution that I have not looked into. Thanks - 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]
Re: [OT] Re: Best practice for dynamic Title values using Tiles?
Erik Weber wrote the following on 1/24/2005 10:47 PM: Hello Rick. Happy New Year to you. I'm just curious. Why are you switching? I remember you advocating Sitemesh (I think it was on your site) instead of Tiles at some point. I haven't tried either one yet, but was going to try Sitemesh based largely on your recommendation, The reason I'm switching is that some of the pages we display can possibly be very very large in size (reporting information). SitemMesh has to store the entire response as a String in an object (I think backed as StringBuffer but not positive). So you can see the problem if you potentially have a huge page to display. Locally, I actually crashed my version of Tomcat when trying to render a page since it ran out of memory when trying to buffer such a large page. Tiles doesn't have this problem since it flushes the response out as it goes along. Tiles, although more work to configure, saves me from having to worry about these potential memory problems. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]