You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2010/08/15 10:39:01 UTC

svn commit: r985628 - in /wicket/trunk: ./ wicket-examples/ wicket-examples/src/main/webapp/WEB-INF/ wicket/src/main/java/org/apache/wicket/ wicket/src/main/java/org/apache/wicket/ajax/ wicket/src/main/java/org/apache/wicket/markup/html/form/ wicket/sr...

Author: mgrigorov
Date: Sun Aug 15 08:39:00 2010
New Revision: 985628

URL: http://svn.apache.org/viewvc?rev=985628&view=rev
Log:
WICKET-2976 Remove support for portlets from Wicket 1.5

Remove some more files related to Portlets support I missed in the previous commit


Removed:
    wicket/trunk/wicket-examples/src/main/webapp/WEB-INF/portlet.xml
    wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestContext.java
Modified:
    wicket/trunk/pom.xml
    wicket/trunk/wicket-examples/pom.xml
    wicket/trunk/wicket-examples/src/main/webapp/WEB-INF/web.xml
    wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java

Modified: wicket/trunk/pom.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/pom.xml (original)
+++ wicket/trunk/pom.xml Sun Aug 15 08:39:00 2010
@@ -543,13 +543,6 @@
 				<version>1.6.1</version>
 				<scope>test</scope>
 			</dependency>
-			<dependency>
-				<groupId>javax.portlet</groupId>
-				<artifactId>portlet-api</artifactId>
-				<version>2.0</version>
-				<scope>provided</scope>
-				<optional>true</optional>
-			</dependency>
 		</dependencies>
 	</dependencyManagement>
 	<dependencies>

Modified: wicket/trunk/wicket-examples/pom.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/pom.xml?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket-examples/pom.xml (original)
+++ wicket/trunk/wicket-examples/pom.xml Sun Aug 15 08:39:00 2010
@@ -106,11 +106,6 @@
 			<groupId>org.slf4j</groupId>
 			<artifactId>slf4j-log4j12</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>javax.portlet</groupId>
-			<artifactId>portlet-api</artifactId>
-			<scope>provided</scope>
-		</dependency>
 	</dependencies>
 	<build>
 		<plugins>

Modified: wicket/trunk/wicket-examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/webapp/WEB-INF/web.xml?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket-examples/src/main/webapp/WEB-INF/web.xml (original)
+++ wicket/trunk/wicket-examples/src/main/webapp/WEB-INF/web.xml Sun Aug 15 08:39:00 2010
@@ -55,19 +55,6 @@
 	</context-param>
 
 	<filter>
-		<filter-name>WicketExamplesMenuApplication</filter-name>
-		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
-		<init-param>
-            <param-name>applicationClassName</param-name>
-            <param-value>org.apache.wicket.examples.portlet.menu.WicketExamplesMenuApplication</param-value>
-		</init-param>
-		<init-param>
-            <param-name>portletOnlyFilter</param-name>
-            <param-value>true</param-value>
-		</init-param>
-	</filter>
-
-	<filter>
 		<filter-name>AjaxPrototypeApplication</filter-name>
 		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
 		<init-param>
@@ -432,14 +419,6 @@
 		</init-param>
 	</filter>
 
