henning     2003/03/12 13:39:50

  Modified:    src/java/org/apache/turbine/services/jsp/util JspLink.java
                        JspNavigation.java JspScreenPlaceholder.java
  Log:
  Add some constants, use TurbineTemplate facade.
  
  Revision  Changes    Path
  1.4       +11 -5     
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JspLink.java      9 Mar 2003 03:06:29 -0000       1.3
  +++ JspLink.java      12 Mar 2003 21:39:50 -0000      1.4
  @@ -56,6 +56,7 @@
   
   import org.apache.turbine.util.DynamicURI;
   import org.apache.turbine.util.RunData;
  +import org.apache.turbine.util.uri.URIConstants;
   
   /**
    * A customized version of the DynamicURI to be used in JSP templates.
  @@ -70,13 +71,18 @@
    * </code>
    *
    * @author <a href="[EMAIL PROTECTED]">John McNally</a>
  - * @author Dave Bryson<a href="[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
  + * @author <a href="[EMAIL PROTECTED]">Dave Bryson</a>
    * @author Jon S. Stevens <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]">Henning P. Schmiedehausen</a>
  + * @version $Id$
    */
  -public class JspLink extends DynamicURI
  +public class JspLink
  +    extends DynamicURI
   {
       /**
  -     Constructor
  +     * Constructor
  +     *
  +     * @param data A Rundata Object
        */
       public JspLink(RunData data)
       {
  @@ -92,7 +98,7 @@
           String output = super.toString();
   
           // This was added to allow multilple $link variables in one
  -        // WebMacro template
  +        // JSP template
           removePathInfo();
           removeQueryData();
   
  @@ -106,6 +112,6 @@
        */
       public JspLink setPage(String t)
       {
  -        return (JspLink) addPathInfo("template", t);
  +        return (JspLink) addPathInfo(URIConstants.CGI_TEMPLATE_PARAM, t);
       }
   }
  
  
  
  1.6       +6 -6      
jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util/JspNavigation.java
  
  Index: JspNavigation.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util/JspNavigation.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspNavigation.java        9 Mar 2003 03:06:29 -0000       1.5
  +++ JspNavigation.java        12 Mar 2003 21:39:50 -0000      1.6
  @@ -56,9 +56,9 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +
   import org.apache.turbine.modules.NavigationLoader;
  -import org.apache.turbine.services.TurbineServices;
  -import org.apache.turbine.services.template.TemplateService;
  +import org.apache.turbine.services.template.TurbineTemplate;
   import org.apache.turbine.util.RunData;
   
   /**
  @@ -72,8 +72,9 @@
    * <%= navigation.setTemplate("admin_navigation.jsp") %>
    * </code>
    * @author <a href="[EMAIL PROTECTED]">John D. McNally</a>
  - * @author Dave Bryson<a href="[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
  - *
  + * @author <a href="[EMAIL PROTECTED]">Dave Bryson</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]">Henning P. Schmiedehausen</a>
  + * @version $Id$
    */
   public class JspNavigation
   {
  @@ -103,8 +104,7 @@
           String module = null;
           try
           {
  -            module = ((TemplateService) TurbineServices.getInstance().getService(
  -                    TemplateService.SERVICE_NAME)).getNavigationName(template);
  +            module = TurbineTemplate.getNavigationName(template);
               NavigationLoader.getInstance().exec(data, module);
           }
           catch (Exception e)
  
  
  
  1.6       +7 -6      
jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util/JspScreenPlaceholder.java
  
  Index: JspScreenPlaceholder.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/util/JspScreenPlaceholder.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspScreenPlaceholder.java 9 Mar 2003 03:06:29 -0000       1.5
  +++ JspScreenPlaceholder.java 12 Mar 2003 21:39:50 -0000      1.6
  @@ -56,13 +56,13 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +
   import org.apache.turbine.modules.ScreenLoader;
  -import org.apache.turbine.services.TurbineServices;
  -import org.apache.turbine.services.template.TemplateService;
  +import org.apache.turbine.services.template.TurbineTemplate;
   import org.apache.turbine.util.RunData;
   
   /**
  - * Returns output of a Navigation module. An instance of this is placed in the
  + * Returns output of a Screen module. An instance of this is placed in the
    * request by the JspLayout. This allows template authors to
    * place the screen template within the layout.<br>
    * Here's how it's used in a JSP template:<br>
  @@ -73,6 +73,8 @@
    *</code>
    *
    * @author <a href="[EMAIL PROTECTED]">John D. McNally</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]">Henning P. Schmiedehausen</a>
  + * @version $Id$
    */
   public class JspScreenPlaceholder
   {
  @@ -85,7 +87,7 @@
       /**
        * Constructor
        *
  -     * @param data
  +     * @param data A Rundata Object
        */
       public JspScreenPlaceholder(RunData data)
       {
  @@ -102,8 +104,7 @@
           try
           {
               template = data.getTemplateInfo().getScreenTemplate();
  -            module = ((TemplateService) TurbineServices.getInstance().getService(
  -                    TemplateService.SERVICE_NAME)).getScreenName(template);
  +            module = TurbineTemplate.getScreenName(template);
               ScreenLoader.getInstance().exec(data, module);
           }
           catch (Exception e)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to