Tiles and Sitmesh are both page decoration tools, but they go about things very differently.
From my (limited) understanding, Tiles you have to 'push' everything into it. If you want a title - you need to specify it in tiles-def.xml. I'm not sure what Tiles gives you that you couldn't achieve with a big velocity template & a properties file to pull the value in from.
Sitemesh on the other hand, understands the HTML of the page you are decorating. So you just have to produce HTML as your raw input. You can view your pages with or without decorators, and they are still valid HTML files.
However, the distinction is that you can only have one decorator per page, rather than lots of 'tiles'. Mostly this fits with web design, as usually there is one rather large 'content' area, with some other navigation around it.
The other advantage is that your pages are almost completely decoupled from your decorators. These three URLs are exactly the same, aside from the decorators used:
http://jira.opensymphony.com/secure/Dashboard.jspa http://jira.opensymphony.com/secure/Dashboard.jspa?decorator=printable http://jira.opensymphony.com/secure/Dashboard.jspa?decorator=none
If you want to do what you are after - you can achieve it with sitemesh. You can do your conditional 'put admin navigation on the admin page' either with different decorators, or with conditional logic inside a decorator.
You could even use Tiles inside your decorator (decorators as just JSP files) to do this logic.
The other advantage of sitemesh is that you can use it to decorate 'parts of pages'.
The code for this page looks like:
http://jira.opensymphony.com/secure/CreateIssue!default.jspa
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <html> <head> <title>Create Issue</title> </head>
<body> <page:applyDecorator name="jiraform"> <page:param name="title">Create Issue</page:param> <page:param name="description"><b>Step 1 of 2</b>: Choose the project and issue type...</page:param> <page:param name="action">CreateIssue.jspa</page:param> <page:param name="submitName">Next >></page:param>
<ui:select label="'Project'" name="'pid'" list="allowedProjects" listKey="'long('id')'" listValue="'string('name')'" /> <ui:select label="'Issue Type'" name="'issueType'" list="/constantsManager/issueTypes" listKey="'string('id')'" listValue="'string('name')'"> <ui:param name="'helpURL'">issues</ui:param> <ui:param name="'helpURLFragment'">#IssueTypes</ui:param> </ui:select> </page:applyDecorator> </body> </html> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That's it - the whole page. The 'jiraform' decorator decorates the form box, and the normal decorator decorates the whole page. Take a look at the source for the above to see how much extra is added.
Anyhow - I'd suggest that you look at sitemesh. It doesn't do what you are asking - but I think that sitemesh and other tools means that you don't actually want to do that ;)
Cheers, Scott
John Patterson wrote:
This would make the template impossible to reuse in another page that required different navigation or other areas of the page to contain different components. The problem is due to the lack of separation between the template and the specification of what should be placed in the template. With Sitemesh only one component may be placed into the template which is defined by the request URL.
Or have I missed something?
Are there plans to add Tiles like functionality to the "Componentisation" tags or should I just use Tiles?
----- Original Message ----- From: "Matt Ho" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 11, 2003 5:53 PM
Subject: Re: [OS-webwork] Webwork with Tiles
On Fri, 11 Jul 2003 12:56:21 +0100, John Patterson <[EMAIL PROTECTED]> wrote:
I am looking into using Webwork for an upcoming web project. In the
past
I have used Struts with the Tiles extension which I really liked for its page layout abilities. It seems that with Webwork most people are using Sitemesh to do something similar. From what I can tell Sitemesh allows you to decorate a page with headers and footers etc. but can not do dynamic
page
composition. Is this correct?
This isn't entirely correct. As you can specify which decorator to use in sitemesh, you could have a Context menu mesh that does what you're describing. However, this logic needs to be done directly in the jsp rather than in an xml file like tiles. The sitemesh site, http://www.opensymphony.com/sitemesh/, has a good drawing of this.
M
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
--
ATLASSIAN - http://www.atlassian.com Expert J2EE Software, Services and Support ------------------------------------------------------- Need a simple, powerful way to track and manage issues? Try JIRA - http://www.atlassian.com/software/jira
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork