> David Geary Wrote: > Perhaps, but assuming we want the same functionality that Tiles > currently provides, such as XML tile definitions, tile inheritance, > role-based tiles, controllers, etc., you're going to have to reinvent > it unless you leverage Tiles somehow. You can have layout components, > certainly, but that would just be the tip of the Tiles iceberg.
I would argue that the point of the xml subview component would be to provide something that tiles could not. For another example, a dataTable that defines first and last name. Notice the EL for the value attribute of the dataTable #{managed-bean-name.persons}. The managed-bean-name will be replaced with the id attribute of the subview component in the JSP this allows a definition to be used against more than one managed bean/ view controller. In the next displayElement definition, a couple columns are added to the personTable component. The only way to do this with JSP and tiles is to create two JSP's and use tiles to pull in a different fragment. JSP Tag <sh:xsubview id="personTable" elementId="personTable" /> <sh:xsubview id="employeeTable" elementId="employeeTable" /> XML view definition <displayElement elementId="personTable" extends="dataTable"> <attributes> <set name="value" useValueLateBinding="true" value="#{managed-bean-name.persons}"/> <set name="var" value="e"/> <set name="rows" value="5"/> <set name="first" value="1"/> <set name="border" value="1"/> <set name="cellpadding" value="3"/> </attributes> <element renderId="1" elementId="firstNameColumn"/> <element renderId="2" elementId="lastNameColumn"/> </displayElement> <displayElement elementId="employeeTable" extends="personTable"> <element renderId="0" elementId="ssnColumn"/> <element renderId="3" elementId="birthDateColumn"/> </displayElement> > I would advocate a layer of Shale components/renderers/variable > resolvers/whatever that integrate with Tiles. Perhaps we could make > layout components an option instead of layout JSP pages, as is the > default for Tiles, although I bet most people would prefer the latter. > I don't see the two options being mutually exclusive. Gary