-
-	<filter-mapping>
-		<filter-name>WicketExamplesMenuApplication</filter-name>
-        <url-pattern>/examples/*</url-pattern>
-        <dispatcher>REQUEST</dispatcher>
-        <dispatcher>INCLUDE</dispatcher>
-	</filter-mapping>
-
 	<!-- couple the session filter to the helloworld servlet -->
 
 	<filter-mapping>

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java Sun Aug 15 08:39:00 2010
@@ -892,8 +892,6 @@ public abstract class Application implem
 
 		getPageManager().destroy();
 		getSessionStore().destroy();
-
-		RequestContext.unset();
 	}
 
 	/**

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Sun Aug 15 08:39:00 2010
@@ -1670,7 +1670,6 @@ public abstract class Component
 		}
 
 		String markupIdPostfix = Integer.toHexString(generatedMarkupId).toLowerCase();
-		markupIdPostfix = RequestContext.get().encodeMarkupId(markupIdPostfix);
 
 		String markupId = markupIdPrefix + markupIdPostfix;
 

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Sun Aug 15 08:39:00 2010
@@ -72,10 +72,6 @@ Wicket.$$ = function(element) {	
 		return document.getElementById(id) == element;
 }
 
-Wicket.isPortlet = function() {
-	return Wicket.portlet == true;
-}
-
 Wicket.emptyFunction = function() { };
 
 Wicket.Class = {
@@ -788,28 +784,6 @@ Wicket.Ajax.Request.prototype = {
 	
 	// Executes a get request
 	get: function() {
-		if (Wicket.isPortlet()) {
-	        // first check if a query string is provided
-	        var qs = this.url.indexOf('?');
-	        if (qs==-1) {
-	            qs = this.url.indexOf('&');
-	        }
-	        if (qs>-1) {
-	            var query = this.url.substring(qs+1);
-	            // ensure the query is not empty
-	            if (query && query.length > 0) {
-	                // cut off query part from original url
-	                this.url = this.url.substring(0,qs);
-	                // ensure query ends with &
-	                if (query.charAt(query.length-1)!='&') {
-	                    query += "&";
-	                }
-	                // post the query string instead to support portlets
-	                // for which you cannot modify/append to the url
-	                return this.post(query);
-	            }
-	        }
-	    }
 		if (this.channel != null) {
 			var res = Wicket.channelManager.schedule(this.channel, this.doGet.bind(this));
 			return res != null ? res : true;

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java Sun Aug 15 08:39:00 2010
@@ -205,8 +205,6 @@ public class Check<T> extends LabeledWeb
 			}
 			else
 			{
-				// TODO: following doesn't work with portlets, should be posted to a dynamic hidden
-				// form with an ActionURL or something
 				// NOTE: do not encode the url as that would give invalid JavaScript
 				tag.put("onclick", "window.location.href='" + url +
 					(url.toString().indexOf('?') > -1 ? "&amp;" : "?") + group.getInputName() +

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/CheckBox.java Sun Aug 15 08:39:00 2010
@@ -164,9 +164,6 @@ public class CheckBox extends FormCompon
 			}
 			else
 			{
-				// TODO: following doesn't work with portlets, should be posted to a dynamic hidden
-				// form
-				// with an ActionURL or something
 				// NOTE: do not encode the url as that would give invalid
 				// JavaScript
 				tag.put("onclick", "window.location.href='" + url +

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/DropDownChoice.java Sun Aug 15 08:39:00 2010
@@ -187,10 +187,6 @@ public class DropDownChoice<T> extends A
 			}
 			else
 			{
-
-				// TODO: following doesn't work with portlets, should be posted to a dynamic hidden
-				// form
-				// with an ActionURL or something
 				tag.put("onchange", "window.location.href='" + url +
 					(url.toString().indexOf('?') > -1 ? "&amp;" : "?") + getInputName() +
 					"=' + this.options[this.selectedIndex].value;");

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Radio.java Sun Aug 15 08:39:00 2010
@@ -191,8 +191,6 @@ public class Radio<T> extends LabeledWeb
 			}
 			else
 			{
-				// TODO: following doesn't work with portlets, should be posted to a dynamic hidden
-				// form with an ActionURL or something
 				// NOTE: do not encode the url as that would give invalid JavaScript
 				tag.put("onclick", "window.location.href='" + url +
 					(url.toString().indexOf('?') > -1 ? "&amp;" : "?") + group.getInputName() +

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioChoice.java Sun Aug 15 08:39:00 2010
@@ -411,9 +411,6 @@ public class RadioChoice<T> extends Abst
 					}
 					else
 					{
-						// TODO: following doesn't work with portlets, should be posted to a dynamic
-						// hidden form
-						// with an ActionURL or something
 						// NOTE: do not encode the url as that would give
 						// invalid JavaScript
 						buffer.append(" onclick=\"window.location.href='")

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java?rev=985628&r1=985627&r2=985628&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java Sun Aug 15 08:39:00 2010
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.wicket.Component;
-import org.apache.wicket.RequestContext;
 import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.IMarkupFragment;
@@ -253,19 +252,14 @@ public class HtmlHeaderContainer extends
 	 */
 	protected IHeaderResponse newHeaderResponse()
 	{
-		IHeaderResponse headerResponse = RequestContext.get().getHeaderResponse();
-		if (headerResponse == null)
+		IHeaderResponse headerResponse = new HeaderResponse()
 		{
-			// no (portlet) headerResponse override, create a default one
-			headerResponse = new HeaderResponse()
+			@Override
+			protected Response getRealResponse()
 			{
-				@Override
-				protected Response getRealResponse()
-				{
-					return HtmlHeaderContainer.this.getResponse();
-				}
-			};
-		}
+				return HtmlHeaderContainer.this.getResponse();
+			}
+		};
 		return headerResponse;
 	}