You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2003/05/07 17:46:03 UTC

cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util JspLink.java

henning     2003/05/07 08:46:03

  Modified:    src/java/org/apache/turbine/services/jsp
                        TurbineJspService.java
               src/java/org/apache/turbine/services/jsp/util JspLink.java
  Log:
  Deprecate the JspLink class. Replace it in the JSP context with a
  regular TemplateLink Application Tool.
  
  Revision  Changes    Path
  1.13      +13 -3     jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/TurbineJspService.java
  
  Index: TurbineJspService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/TurbineJspService.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TurbineJspService.java	12 Mar 2003 21:40:56 -0000	1.12
  +++ TurbineJspService.java	7 May 2003 15:46:03 -0000	1.13
  @@ -71,7 +71,8 @@
   
   import org.apache.turbine.Turbine;
   import org.apache.turbine.services.InitializationException;
  -import org.apache.turbine.services.jsp.util.JspLink;
  +import org.apache.turbine.services.pull.ApplicationTool;
  +import org.apache.turbine.services.pull.tools.TemplateLink;
   import org.apache.turbine.services.servlet.TurbineServlet;
   import org.apache.turbine.services.template.BaseTemplateEngineService;
   import org.apache.turbine.services.template.TurbineTemplate;
  @@ -143,14 +144,23 @@
   
       /**
        * Adds some convenience objects to the request.  For example an instance
  -     * of JspLink which can be used to generate links to other templates.
  +     * of TemplateLink which can be used to generate links to other templates.
        *
        * @param data the turbine rundata object
        */
       public void addDefaultObjects(RunData data)
       {
           HttpServletRequest req = data.getRequest();
  -        req.setAttribute(LINK, new JspLink(data));
  +
  +        //
  +        // This is a place where an Application Pull Tool is used
  +        // in a regular Java Context. We have no Pull Service with the
  +        // Jsp Paging stuff, but we can run our Application Tool by Hand:
  +        //
  +        ApplicationTool templateLink = new TemplateLink();
  +        templateLink.init(data);
  +
  +        req.setAttribute(LINK, templateLink);
           req.setAttribute(RUNDATA, data);
       }
   
  
  
  
  1.5       +2 -1      jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util/JspLink.java
  
  Index: JspLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util/JspLink.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JspLink.java	12 Mar 2003 21:39:50 -0000	1.4
  +++ JspLink.java	7 May 2003 15:46:03 -0000	1.5
  @@ -75,6 +75,7 @@
    * @author Jon S. Stevens <a href="mailto:jon@latchkey.com">jon@latchkey.com</a>
    * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
    * @version $Id$
  + * deprecated Use {@org.apache.turbine.services.pull.tools.TemplateLink} instead.
    */
   public class JspLink
       extends DynamicURI
  
  
  

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