Rick, When your user edits your page and validation fails, will your request-scope title still be available? Obviously, not. How do you generally handle the case when you require some request-scope variables to stick around -- save them in the form as hidden inputs?
Thanks, Paul -----Original Message----- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 10:26 AM To: Struts Users Mailing List Subject: a plus for sitemesh [was] Re: Best practice for dynamic Title values using Tiles? Benedict, Paul C wrote the following on 1/25/2005 10:12 AM: > I wouldn't worry too much about having a different definition just to switch > title. In essence, it is a different view and so it's deserving of a unique > entry. Besides, the amount of typing is trivial because Tiles allows > overriding of definitions, so it is simply a matter of listing out one > attribute :) Don't forget though that it's not just a unique tiles def entry, but also involves more config for your action mappings definitions and your controller forwards. You can't just forward to "my.form.page" you know have to make sure you have forwards set up so that they can call a unique "my.edit.form.page" and "my.add.form.page," which is ok I guess. I'm now leaning towards just simply always putting the title and/or page header label into the request before leaving an Action. Sure there are some drawbacks to this but one of the nice things is it also allows for easy creation of some very nice custom labels. For example say you want the header to say "Edit the user record for John Doe." In a sense it's pretty clean to set up this label in the action vs using el on the page to pull out the user name. There seems to be too many times when the title needs to be dynamic so constantly adding logic to the header to handle this would be a pain. I know I'm not using Sitemesh now (see previous post about why - concerning buffering of large pages can cause problem), but this is where Sitemesh really shines. Using Sitemesh, you create your standard JSPs(velocity whatever) with titles on them and Sitemesh rips out the titles and decorates the whole page with your decorator and inserts the title it ripped out. So in this sense you can have unique logic for title displays on unique pages and yet the whole page is decorated with a common look and feel that you want. (In order to do this, though, Sitemesh needs to parse through your whole page first and store it in a buffer, which leads to the problem I mentioned previously). -- Rick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]