On 1/11/07, Joe Germuska <[EMAIL PROTECTED]> wrote:
I inferred the intent. I'm not sure if I agree with it or not, but I really haven't thought about it much. I agree there was lots of room for simplification and clarification in Tiles, so I won't say it was the wrong choice. Besides, simplification and clarification are sometimes at odds with each other!
Actually, now I think maybe it was the wrong choice. I recently realized that my Tiles implementation patterns were rather limited, and I just started taking advantage of the idea that you could insert either a JSP or a component with the same tiles:insert tag. I'll try to explain the case, although without a diagram, it might be tough. Say I want every page on my site to be a standard "stack" of three components: header body footer I could define a base Tiles definition which sets up the header and footer, and then extend it for each different body I have. This could refer to a single "shell" JSP with three tiles:inserts, one for each of those. Now, say that for some parts of my site, I want a "two column" body, as with a left nav, and for others, I have just one column. In the old syntax, I could flexibly use the "body" attribute to point to a component when I want the two-column version, or to a template (JSP) when I want the one column version, and go on with the same "shell" in all cases. There are probably other ways to get this done, but I did find it kind of elegant that you could flexibly refer to JSPs or Tiles defs without binding yourself to one or the other. Joe -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "The truth is that we learned from João forever to be out of tune." -- Caetano Veloso