You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by kn...@apache.org on 2008/08/21 17:16:04 UTC

svn commit: r687780 - in /wicket/sandbox/knopp/experimental: wicket-examples/src/main/java/org/apache/wicket/ajax/ wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ wicket/src/main/java/org/apache/wicket/ wicket/src/main/java/org/a...

Author: knopp
Date: Thu Aug 21 08:16:03 2008
New Revision: 687780

URL: http://svn.apache.org/viewvc?rev=687780&view=rev
Log:
more stuff to go

Added:
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java   (contents, props changed)
      - copied, changed from r687532, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGBehavior.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java   (contents, props changed)
      - copied, changed from r687523, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGEventBehavior.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributes.java   (with props)
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributesImpl.java   (with props)
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/FunctionList.java   (with props)
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxRequestTarget.java   (contents, props changed)
      - copied, changed from r687514, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGRequestTarget.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxUrlCodingStrategy.java   (contents, props changed)
      - copied, changed from r687532, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGUrlCodingStrategy.java
Removed:
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGBehavior.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGEventBehavior.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGRequestTarget.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGUrlCodingStrategy.java
Modified:
    wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/ajax/TestPage1.java
    wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/Component.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng.js
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java

Modified: wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/ajax/TestPage1.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/ajax/TestPage1.java?rev=687780&r1=687779&r2=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/ajax/TestPage1.java (original)
+++ wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/ajax/TestPage1.java Thu Aug 21 08:16:03 2008
@@ -16,7 +16,7 @@
  */
 package org.apache.wicket.ajax;
 
-import org.apache.wicket.ajaxng.AjaxNGEventBehavior;
+import org.apache.wicket.ajaxng.AjaxEventBehavior;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.WebPage;
 
