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
>
> John McNally wrote:
> >
> > If template="/html/en/Index.vm"
> >
> > Then matching screens will be looked for in
> > screens.html.en.Index
> > screens.html.en.Default
> > screens.html.Default
> > screens.Default
> >
> > So screens.Index will not match.
> >
> > If Screen and layout template are not language dependent you could
> > organize them according to the template as given in the url (which I
> > think you may be doing); then make sure the path conversion occurs after
> > the assignment of layout and Screen. Though I think it might
> > occasionally make sense to alter the layout based on language as well,
> > if one set of layouts is sufficient it certainly reduces complexity.
> >
> > John McNally
> >
> > William Lee wrote:
> > >
> > > I'm using tdk 1.10a11 and when I try to find the certain screen class by
> > > the template path, it always goes back to Default.class. Here is what I
> > > do:
> > >
> > > I overrided the VelocityPage to write my own stuff. I have the
> > > structure similiar to the VelocityPage's doBuildAfterAction()
> > >
> > > if (!data.hasScreen())
> > > {
> > > i18nTemplate(data);
> > > String template =
> > > data.getTemplateInfo().getScreenTemplate();
> > > // Get the layout template and the correct Screen.
> > > String layoutTemplate =
> > > TurbineTemplate.getLayoutTemplateName(template);
> > > data.getTemplateInfo().setLayoutTemplate(layoutTemplate);
> > >
> > <snip/>
> >
> > > My i18nTemplate function would actually switch the template to a
> > > perdefined directory structure. For example, if one loads Index.vm,
> > > it'll turn the template in the data as "/html/en/Index.vm" if the locale
> > > is English.
> > >
> > > One problem I'm having is that the TurbineTemplate.getScreenName doesn't
> > > seem to work correctly. For the Log.note line essentially prints out
> > > the template is "/html/en/Index.vm" and the screen is "Default". I have
> > > my Index.class inside the ...modules.screens package along with the
> > > Default.class. The module package is in the module.packages. The
> > > Default.class loads fine and the template that sits in
> > > template/screens/html/en/ loads fine. So I know they're not the
> > > problem. Can somebody tell me what can go wrong? I'm using
> > > VelocityOnlyLayout BTW.
> > >
> > > Thanks,
> > >
> > > Will
> > >
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]