What I'm thinking about if you have a hierarchy of template in this
directory structure and you can't find the screen class in the package
hierarchy, you may want to share the common screen with the same name. 
Instead of falling right to the Default of the parent directory, you
fall to the same class of your parent.

In my last example, for instance, I can make an Index screen that's
shared among all language code by coding it in screens.html.Index.  If I
want to override, I write a new class screens.html.en.Index.  That means
when I request for a template /html/en/Index.vm, I will load
screens.html.en.Index.  However, if I load /html/es/Index.vm and I don't
have screens.html.es.Index, I'll load the common screens.html.Index
instead.

I don't think the search order I'm looking for is really in violation of
the old one.  The "overriding" behavior is still the same at the top
level directory (Index falls to Default).  It's just that when you look
for the class in the parent directory, you need to for the class with
the same name first.

Will

John McNally wrote:
> 
> The basic idea is that templates sharing a common java Screen would be
> grouped together, but if some other reason exists for a template to
> exist with others within a directory, but it does not share the same
> class, there is a way to override.  What would be the rationale for the
> mapping you propose?
> 
> John McNally
> 
> William Lee wrote:
> >
> > Thanks a lot, I think I get it now.  Wouldn't it make sense though to
> > have the search sequence to be:
> >
> >  screens.html.en.Index
> >  screens.html.en.Default
> >  screens.html.Index
> >  screens.html.Default
> >  screens.Index
> >  screens.Default
> >
> > I would imagine it would have a finer grain of control over what screen
> > to load.  The consequence may be having to test the existance of twice
> > as many classes.  I don't really envision to have a very deep hierarchy
> > though.  Anyway, just a thought.
> >
> > Will


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to