You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hr...@apache.org on 2005/08/14 22:51:30 UTC

svn commit: r232641 - /struts/tiles/trunk/src/java/org/apache/struts/tiles/TilesRequestProcessor.java

Author: hrabago
Date: Sun Aug 14 13:51:24 2005
New Revision: 232641

URL: http://svn.apache.org/viewcvs?rev=232641&view=rev
Log:
Remove references to contextRelative.
Deprecate method that accepts a contextRelative parameter.

Modified:
    struts/tiles/trunk/src/java/org/apache/struts/tiles/TilesRequestProcessor.java

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/TilesRequestProcessor.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/TilesRequestProcessor.java?rev=232641&r1=232640&r2=232641&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/TilesRequestProcessor.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/TilesRequestProcessor.java Sun Aug 14 13:51:24 2005
@@ -109,15 +109,21 @@
 
 	/**
 	 * Process a Tile definition name.
-	 * This method tries to process the parameter <code>definitionName</code> as a definition name.
-	 * It returns <code>true</code> if a definition has been processed, or <code>false</code> otherwise.
-	 * Parameter <code>contextRelative</code> is not used in this implementation.
+	 * This method tries to process the parameter <code>definitionName</code> 
+     * as a definition name.
+	 * It returns <code>true</code> if a definition has been processed, or 
+     * <code>false</code> otherwise.
+	 * This method is deprecated; the method without the 
+     * <code>contextRelative</code> parameter should be used instead.
 	 *
 	 * @param definitionName Definition name to insert.
 	 * @param contextRelative Is the definition marked contextRelative ?
 	 * @param request Current page request.
 	 * @param response Current page response.
-	 * @return <code>true</code> if the method has processed uri as a definition name, <code>false</code> otherwise.
+	 * @return <code>true</code> if the method has processed uri as a 
+     * definition name, <code>false</code> otherwise.
+     * @deprecated use processTilesDefinition(definitionName, request, response)
+     *  instead.  This method will be removed in a version after 1.3.0.
 	 */
 	protected boolean processTilesDefinition(
 		String definitionName,
@@ -126,6 +132,29 @@
 		HttpServletResponse response)
 		throws IOException, ServletException {
 
+        return processTilesDefinition(definitionName, request, response);
+        
+    }
+    
+	/**
+	 * Process a Tile definition name.
+	 * This method tries to process the parameter <code>definitionName</code> 
+     * as a definition name.
+	 * It returns <code>true</code> if a definition has been processed, or 
+     * <code>false</code> otherwise.
+	 *
+	 * @param definitionName Definition name to insert.
+	 * @param request Current page request.
+	 * @param response Current page response.
+	 * @return <code>true</code> if the method has processed uri as a 
+     * definition name, <code>false</code> otherwise.
+	 */
+	protected boolean processTilesDefinition(
+		String definitionName,
+		HttpServletRequest request,
+		HttpServletResponse response)
+		throws IOException, ServletException {
+
 		// Do we do a forward (original behavior) or an include ?
 		boolean doInclude = false;
 
@@ -293,14 +322,11 @@
 			log.debug(
 				"processForwardConfig("
 					+ forward.getPath()
-					+ ", "
-					+ forward.getContextRelative()
 					+ ")");
 		}
         
 		// Try to process the definition.
 		if (processTilesDefinition(forward.getPath(),
-			forward.getContextRelative(),
 			request,
 			response)) {
 			if (log.isDebugEnabled()) {
@@ -338,7 +364,7 @@
 		HttpServletResponse response)
 		throws IOException, ServletException {
             
-		if (processTilesDefinition(uri, false, request, response)) {
+		if (processTilesDefinition(uri, request, response)) {
 			return;
 		}
 
@@ -362,7 +388,7 @@
 		HttpServletResponse response)
 		throws IOException, ServletException {
             
-		if (processTilesDefinition(uri, false, request, response)) {
+		if (processTilesDefinition(uri, request, response)) {
 			return;
 		}
 



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