You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jo...@apache.org on 2001/06/11 02:03:34 UTC

cvs commit: jakarta-turbine/src/java/org/apache/turbine/modules/layouts VelocityECSLayout.java VelocityOnlyLayout.java

jon         01/06/10 17:03:34

  Modified:    src/java/org/apache/turbine/modules/layouts
                        VelocityECSLayout.java VelocityOnlyLayout.java
  Log:
  bring these two classes more in line with each other
  
  Revision  Changes    Path
  1.9       +6 -2      jakarta-turbine/src/java/org/apache/turbine/modules/layouts/VelocityECSLayout.java
  
  Index: VelocityECSLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/layouts/VelocityECSLayout.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VelocityECSLayout.java	2001/05/05 17:45:48	1.8
  +++ VelocityECSLayout.java	2001/06/11 00:03:33	1.9
  @@ -73,9 +73,9 @@
    * screens and navigations there should be relatively few reasons to
    * subclass this Layout.
    *
  - * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
  + * @author <a href="mailto:john.mcnally@collab.net">John D. McNally</a>
    * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
  - * @version $Id: VelocityECSLayout.java,v 1.8 2001/05/05 17:45:48 mpoeschl Exp $
  + * @version $Id: VelocityECSLayout.java,v 1.9 2001/06/11 00:03:33 jon Exp $
    */
   public class VelocityECSLayout extends Layout
   {
  @@ -118,6 +118,10 @@
            * Grab the layout template set in the TemplatePage.
            */
           String templateName = data.getTemplateInfo().getLayoutTemplate();
  +
  +        /* Set the locale and content type */
  +        data.getResponse().setLocale(data.getLocale());
  +        data.getResponse().setContentType(data.getContentType());
   
           /*
            * Finally, generate the layout template and add it to the
  
  
  
  1.10      +11 -2     jakarta-turbine/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java
  
  Index: VelocityOnlyLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/layouts/VelocityOnlyLayout.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- VelocityOnlyLayout.java	2001/05/23 16:36:12	1.9
  +++ VelocityOnlyLayout.java	2001/06/11 00:03:33	1.10
  @@ -88,6 +88,7 @@
       {
           /* Get the context needed by WebMacro */
           Context context = TurbineVelocity.getContext( data );
  +
           /* Screen results */
           String returnValue = "";
   
  @@ -97,13 +98,21 @@
            */
           ConcreteElement results = ScreenLoader.getInstance()
               .eval(data, data.getScreen());
  +
           if (results != null)
  +        {
               returnValue = results.toString();
  +        }
   
  -        /* variable for the screen in the layout template */
  +        /*
  +         * variable for the screen in the layout template
  +         */
           context.put("screen_placeholder", returnValue);
   
  -        /* variable to reference the navigation screen in the layout template */
  +        /*
  +         * Variable to reference the navigation screen in the layout
  +         * template.
  +         */
           context.put("navigation", new TemplateNavigation( data ));
   
           /* Grab the layout template set in the WebMacroSitePage.  
  
  
  

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