You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rob van Swol <va...@nlr.nl> on 2003/12/03 14:43:01 UTC

Multiple templates question

Hi,

I am new to Tapestry and so far I like it. Now I have a question about
using different HTML templates with the same class. An example:

In my test.application I have:

  <page name="View" specification-path="View.page"/>
  <page name="Update" specification-path="View.page"/>
  <page name="Add" specification-path="View.page"/>

and in View.page I have:

<page-specification class="View"/>

Thus when I ask for View, Update or Add I always get the page
View.class, which is what I want. (and getPage().getPageName() returns
the correct name).
Now I hoped that by having also View.html, Update.html and Add.html the
corresponding template would be used. However View.class seems to be
tied to View.html because template is always used. I know I can do some  
tricks using the @Conditional component (and test on ognl:page.pageName)
in the View.html page to distinguish the 3 cases, but I think using 3
templates would be more elegant. Is this possible?

Regards,
Rob
--
_____________________________________________________________

Rob W. van Swol
National Aerospace Laboratory NLR       Tel. +31 527 248252
P.O. Box 153                            Fax  +31 527 248210
8300 AD Emmeloord                       E-Mail vanswol@nlr.nl
The Netherlands                         http://www.neonet.nl/



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org