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);

            String screen = TurbineTemplate.getScreenName(template);
            Log.note("***** Page: template is " + template + " screen is
" + screen);
            if (screen == null)
            {
                throw new Exception("Screen could not be determined. \n"
+
                    "No matches were found by TemplateService and the
\n" +
                    "services.TurbineTemplateService.default.screen \n"
+
                    "property was not set.");
            }
            data.setScreen(screen);
        }
    
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]

Reply via email to