I took the idea and am trying to implement it within the TemplateService
(I think I pretty much have it, I just haven't tested anything.) One
reason being to try to avoid the indexOf operation on every request, but
it also opens up another possibility:
If the template parameter is considered a key, that can be used to get
the screen template, layout template, and Screen class, other
implementations of the service could be easier to build. Another
implementation I have in mind, is a property-type file which explicitely
lists the 3 objects associated with the key. Some people (at least at
CollabNet) prefer this implementation. I personally think the current
scheme is easier to develop with, but as you move into production it
could be good to switch to the property file implementation as it
provides a central location for tracking and turning on new templates.
But the main point being (as I don't plan to implement this other
method, right now,) is that it could be done simply by subclassing the
current TurbineTemplateService implementation and overriding one method.
John McNally
Jon Stevens wrote:
>
> on 2/7/01 4:34 AM, "ingo schuster" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I'd find it very useful if the TemplatePage cheked the templates parameter
> > for a file extension. If there is no extension, the default template
> > extension should be added.
> > That'd allow to use URLs like ".../template/login" that are independent of
> > the actual templating system.
> >
> > ingo.
>
> done. also ingo, in the future please make sure that your emails are not
> wrapped...i had to apply that patch by hand... :-)
>
> thanks,
>
> -jon
>
> --
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> <http://jakarta.apache.org/velocity/> && <http://java.apache.org/turbine/>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]