portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morci...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/pages JetspeedJspPage.java
Date Wed, 28 Aug 2002 18:08:10 GMT
morciuch    2002/08/28 11:08:10

  Modified:    src/java/org/apache/jetspeed/modules/pages
                        JetspeedJspPage.java
  Log:
  Add jnavigation tool to the context as a temporary fix - similar to JetspeedVelocityPage
(see Bugzilla issue 11901)
  
  Revision  Changes    Path
  1.5       +18 -5     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/pages/JetspeedJspPage.java
  
  Index: JetspeedJspPage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/pages/JetspeedJspPage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JetspeedJspPage.java	14 Jul 2002 17:18:57 -0000	1.4
  +++ JetspeedJspPage.java	28 Aug 2002 18:08:10 -0000	1.5
  @@ -57,15 +57,19 @@
   
   import java.util.*;
   
  +// Jetspeed classes
  +import org.apache.jetspeed.util.template.JetspeedTemplateNavigation;
  +
   // Turbine Modules
  -import org.apache.turbine.modules.*;
   import org.apache.turbine.modules.pages.JspPage;
   
   // Turbine Utility Classes
  -import org.apache.turbine.util.Log;
   import org.apache.turbine.util.RunData;
  -import org.apache.turbine.services.*;
  -import org.apache.turbine.services.jsp.*;
  +import org.apache.turbine.services.jsp.JspService;
  +import org.apache.turbine.services.TurbineServices;
  +import org.apache.turbine.services.velocity.VelocityService;
  +import org.apache.turbine.services.velocity.TurbineVelocity;
  +import org.apache.velocity.context.Context;
   
   /**
    * Same as turbine's JspPage, only that it extends JetspeedTemplatePage.
  @@ -91,6 +95,15 @@
           jsp.addDefaultObjects(data);
   
           data.getResponse().setBufferSize(jsp.getDefaultBufferSize());
  +
  +        // FIXME: this tools are now in TR.p file, as standard request tools instantiated
by turbine.
  +        // All tools but jnavigation are there, jnavigation need to be instantiated here
  +        // because TemplateNavigation in which depends does have a no args constructor..and
  +        // turbine need one to be able to instantiate such class as request tool
  +        Context context = TurbineVelocity.getContext(data);
  +        TurbineVelocity.getContext(data).put("jnavigation", new JetspeedTemplateNavigation(data));
  +        data.getTemplateInfo().setTemplateContext(VelocityService.CONTEXT, context);
  +
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message