@@ -32,10 +32,10 @@
 	public TestPage1()
 	{
 		WebMarkupContainer c1 = new WebMarkupContainer("c1");
-		c1.add(new AjaxNGEventBehavior("click") {
+		c1.add(new AjaxEventBehavior("click") {
 			
 		});
-		c1.add(new AjaxEventBehavior("click") {
+		c1.add(new org.apache.wicket.ajax.AjaxEventBehavior("onclick") {
 			/**
 			 * @see org.apache.wicket.ajax.AjaxEventBehavior#onEvent(org.apache.wicket.ajax.AjaxRequestTarget)
 			 */

Modified: wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java?rev=687780&r1=687779&r2=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java (original)
+++ wicket/sandbox/knopp/experimental/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java Thu Aug 21 08:16:03 2008
@@ -18,7 +18,7 @@
 
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.TestPage1;
-import org.apache.wicket.ajaxng.request.AjaxNGUrlCodingStrategy;
+import org.apache.wicket.ajaxng.request.AjaxUrlCodingStrategy;
 import org.apache.wicket.examples.WicketExampleApplication;
 import org.apache.wicket.examples.ajax.builtin.modal.ModalWindowPage;
 import org.apache.wicket.examples.ajax.builtin.tree.EditableTreeTablePage;
@@ -72,7 +72,7 @@
 		
 		mount(new HybridUrlCodingStrategy("/test/page1", TestPage1.class));
 		
-		mount(new AjaxNGUrlCodingStrategy("wicket-ajax-ng"));
+		mount(new AjaxUrlCodingStrategy("wicket-ajax-ng"));
 	}
 
 	/**

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/Component.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/Component.java?rev=687780&r1=687779&r2=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/Component.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/Component.java Thu Aug 21 08:16:03 2008
@@ -2644,10 +2644,11 @@
 				while (iter.hasNext())
 				{
 					IBehavior behavior = iter.next();
+					behavior.renderHead(this, container.getHeaderResponse());
 					if (behavior instanceof IHeaderContributor && isBehaviorAccepted(behavior))
 					{
 						((IHeaderContributor)behavior).renderHead(container.getHeaderResponse());
-					}
+					}					
 				}
 			}
 		}

Copied: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java (from r687532, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGBehavior.java)
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java?p2=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java&p1=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGBehavior.java&r1=687532&r2=687780&rev=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGBehavior.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java Thu Aug 21 08:16:03 2008
@@ -16,47 +16,52 @@
  */
 package org.apache.wicket.ajaxng;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.Page;
 import org.apache.wicket.RequestCycle;
 import org.apache.wicket.ResourceReference;
-import org.apache.wicket.ajaxng.request.AjaxNGRequestTarget;
-import org.apache.wicket.ajaxng.request.AjaxNGUrlCodingStrategy;
+import org.apache.wicket.ajaxng.request.AjaxRequestTarget;
+import org.apache.wicket.ajaxng.request.AjaxUrlCodingStrategy;
 import org.apache.wicket.behavior.IBehavior;
 import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.IHeaderContributor;
 import org.apache.wicket.markup.html.IHeaderResponse;
 import org.apache.wicket.markup.html.resources.JavascriptResourceReference;
 
 /**
  * @author Matej Knopp
  */
-public class AjaxNGBehavior implements IBehavior, IHeaderContributor
+public class AjaxBehavior implements IBehavior
 {
 
 	private static final long serialVersionUID = 1L;
 
-	private Component component;
+	private final List<Component> boundComponents = new ArrayList<Component>();
 	
 	/**
 	 * Construct.
 	 */
-	public AjaxNGBehavior()
+	public AjaxBehavior()
 	{
 	}
 
 		
-	private final static ResourceReference YUI_BASE = new JavascriptResourceReference(AjaxNGBehavior.class, "js/yui3/yui-base/yui-base.js");
-	private final static ResourceReference YUI_OOP = new JavascriptResourceReference(AjaxNGBehavior.class, "js/yui3/oop/oop.js");
-	private final static ResourceReference YUI_EVENT = new JavascriptResourceReference(AjaxNGBehavior.class, "js/yui3/event/event.js");
-	private final static ResourceReference YUI_DOM = new JavascriptResourceReference(AjaxNGBehavior.class, "js/yui3/dom/dom.js");
-	private final static ResourceReference YUI_NODE = new JavascriptResourceReference(AjaxNGBehavior.class, "js/yui3/node/node.js");
-	private final static ResourceReference YUI_IO = new JavascriptResourceReference(AjaxNGBehavior.class, "js/yui3/io/io.js");	
-	private final static ResourceReference AJAX_NG = new JavascriptResourceReference(AjaxNGBehavior.class, "js/wicket-ajax-ng.js");
+	private final static ResourceReference YUI_BASE = new JavascriptResourceReference(AjaxBehavior.class, "js/yui3/yui-base/yui-base.js");
+	private final static ResourceReference YUI_OOP = new JavascriptResourceReference(AjaxBehavior.class, "js/yui3/oop/oop.js");
+	private final static ResourceReference YUI_EVENT = new JavascriptResourceReference(AjaxBehavior.class, "js/yui3/event/event.js");
+	private final static ResourceReference YUI_DOM = new JavascriptResourceReference(AjaxBehavior.class, "js/yui3/dom/dom.js");
+	private final static ResourceReference YUI_NODE = new JavascriptResourceReference(AjaxBehavior.class, "js/yui3/node/node.js");
+	private final static ResourceReference YUI_IO = new JavascriptResourceReference(AjaxBehavior.class, "js/yui3/io/io.js");	
+	private final static ResourceReference AJAX_NG = new JavascriptResourceReference(AjaxBehavior.class, "js/wicket-ajax-ng.js");
 
-	public final static String JS_PREFIX = "WicketNG";
+	/**
+	 * Wicket javascript namespace.
+	 */
+	public final static String WICKET_NS = "WicketNG";		
 	
-	public void renderHead(IHeaderResponse response)
+	public void renderHead(Component component, IHeaderResponse response)
 	{
 		response.renderJavascriptReference(YUI_BASE);
 		response.renderJavascriptReference(YUI_OOP);
@@ -66,38 +71,38 @@
 		response.renderJavascriptReference(YUI_IO);
 		response.renderJavascriptReference(AJAX_NG);
 		
-		CharSequence prefix = RequestCycle.get().urlFor(AjaxNGRequestTarget.DUMMY);
+		CharSequence prefix = RequestCycle.get().urlFor(AjaxRequestTarget.DUMMY);
 		
 		StringBuilder config = new StringBuilder();
-		config.append(JS_PREFIX +".ajax.globalSettings.urlPrefix='");
+		config.append(WICKET_NS +".ajax.globalSettings.urlPrefix='");
 		config.append(prefix);
 		config.append("'\n");
 		
-		config.append(JS_PREFIX +".ajax.globalSettings.urlParamComponentId='");
-		config.append(AjaxNGUrlCodingStrategy.PARAM_COMPONENT_ID);
+		config.append(WICKET_NS +".ajax.globalSettings.urlParamComponentId='");
+		config.append(AjaxUrlCodingStrategy.PARAM_COMPONENT_ID);
 		config.append("'\n");
 		
-		config.append(JS_PREFIX +".ajax.globalSettings.urlParamTimestamp='");
-		config.append(AjaxNGUrlCodingStrategy.PARAM_TIMESTAMP);
+		config.append(WICKET_NS +".ajax.globalSettings.urlParamTimestamp='");
+		config.append(AjaxUrlCodingStrategy.PARAM_TIMESTAMP);
 		config.append("'\n");
 		
-		config.append(JS_PREFIX +".ajax.globalSettings.urlParamPageId='");
-		config.append(AjaxNGUrlCodingStrategy.PARAM_PAGE_ID);
+		config.append(WICKET_NS +".ajax.globalSettings.urlParamPageId='");
+		config.append(AjaxUrlCodingStrategy.PARAM_PAGE_ID);
 		config.append("'\n");
 				
-		config.append(JS_PREFIX +".ajax.globalSettings.urlParamFormId='");
-		config.append(AjaxNGUrlCodingStrategy.PARAM_FORM_ID);
+		config.append(WICKET_NS +".ajax.globalSettings.urlParamFormId='");
+		config.append(AjaxUrlCodingStrategy.PARAM_FORM_ID);
 		config.append("'\n");
 		
-		config.append(JS_PREFIX +".ajax.globalSettings.urlParamListenerInterface='");
-		config.append(AjaxNGUrlCodingStrategy.PARAM_LISTENER_INTEFACE);
+		config.append(WICKET_NS +".ajax.globalSettings.urlParamListenerInterface='");
+		config.append(AjaxUrlCodingStrategy.PARAM_LISTENER_INTEFACE);
 		config.append("'\n");
 		
-		config.append(JS_PREFIX +".ajax.globalSettings.urlParamBehaviorIndex='");
-		config.append(AjaxNGUrlCodingStrategy.PARAM_BEHAVIOR_INDEX);
+		config.append(WICKET_NS +".ajax.globalSettings.urlParamBehaviorIndex='");
+		config.append(AjaxUrlCodingStrategy.PARAM_BEHAVIOR_INDEX);
 		config.append("'\n");
 		
-		response.renderJavascript(config, JS_PREFIX + "-Config");
+		response.renderJavascript(config, WICKET_NS + "-Config");
 	}
 
 	public void afterRender(Component component)
@@ -110,15 +115,14 @@
 
 	public void bind(Component component)
 	{
-		if (this.component != null && this.component != component)
+		if (boundComponents.contains(component) == false)
 		{
-			throw new IllegalStateException("The behavior can be only bound to one component.");			
-		}
-		this.component = component;
-		component.setOutputMarkupId(true);
+			boundComponents.add(component);
+			component.setOutputMarkupId(true);
+		}					
 	}
 
-	protected String getAttributes()
+	protected String getAttributes(Component component)
 	{
 		StringBuilder res = new StringBuilder();
 		
@@ -182,4 +186,13 @@
 	{
 	}
 
+	/**
+	 * Returns attributes for Ajax Request.
+	 * 
+	 * @return {@link AjaxRequestAttributes} instance
+	 */
+	public AjaxRequestAttributes getAttributes()
+	{
+		return new AjaxRequestAttributesImpl();
+	}
 }

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java (from r687523, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGEventBehavior.java)
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java?p2=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java&p1=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGEventBehavior.java&r1=687523&r2=687780&rev=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxNGEventBehavior.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java Thu Aug 21 08:16:03 2008
@@ -16,32 +16,33 @@
  */
 package org.apache.wicket.ajaxng;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.markup.html.IHeaderResponse;
 
 /**
  * @author Matej Knopp
  */
-public class AjaxNGEventBehavior extends AjaxNGBehavior
+public class AjaxEventBehavior extends AjaxBehavior
 {
 	private static final long serialVersionUID = 1L;
 
 	private final String event;
 	
-	public AjaxNGEventBehavior(String event)
+	public AjaxEventBehavior(String event)
 	{
 		this.event = event;
 	}
 	
 	@Override
-	public void renderHead(IHeaderResponse response)
+	public void renderHead(Component component, IHeaderResponse response)
 	{
-		super.renderHead(response);
+		super.renderHead(component, response);
 		
 		StringBuilder js = new StringBuilder();
-		js.append(AjaxNGBehavior.JS_PREFIX + ".e('");
+		js.append(AjaxBehavior.WICKET_NS + ".e('");
 		js.append(event);
 		js.append("',");
-		js.append(getAttributes());
+		js.append(getAttributes(component));
 		js.append(")");
 		
 		response.renderOnDomReadyJavascript(js.toString());

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributes.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributes.java?rev=687780&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributes.java (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributes.java Thu Aug 21 08:16:03 2008
@@ -0,0 +1,265 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.ajaxng;
+
+import java.util.Map;
+
+import org.apache.wicket.markup.html.form.Form;
+
+/**
+ * Attributes for an Ajax Request. 
+ * 
+ * <hr>
+ *  
+ * <p>
+ * Note that some of these attributes represent javascript functions. Those functions get a
+ * <code>RequestQueueItem</code> instance as first argument. The instance provides access to
+ * following properties that the javascript functions can use:
+ * <dl>
+ * <dt>attributes</dt>
+ * <dd> Object with request queue item attributes. The <code>attributes</code> Object contains following
+ * properties:
+ * <dl>
+ * 
+ * <dt>component</dt>
+ * <dd>component DOM element or <code>null</code> if the behavior is attached to page</dd>
+ * 
+ * <dt>formId</dt>
+ * <dd>id of the form DOM element or <code>null</code> if not specified</dd>
+ * 
+ * <dt>token</dt>
+ * <dd>token string or <code>null</code> if not specified</dd>
+ * 
+ * <dt> </dd>
+ * 
+ * </dl>
+ * </dd>
+ * 
+ * <dt>event</dt>
+ * <dd>If the AJAX request was a result of javacript event (i.e. onclick) the <code>event</code>
+ * property contains the actual event instance.
+ * 
+ * </dl>
+ * 
+ * 
+ * @author Matej Knopp
+ */
+public interface AjaxRequestAttributes
+{
+	/**
+	 * Form instance if the AJAX request should submit a form or <code>null</code> if the request
+	 * doesn't involve form submission.
+	 * 
+	 * @return form instance or <code>null</code>
+	 */
+	Form<?> getForm();
+
+	/**
+	 * Returns whether the form submit is multipart.
+	 * <p>
+	 * Note that for multipart AJAX requests a hidden IFRAME will be used and that can have negative
+	 * impact on error detection.
+	 * 
+	 * @return <code>true</code> if the form submit should be multipart, false otherwise
+	 */
+	Boolean isMultipart();
+
+	/**
+	 * Timeout in milliseconds for the AJAX request. This only involves the actual communication and
+	 * not the processing afterwards. Can be <code>null</code> in which case the default request
+	 * timeout will be used.
+	 * 
+	 * @return request timeout in milliseconds or <code>null<code> for default timeout
+	 */
+	Integer getRequesTimeout();
+
+	/**
+	 * Timeout for the response processing. In case the response processing takes more than the
+	 * timeout it won't block the request queue. Can be <code>null</code> in which case the
+	 * default processing timeout will be used.
+	 * 
+	 * @return processing timeout in milliseconds or <code>null</code> for default timeout
+	 */
+	Integer getProcessingTimeout();
+
+	/**
+	 * Optional string identifying related items in request queue. Used to identify previous items
+	 * (items with same token) that will be removed when this item is added and
+	 * {@link #isRemovePrevious()} returns <code>true</code>. Also required when throttling is
+	 * enabled.
+	 * 
+	 * @see #getThrottle()
+	 * @see #isRemovePrevious()
+	 * 
+	 * @return token string or <code>null</code>
+	 */
+	String getToken();
+
+	/**
+	 * If there are previous items with same token in the queue they will be removed if
+	 * {@link #isRemovePrevious()} returns <code>true</code>. This can be useful when the items
+	 * are added in queue faster than they are processed and only the latest request matters.
+	 * <p>
+	 * An example of this could be periodically updated component. There is no point of having
+	 * multiple refreshing requests stored in the queue for such component because only the last
+	 * request is relevant. Alternative to this is throttling.
+	 * 
+	 * @see #getToken()
+	 * @see #getThrottle()
+	 * 
+	 * @return boolean value or <code>null</code>
+	 */
+	Boolean isRemovePrevious();
+
+	/**
+	 * Limits adding items with same token to at most one item per n milliseconds where n is the
+	 * return value.
+	 * <p>
+	 * Useful to limit the number of AJAX requests that are triggered by a user action such as
+	 * typing into a text field. Throttle attribute only applies when token is specified.
+	 * 
+	 * @see #getToken()
+	 * 
+	 * @return throttling timeout in milliseconds or <code>null</code>
+	 */
+	Integer getThrottle();
+
+	/**
+	 * Only applicable when throttling is enabled. Defaults to <code>false</code>. Causes the
+	 * throttle timer reset each time item with same token is being added to queue.
+	 * <p>
+	 * Example: Event is fired by user typing in a TextField. Throttle value is 2000 (ms), throttle
+	 * postpone is <code>true</code>. The event will be fired 2000ms after user typed the last
+	 * character. If throttle postpone is <code>false</code>, The event is fired immediately
+	 * after user starts typing and then every two seconds as long as user keeps typing.
+	 * 
+	 * @return boolean value or <code>null</code>
+	 */
+	Boolean isThrottlePostpone();
+
+	/**
+	 * Array of javascript functions that are invoked before the request executes. The functions
+	 * will get a <code>RequestQueueItem</code> instance passed as fist argument and have to
+	 * return a boolean value. If any of these functions returns <code>false</code> the request is
+	 * canceled.
+	 * <p>
+	 * Example of single function:
+	 * 
+	 * <pre>
+	 *    function(requestQueueItem) 
+	 *    { 
+	 *      if (someCondition()) 
+	 *      {
+	 *         return true; 
+	 *      } 
+	 *      else 
+	 *      {
+	 *         return false;
+	 *      }
+	 *    }
+	 * </pre>
+	 * 
+	 * @return FunctionList or <code>null</code>
+	 */
+	FunctionList getPreconditions();
+
+	/**
+	 * Array of javascript functions that are invoked before the actual AJAX request. This
+	 * invocation only happens when all precondition functions return true. Each of the function
+	 * will get a <code>RequestQueueItem</code> instance passed as first argument.
+	 * <p>
+	 * Example of single function:
+	 * 
+	 * <pre>
+	 *    function(requestQueueItem) 
+	 *    { 
+	 *      doSomethingWhenAjaxRequestBegins();
+	 *    }
+	 * </pre>
+	 * 
+	 * @see #getPreconditions()
+	 * 
+	 * @return FunctionList or <code>null</code>
+	 */
+	FunctionList getBeforeHandlers();
+
+	/**
+	 * Array of javascript functions that are invoked after the request is successfully processed.
+	 * Each function will get a <code>RequestQueueItem</code> instance passed as fist argument.
+	 * <p>
+	 * Example of single function:
+	 * 
+	 * <pre>
+	 *    function(requestQueueItem) 
+	 *    { 
+	 *      doSomethingWhenRequestIsSuccessfullyProcessed();
+	 *    }
+	 * </pre>
+	 * 
+	 * @return FunctionList or <code>null</code>
+	 */
+	FunctionList getSuccessHandlers();
+
+	/**
+	 * Array of javascript functions that are invoked when an unexpected error happens during the
+	 * AJAX request or the processing afterwards, or when some of the timeouts is exceeded. The
+	 * functions will get a <code>RequestQueueItem</code> passed as fist argument. If possible
+	 * error message will be second argument passed to the handlers.
+	 * <p>
+	 * Example of single function:
+	 * 
+	 * <pre>
+	 *    function(requestQueueItem, error) 
+	 *    { 
+	 *      if (typeof(error) == &quot;string&quot;) 
+	 *      {
+	 *      	alert('Error processing request ' + error);
+	 *      }
+	 *    }
+	 * </pre>
+	 * 
+	 * @return FunctionList or <code>null</code>
+	 */
+	FunctionList getErrorHandlers();
+
+	/**
+	 * Map that contains additional URL arguments. These will be appended to the request URL. This
+	 * is simpler alternative to {@link #getUrlArgumentMethods()}
+	 * 
+	 * @return Map with additional URL arguments or <code>null</code>
+	 */
+	Map<String, Object> getUrlArguments();
+
+	/**
+	 * Array of javascript functions that produce additional URL arguments. Each of the functions
+	 * will get an <code>RequestQueueItem</code> passed as first argument and must return a
+	 * <code>Map<String,
+	 * String></code> (Object).
+	 * <p>
+	 * Example of single function:
+	 * 
+	 * <pre>
+	 *    function(requestQueueItem)
+	 *    {
+	 *    	return { param1: &quot;value1&quot;, param2: 15 }
+	 *    } 
+	 * </pre>
+	 * 
+	 * @return FunctionList or <code>null</code>
+	 */
+	FunctionList getUrlArgumentMethods();
+}

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributes.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributesImpl.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributesImpl.java?rev=687780&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributesImpl.java (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributesImpl.java Thu Aug 21 08:16:03 2008
@@ -0,0 +1,250 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.ajaxng;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.wicket.markup.html.form.Form;
+
+/**
+ * Simple implementation of the {@link AjaxRequestAttributes} interface. This class supports
+ * delegating the calls to another {@link AjaxRequestAttributes} instance if one is specified.
+ * <p>
+ * To extend attributes from behavior or component the following pattern can be used:
+ * <pre>
+ *      // add a precondition to super attirbutes
+ *      class MyBehavior extends AjaxBehavior
+ *      {
+ *          public AjaxRequestAttributes getAttributes()
+ *          {
+ *              return new AjaxRequestAttributesImpl(super.getAttributes) 
+ *              {
+ *                  public FunctionList getPreconditions()
+ *                  {
+ *                      return super.getPreconditions().add("function(requestQueueItem) { return true; }";);
+ *                  }
+ *              }
+ *          }
+ *      }		
+ * </pre>
+ * 
+ * @author Matej Knopp
+ */
+public class AjaxRequestAttributesImpl implements AjaxRequestAttributes
+{
+	private final AjaxRequestAttributesImpl delegate;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param delegate
+	 */
+	public AjaxRequestAttributesImpl(AjaxRequestAttributesImpl delegate)
+	{
+		this.delegate = delegate;
+	}
+
+	/**
+	 * 
+	 * Construct.
+	 */
+	public AjaxRequestAttributesImpl()
+	{
+		this(null);
+	}
+
+	public FunctionList getBeforeHandlers()
+	{
+		FunctionList result = null;
+		if (delegate != null)
+		{
+			result = delegate.getBeforeHandlers();
+		}
+		if (result == null)
+		{
+			result = new FunctionList();
+		}
+		return result;
+	}
+
+	public FunctionList getErrorHandlers()
+	{
+		FunctionList result = null;
+		if (delegate != null)
+		{
+			result = delegate.getErrorHandlers();
+		}
+		if (result == null)
+		{
+			result = new FunctionList();
+		}
+		return result;
+	}
+
+	public Form<?> getForm()
+	{
+		if (delegate != null)
+		{
+			return delegate.getForm();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public FunctionList getPreconditions()
+	{
+		FunctionList result = null;
+		if (delegate != null)
+		{
+			result = delegate.getPreconditions();
+		}
+		if (result == null)
+		{
+			result = new FunctionList();
+		}
+		return result;
+	}
+
+	public Integer getProcessingTimeout()
+	{
+		if (delegate != null)
+		{
+			return delegate.getProcessingTimeout();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public Integer getRequesTimeout()
+	{
+		if (delegate != null)
+		{
+			return delegate.getRequesTimeout();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public FunctionList getSuccessHandlers()
+	{
+		FunctionList result = null;
+		if (delegate != null)
+		{
+			result = delegate.getSuccessHandlers();
+		}
+		if (result == null)
+		{
+			result = new FunctionList();
+		}
+		return result;
+	}
+
+	public Integer getThrottle()
+	{
+		if (delegate != null)
+		{
+			return delegate.getThrottle();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public String getToken()
+	{
+		if (delegate != null)
+		{
+			return delegate.getToken();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public FunctionList getUrlArgumentMethods()
+	{
+		FunctionList result = null;
+		if (delegate != null)
+		{
+			result = delegate.getUrlArgumentMethods();
+		}
+		if (result == null)
+		{
+			result = new FunctionList();
+		}
+		return result;
+	}
+
+	public Map<String, Object> getUrlArguments()
+	{
+		Map<String, Object> result = null;
+		if (delegate != null)
+		{
+			result = delegate.getUrlArguments();
+		}
+		if (result == null)
+		{
+			result = new HashMap<String, Object>();
+		}
+		return result;
+	}
+
+	public Boolean isMultipart()
+	{
+		if (delegate != null)
+		{
+			return delegate.isMultipart();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public Boolean isRemovePrevious()
+	{
+		if (delegate != null)
+		{
+			return delegate.isRemovePrevious();
+		}
+		else
+		{
+			return null;
+		}
+	}
+
+	public Boolean isThrottlePostpone()
+	{
+		if (delegate != null)
+		{
+			return delegate.isThrottlePostpone();
+		}
+		else
+		{
+			return null;
+		}
+	}
+}

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxRequestAttributesImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/FunctionList.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/FunctionList.java?rev=687780&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/FunctionList.java (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/FunctionList.java Thu Aug 21 08:16:03 2008
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.ajaxng;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+public class FunctionList 
+{
+	private final List<String> list = new ArrayList<String>();
+	
+	public FunctionList add(String o)
+	{
+		list.add(o);
+		return this;
+	}
+
+	public FunctionList add(int index, String element)
+	{
+		add(index, element);
+		return this;
+	}
+
+	public FunctionList addAll(Collection<? extends String> c)
+	{
+		list.addAll(c);
+		return this;
+	}
+
+	public FunctionList addAll(int index, Collection<? extends String> c)
+	{
+		list.addAll(index, c);
+		return this;
+	}
+
+	public void clear()
+	{
+		list.clear();
+	}
+
+	public boolean contains(Object o)
+	{
+		return list.contains(o);
+	}
+
+	public boolean containsAll(Collection<?> c)
+	{
+		return list.containsAll(c);
+	}
+
+	public String get(int index)
+	{
+		return list.get(index);
+	}
+
+	public int indexOf(Object o)
+	{
+		return list.indexOf(o);
+	}
+
+	public boolean isEmpty()
+	{
+		return list.isEmpty();
+	}
+
+	public Iterator<String> iterator()
+	{
+		return list.iterator();
+	}
+
+	public int lastIndexOf(Object o)
+	{
+		return list.lastIndexOf(o);
+	}
+
+	public ListIterator<String> listIterator()
+	{
+		return list.listIterator();
+	}
+
+	public ListIterator<String> listIterator(int index)
+	{
+		return list.listIterator(index);
+	}
+
+	public boolean remove(Object o)
+	{
+		return list.remove(o);
+	}
+
+	public String remove(int index)
+	{
+		return list.remove(index);
+	}
+
+	public boolean removeAll(Collection<?> c)
+	{
+		return list.removeAll(c);
+	}
+
+	public boolean retainAll(Collection<?> c)
+	{
+		return list.retainAll(c);
+	}
+
+	public String set(int index, String element)
+	{
+		return list.set(index, element);
+	}
+
+	public int size()
+	{
+		return list.size();
+	}
+
+	public List<String> subList(int fromIndex, int toIndex)
+	{
+		return list.subList(fromIndex, toIndex);
+	}
+
+	public Object[] toArray()
+	{
+		return list.toArray();
+	}
+
+	public <T> T[] toArray(T[] a)
+	{
+		return list.toArray(a);
+	}
+}

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/FunctionList.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng.js
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng.js?rev=687780&r1=687779&r2=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng.js (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng.js Thu Aug 21 08:16:03 2008
@@ -574,7 +574,8 @@
 	 *                                        
 	 *   pt, processingTimeout   - Integer    Timeout for the response processing. In case the response
 	 *                                        processing takes more than the timeout it won't block the
-	 *                                        request queue.
+	 *                                        request queue. Can be null in which case the default processing
+	 *                                        timeout will be used.
 	 *          
 	 *   p, pageId               - String     Used to identify the originating page. String in form of
 	 *                                        <pageId>:<pageVersion>
@@ -620,7 +621,7 @@
 	 *   
 	 *   pr, preconditions       - Method(s)  Optional. Method or array of methods that is/are invoked 
 	 *                                        before the request executes. The method(s) will get this 
-	 *                                        RequestItem passed as fist argument and have to return 
+	 *                                        RequestQueueItem passed as fist argument and have to return 
 	 *                                        a boolean value. If any of these methods returns false the 
 	 *                                        request is canceled.
 	 *                                        
@@ -638,20 +639,15 @@
 	 *                                        method(s) will get this RequestQueueItem passed as fist 
 	 *                                        argument. If possible error message will be second argument 
 	 *                                        passed to the handlers. 
-	 *                                        
-	 *   u, urlPostProcessors    - Method(s)  Optional. Method or array of methods that can postprocess 
-	 *                                        the URL before it hits the server. Each of the methods 
-	 *                                        will get the URL as first argument and this RequestQueueItem 
-	 *                                        as second argument and must return postprocessed URL.
-	 *                                        
-     *   ua, urlArguments        - Object     Optional. Map that contains additional URL arguments. These 
-     *                                        will be appended to the URL before postprocessing it. This is 
-     *                                        simpler alternative to urlPostProcessor or urlArgumentMethods.
+	 *                                        	                                         
+     *   u, urlArguments        - Object      Optional. Map that contains additional URL arguments. These 
+     *                                        will be appended to the URL. This is simpler alternative to 
+     *                                        urlArgumentMethods.
      *                                        
-     *   uam, urlArgumentMethods - Method(s)  Optional. Method or array of methods that produce additional 
-     *                                        URL arguments. Each of the methods will get this 
-     *                                        RequestQueueItem passed and must return a 
-     *                                        Map<String, String> (Object).
+     *   ua, urlArgumentMethods - Method(s)  Optional. Method or array of methods that produce additional 
+     *                                       URL arguments. Each of the methods will get this 
+     *                                       RequestQueueItem passed and must return a 
+     *                                       Map<String, String> (Object).
 	 */
 	var RequestQueueItem = function(attributes)
 	{
@@ -699,9 +695,8 @@
 			beforeHandlers:     m(a.beforeHandlers     || a.be,  gs.beforeHandlers),
 			successHandlers:    m(a.successHandlers    || a.s,   gs.successHandlers),
 			errorHandlers:      m(a.errorHandlers      || a.e,   gs.errorHandlers),
-			urlPostProcessors:  m(a.urlPostProcessors  || a.u,   gs.urlPostProcessors),
-			urlArguments:         a.urlArguments       || a.ua   || null,
-			urlArgumentMethods: m(a.urlArgumentMethods || a.uam, gs.urlArgumentMethods)
+			urlArguments:         a.urlArguments       || a.u    || null,
+			urlArgumentMethods: m(a.urlArgumentMethods || a.ua,  gs.urlArgumentMethods)
 		}
 		
 		log.trace("RequestQueue", "Creating New Item", this.attributes);
@@ -1106,7 +1101,8 @@
 		{
 			element = W.$(attributes.c);
 		}		
-		Y.on(event, function(event) {			
+		Y.on(event, function(event) 
+		{			
 			var item = new RequestQueueItem(attributes);
 			item.event = event;
 			W.ajax.requestQueue.add(item);

Copied: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxRequestTarget.java (from r687514, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGRequestTarget.java)
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxRequestTarget.java?p2=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxRequestTarget.java&p1=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGRequestTarget.java&r1=687514&r2=687780&rev=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGRequestTarget.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxRequestTarget.java Thu Aug 21 08:16:03 2008
@@ -20,17 +20,17 @@
 import org.apache.wicket.IRequestTarget;
 import org.apache.wicket.RequestCycle;
 
-public class AjaxNGRequestTarget implements IRequestTarget
+public class AjaxRequestTarget implements IRequestTarget
 {
 
-	private AjaxNGRequestTarget()
+	private AjaxRequestTarget()
 	{
 	}
 	
 	private Component component;
 	private int behaviorIndex;
 	
-	public AjaxNGRequestTarget(Component component, int behaviorIndex)
+	public AjaxRequestTarget(Component component, int behaviorIndex)
 	{
 		this.component = component;
 		this.behaviorIndex = behaviorIndex;
@@ -44,5 +44,5 @@
 	{
 	}
 
-	public static final AjaxNGRequestTarget DUMMY = new AjaxNGRequestTarget();
+	public static final AjaxRequestTarget DUMMY = new AjaxRequestTarget();
 }

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxRequestTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxUrlCodingStrategy.java (from r687532, wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGUrlCodingStrategy.java)
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxUrlCodingStrategy.java?p2=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxUrlCodingStrategy.java&p1=wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGUrlCodingStrategy.java&r1=687532&r2=687780&rev=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxNGUrlCodingStrategy.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxUrlCodingStrategy.java Thu Aug 21 08:16:03 2008
@@ -21,17 +21,18 @@
 import org.apache.wicket.Page;
 import org.apache.wicket.Session;
 import org.apache.wicket.Component.IVisitor;
+import org.apache.wicket.protocol.http.PageExpiredException;
 import org.apache.wicket.request.RequestParameters;
 import org.apache.wicket.request.target.coding.IRequestTargetUrlCodingStrategy;
 
 /**
  * @author Matej Knopp
  */
-public class AjaxNGUrlCodingStrategy implements IRequestTargetUrlCodingStrategy
+public class AjaxUrlCodingStrategy implements IRequestTargetUrlCodingStrategy
 {
 	private final String mountPath;
 
-	public AjaxNGUrlCodingStrategy(String mountPath)
+	public AjaxUrlCodingStrategy(String mountPath)
 	{
 		this.mountPath = mountPath;
 	}
@@ -100,8 +101,10 @@
 				});
 			}
 		}
-
-		return null;
+		else
+		{
+			throw new PageExpiredException("Page Expired");
+		}
 	}
 
 	public IRequestTarget decode(RequestParameters requestParameters)
@@ -115,7 +118,7 @@
 		
 		int behaviorIndex = Integer.valueOf(getParameter(requestParameters, PARAM_BEHAVIOR_INDEX));
 		
-		return new AjaxNGRequestTarget(component, behaviorIndex);
+		return new AjaxRequestTarget(component, behaviorIndex);
 	}
 
 	public CharSequence encode(IRequestTarget requestTarget)
@@ -139,7 +142,7 @@
 
 	public boolean matches(IRequestTarget requestTarget)
 	{
-		return requestTarget instanceof AjaxNGRequestTarget;
+		return requestTarget instanceof AjaxRequestTarget;
 	}
 
 	public boolean matches(String path)

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/request/AjaxUrlCodingStrategy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java?rev=687780&r1=687779&r2=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java Thu Aug 21 08:16:03 2008
@@ -186,4 +186,8 @@
 	{
 		throw new UnsupportedOperationException();
 	}
+	
+	public void renderHead(Component component, IHeaderResponse headerResponse)
+	{
+	}
 }

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java?rev=687780&r1=687779&r2=687780&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java Thu Aug 21 08:16:03 2008
@@ -19,6 +19,7 @@
 import org.apache.wicket.Component;
 import org.apache.wicket.IClusterable;
 import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.IHeaderResponse;
 
 /**
  * Behaviors are kind of plug-ins for Components. They allow to be added to a component and get
@@ -133,4 +134,6 @@
 	 * @return true if this behavior is temporary
 	 */
 	boolean isTemporary();
+	
+	void renderHead(Component component, IHeaderResponse headerResponse);
 }
\ No newline at end of file