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/09/05 17:59:41 UTC

svn commit: r692471 - in /wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket: ajaxng/ ajaxng/form/ ajaxng/js/ ajaxng/markup/html/form/ markup/html/form/

Author: knopp
Date: Fri Sep  5 08:59:40 2008
New Revision: 692471

URL: http://svn.apache.org/viewvc?rev=692471&view=rev
Log:
more form submit

Added:
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormComponentUpdatingBehavior.java   (with props)
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormValidatingBehavior.java   (with props)
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng-base62.js   (with props)
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/markup/html/form/
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/markup/html/form/AjaxButton.java   (with props)
Modified:
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java
    wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.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/markup/html/form/Form.java

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java?rev=692471&r1=692470&r2=692471&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxBehavior.java Fri Sep  5 08:59:40 2008
@@ -368,7 +368,7 @@
 
 	public boolean isEnabled(Component component)
 	{
-		return true;
+		return component.isEnabled();
 	}
 
 	public boolean isTemporary()

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java?rev=692471&r1=692470&r2=692471&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/AjaxEventBehavior.java Fri Sep  5 08:59:40 2008
@@ -37,6 +37,16 @@
 	 */
 	public AjaxEventBehavior(String event)
 	{
+		if (event == null)
+		{
+			throw new IllegalArgumentException("Argument 'event' may not be null.");
+		}
+		event = event.toLowerCase();
+		if (event.startsWith("on"))
+		{
+			event = event.substring(2);
+		}
+
 		this.event = event;
 	}
 

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormComponentUpdatingBehavior.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormComponentUpdatingBehavior.java?rev=692471&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormComponentUpdatingBehavior.java (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormComponentUpdatingBehavior.java Fri Sep  5 08:59:40 2008
@@ -0,0 +1,182 @@
+/*
+ * 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.form;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.text.html.FormView;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.ajaxng.AjaxEventBehavior;
+import org.apache.wicket.ajaxng.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.form.validation.IFormValidator;
+
+public class AjaxFormComponentUpdatingBehavior extends AjaxEventBehavior
+{
+	private static final long serialVersionUID = 1L;
+
+	public AjaxFormComponentUpdatingBehavior(String event)
+	{
+		super(event);
+	}
+
+	@Override
+	public void bind(Component component)
+	{
+		if (component instanceof FormComponent == false)
+		{
+			throw new WicketRuntimeException("Behavior " + getClass().getName() +
+				" can only be added to an instance of a FormComponent");
+		}
+		super.bind(component);
+	}
+
+	private List<FormComponent<?>> getFormComponents()
+	{
+		List<FormComponent<?>> result = new ArrayList<FormComponent<?>>();
+
+		for (Component c : getBoundComponents())
+		{
+			result.add((FormComponent<?>)c);
+		}
+
+		return result;
+	}
+
+	private void processComponentValidators(List<FormComponent<?>> components)
+	{
+		for (FormComponent<?> component : components)
+		{
+			component.inputChanged();
+			component.validate();
+			if (component.hasErrorMessage())
+			{
+				component.invalid();
+			}
+			else
+			{
+				component.valid();
+			}
+		}
+	}
+
+	protected Form<?> getForm(List<FormComponent<?>> components)
+	{
+		FormComponent<?> first = components.get(0);
+		return first.getForm();
+	}
+	
+	@Override
+	protected Form<?> getForm(Component component)
+	{
+		return component.findParent(Form.class);
+	}
+
+	private boolean validatorApplies(IFormValidator validator, List<FormComponent<?>> components)
+	{
+		for (FormComponent<?> component : validator.getDependentFormComponents())
+		{
+			if (!components.contains(component))
+			{
+				return false;
+			}
+		}
+		return true;
+	}
+
+	private void processFormValidators(List<FormComponent<?>> components)
+	{
+		Form<?> form = getForm(components);
+		for (IFormValidator validator : form.getFormValidators())
+		{
+			if (validatorApplies(validator, components))
+			{
+				form.validateFormValidator(validator);
+			}
+		}
+	}
+
+	@Override
+	protected final void onEvent(AjaxRequestTarget target)
+	{
+		try
+		{
+			List<FormComponent<?>> components = getFormComponents();
+
+			processComponentValidators(components);
+			processFormValidators(components);
+
+			boolean validated = true;
+
+			for (FormComponent<?> component : components)
+			{
+				if (component.hasErrorMessage())
+				{
+					validated = false;
+					break;
+				}
+			}
+
+			if (validated == true)
+			{
+				if (getUpdateModel())
+				{
+					for (FormComponent<?> component : components)
+					{
+						component.updateModel();
+					}
+				}
+				onUpdate(target);
+			}
+			else
+			{
+				onError(target);
+			}
+		}
+		catch (RuntimeException e)
+		{
+			onException(target, e);
+		}
+	}
+
+	/**
+	 * @return true if the model of form component should be updated, false otherwise
+	 */
+	protected boolean getUpdateModel()
+	{
+		return true;
+	}
+
+	protected void onUpdate(AjaxRequestTarget target)
+	{
+
+	}
+
+	protected void onError(AjaxRequestTarget target)
+	{
+
+	}
+
+	protected void onException(AjaxRequestTarget target, RuntimeException e)
+	{
+		throw (e);
+	}
+}

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

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormValidatingBehavior.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormValidatingBehavior.java?rev=692471&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormValidatingBehavior.java (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/form/AjaxFormValidatingBehavior.java Fri Sep  5 08:59:40 2008
@@ -0,0 +1,140 @@
+/*
+ * 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.form;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.Component.IVisitor;
+import org.apache.wicket.ajaxng.AjaxRequestAttributes;
+import org.apache.wicket.ajaxng.AjaxRequestTarget;
+import org.apache.wicket.feedback.IFeedback;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.util.time.Duration;
+
+/**
+ * Ajax event behavior that submits the form and updates all form feedback panels on the page.
+ * Useful for providing instant feedback.
+ * 
+ * @since 1.2
+ * 
+ * @author Igor Vaynberg (ivaynberg)
+ * 
+ */
+public class AjaxFormValidatingBehavior extends AjaxFormSubmitBehavior
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param form
+	 *            form that will be submitted via ajax
+	 * @param event
+	 *            javascript event this behavior will be invoked on, like onclick
+	 */
+	public AjaxFormValidatingBehavior(Form< ? > form, String event)
+	{
+		super(form, event);
+	}
+
+	/**
+	 * 
+	 * @see org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
+	 */
+	@Override
+	protected void onSubmit(final AjaxRequestTarget target)
+	{
+		addFeedbackPanels(target);
+	}
+
+	/**
+	 * 
+	 * @see org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onError(org.apache.wicket.ajax.AjaxRequestTarget)
+	 */
+	@Override
+	protected void onError(AjaxRequestTarget target)
+	{
+		addFeedbackPanels(target);
+	}
+
+	/**
+	 * Adds all feedback panels on the page to the ajax request target so they are updated
+	 * 
+	 * @param target
+	 */
+	private void addFeedbackPanels(final AjaxRequestTarget target)
+	{
+		getBoundComponents().get(0).getPage().visitChildren(IFeedback.class, new IVisitor<Component>()
+		{
+			public Object component(Component component)
+			{
+				target.addComponent(component);
+				return IVisitor.CONTINUE_TRAVERSAL;
+			}
+		});
+	}
+
+	/**
+	 * Adds this behavior to all form components of the specified form
+	 * 
+	 * @param form
+	 * @param event
+	 */
+	public static void addToAllFormComponents(final Form< ? > form, final String event)
+	{
+		addToAllFormComponents(form, event, null);
+	}
+
+	private static void addThrottlingBehavior(Form<?> form, Component component, String event, final Duration throttleDelay)
+	{
+		AjaxFormValidatingBehavior behavior = new AjaxFormValidatingBehavior(form, event)
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void updateAttributes(AjaxRequestAttributes attributes,
+				Component component)
+			{
+				super.updateAttributes(attributes, component);
+				attributes.setThrottle((int)throttleDelay.getMilliseconds());
+				attributes.setThrottlePostpone(true);
+			}
+		};
+		
+		component.add(behavior);	
+	}
+	
+	/**
+	 * Adds this behavior to all form components of the specified form
+	 * 
+	 * @param form
+	 * @param event
+	 * @param throttleDelay
+	 */
+	public static void addToAllFormComponents(final Form< ? > form, final String event,
+		final Duration throttleDelay)
+	{
+		form.visitChildren(FormComponent.class, new IVisitor<Component>()
+		{
+			public Object component(Component component)
+			{
+				addThrottlingBehavior(form, component, event, throttleDelay);
+				return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
+			}
+		});
+	}
+}

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

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng-base62.js
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng-base62.js?rev=692471&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng-base62.js (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng-base62.js Fri Sep  5 08:59:40 2008
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9(){4a().4b("*",9(Y){6 E=Y.2s;6 L=Y.6k;6 u=Y.4c;6 W={};W.Y=Y;W.$=9(a){11(a==12||1w(a)=="1D"){13 12}11(1b.15>1){6 e=[];19(6 i=0;i<1b.15;i++){e.1h(W.$(1b[i]))}13 e}14{11(1w a=="4d"){13 1c.6l(a)}14{13 a}}};W.$$=9(a){11(L.1r(a)){13 W.$(a)!=12}14{13 Y.4e(a).6m()}};6 w=9(a,b){13 9(){13 a.1t(b,1b)}};6 x=9(a){6 b=1e 1J();19(6 i=0;i<a.15;++i){b.1h(a[i])}13 b};6 y=9(a,b){11(L.1K(a)){19(6 i=0;i<a.15;++i){6 c=b(a[i]);11(c!=12){13 c}}}14{11(!L.6n(a)&&!L.6o(a)){13 b(a)}}13 12};6 z=9(a,b,c){6 d=a.28(b);1U(d>-1){a=a.4f(b,c);d=a.28(b)}13 a};6 A={16:9(){},1i:9(){},1x:9(){},17:9(){},1u:9(){}};6 B={29:9(b,c){6 d=c[0];6 a=x(c).6p(1);11(c.15>1){a.2J("|")}a.2J(d);a.2J("|");a.2
 J(b);19(6 i=0;i<a.15;++i){11(L.1r(a[i])&&a[i].15>6q){6 s=a[i];a[i]={2t:s,4g:9(){13 s.3e(0,30)+"..."}}}}13 a},16:9(){1l.1i.1t(7,B.29("6r",1b))},1i:9(){1l.1i.1t(7,B.29("6s",1b))},1x:9(){1l.1x.1t(7,B.29("6t",1b))},17:9(){1l.17.1t(7,B.29("6u",1b))},1u:9(){1l.1u.1t(7,B.29("6v",1b))}};6 C=A;11(!u.4h&&1w(1f.1l)!=="1D"&&L.3f(1l.2u)&&C===A){C=B;11(1w(1l.17)=="1D"){1l.17=1l.2u}11(1w(1l.1x)=="1D"){1l.1x=1l.2u}11(1w(1l.1i)=="1D"){1l.1i=1l.2u}11(1w(1l.1u)=="1D"){1l.1u=1l.2u}}6 D={2a:18,16:1d,1i:1d,1x:1d,17:1d,1u:1d,"16:3g":18,"16:1n":18,"16:2K":18,"16:1V":18,"16:1a":18,"16:4i":18,"16:1W":1d};W.4j={16:9(){11(!D.2a&&D.16&&D[1b[0]]!=18&&D["16:"+1b[0]]!=18){C.16.1t(7,1b)}},1i:9(){11(!D.2a&&D.1i&&D[1b[0]]!=18&&D["1i:"+1b[0]]!=18){C.1i.1t(7,1b)}},1x:9(){11(!D.2a&&D.1x&&D[1b[0]]!=18&&D["1x:"+1b[0]]!=18){C.1x.1t(7,1b)}},17:9(){11(!D.2a&&D.17&&D[1b[0]]!=18&&D["17:"+1b[0]]!=18){C.17.1t(7,1b)}},1u:9(){11(!D.2a&&D.1u&&D[1b[0]]!=18&&D["1u:"+1b[0]]!=18){C.1u.1t(7,1b)}},6w:9(a){C=a},6x:9(){13 C},6y:9()
 {13 C==A},6z:9(){13 D}};6 F=W.4j;6 G=9(a){7.1X=1e 1J();7.2b=12;7.2L=0;7.6A=a;1f.6B(w(7.4k,7),a)};G.1A={4k:9(){11(7.2b!=12){13}7.2b=7.1X;7.1X=1e 1J();F.16("3g","4l 4m");7.2L=0;7.3h()},3h:9(){11(7.2b!=12){6 b=0;6 c=50;6 a=7.2b;6 i;19(i=0;i<a.15&&b<50;++i){6 e=a[i];11(e!=12){++b;11(!W.$$(e)){E.6C(e);++7.2L}14{7.1X.1h(e)}a[i]=12}}11(i==a.15){7.2b=12;F.16("3g","4l 6D; 6E: "+7.2L+", 6F: "+7.1X.15)}14{1f.1Y(w(7.3h,7),50)}}}};6 H=1e G(6G);6 I=Y.2s.2M;Y.2s.2M=9(b){F.16("2K","3i 2c 2v",1b);6 c=I.1t(7,1b);11(b!==1f&&b!==1c){6 a=H.1X;a.1h(W.$(b))}13 c};4a.3j("2c-4n-6H",9(c){6 d=c.2s.2M;c.2s.2M=9(b){F.16("2K","3i 2c 2v",1b);d.1t(7,1b);11(b!==1f&&b!==1c){6 a=H.1X;a.1h(W.$(b))}}},"1.0.0",{4b:["2c-4n"]});Y.1L("6I",9(){H=12},1f);6 J=9(a){7.3k=a;7.2N=0;7.2O=0};J.1A={3l:9(){11(7.2N<7.3k.15){6 f=7.3k[7.2N];6 b=w(9(){6 a=w(7.2d,7);1j{f(a)}1k(4o){F.17("6J","1m 6K 9: ",f,4o);a()}},7);7.2N++;11(7.2O>50||u.4h){7.2O=0;1f.1Y(b,1)}14{7.2O++;b()}}},1Z:9(){7.3l()},2d:9(){7.3l()}};6 K=9(a){6 b="W.3m="+a;2
 e(b);6 c=W.3m;W.3m=12;13 c};6 M=9(b,c){6 d="6L";9 3n(a){6 t=a;6 r=/<\\s*6M/i;1U((m=t.6N(r))!=12){t=z(t,m[0],"<"+d+m[0].3e(1))}13 t}9 4p(a){13 z(a,d,"")}11(b.1B=="4q"){6 f=1c.2P("20");f.1P="<2f>"+c+"</2f>";6 g=f.1o[0].1o[0].1P;b.6O=c;1j{2e(g)}1k(e){F.17("3o","1m 4r 1E: ",g,e)}13}6 h=b.2w;6 j=b.1B;6 f=1c.2P("20");6 k;6 l=1e 1J();11(1f.2Q==1f||1f.2Q==12){1c.4s.3p(f)}11(j!="6P"&&j!="6Q"&&j!="6R"&&j!="6S"&&j!="6T"&&j!="6U"){f.1P=\'<2f 21="2R:2S">\'+3n(c)+"</2f>";6 s=f.2g("1F");19(6 i=0;i<s.15;++i){l.1h(s[i])}f.1P=\'<20 21="2R:2S">\'+c+"</20>";k=f.1o[0];k.2w.2T(k)}14{f.1P=\'<20 21="2R:2S">\'+3n(c)+"</20>";6 s=f.2g("1F");19(6 i=0;i<s.15;++i){l.1h(s[i])}f.1P=\'<2f 21="2R: 2S">\'+c+"</2f>";k=f.2g(j).2h(0).2w}1U(k.1o.15>0){6 n=k.1o[0];k.2T(n);h.6V(n,b);n=12}h.2T(b);b.2U="";b="";11(1f.2Q==1f||1f.2Q==12){1c.4s.2T(f)}f.2U="";h=12;f=12;k=12;19(i=0;i<l.15;++i){3q(l[i],4p)}};6 N=9(a,b){11(a.1B=="4q"){6 c=1c.2P("20");c.1P=b;6 d=c.1o[0].1P;11(1w(d)!="4d"){d=c.1o[0].1M}a.2U=b;1j{2e(d)}1k(e){F.
 17("3o","1m 4r 1E: ",d,e)}13}6 f=a.2w;6 g=a.2V;6 h=0;1U(f.1o[h]!=a){++h}a.2U=b;a=f.1o[h];1U(a!=g){1j{3q(a)}1k(6W){}a=a.2V}};6 O=9(a,b){11(u.4t){M(a,b)}14{11(u.6X||u.6Y){N(a,b)}14{6 c=a.6Z.3r();c.70(a);6 d=c.71(b);a.2w.72(d,a)}}};6 P=9(a,b){11(a==12){F.17("3o","73 74 4u 2W 12. 75: ",b);13}6 c=a.2V;6 d=a.1Q;O(a,b);6 f=1e 1J();6 e=W.$(d);1U(e!=c&&e!=12){f.1h(e);e=e.2V}13 f};W.4v=P;6 Q=9(a){7.1R=a};6 R=9(){7.22={};7.2x={}};R.1A={1v:9(a,b,c,f){f=f||18;11(!f&&7.4w(a,b,c)){13}6 g=7.22[a];6 e=7.2x[a];11(!f&&e!=12){6 h=1e 3s().3t();6 d=h-e;11(d<b){b-=d}}11(g==12){g=1e Q(c);g.2y=1f.1Y(w(9(){7.2z(a)},7),b);7.22[a]=g;F.16("1W","76 1v, 1s:",a,", 2X:",b,", 1R:",c)}14{g.1R=c;11(f){1f.4x(g.2y);g.2y=1f.1Y(w(9(){7.2z(a)},7),b);F.16("1W","77 1v, 1s:",a,", 2X:",b,", 1R:",c)}14{F.16("1W","4y 1v, 1s:",a,", 2X:",b,", 1R:",c)}}},4w:9(a,b,c){6 e=7.2x[a];6 d=1e 3s().3t();11(e==12||(e+b)<d){F.16("1W","4z 9 78, 1s:",a,", 2X:",b,", 1R:",c);7.2x[a]=d;6 e=7.22[a];11(e!=12){1f.4x(e.2y)}7.22[a]=12;c();13 1d
 }14{13 18}},2z:9(a){6 b=7.22[a];11(b!=12){6 f=b.1R;F.16("1W","3u 79 9, 1s:",a,"1R:",f);7.22[a]=12;7.2x[a]=1e 3s().3t();f()}}};6 S=9(a){13 L.1r(a)&&a.15>0};W.1W=R;6 T=9(a){11(4A){13 4A(a)}14{13 7a(a)}};6 U=9(a){6 b="";6 c;19(c 2Y a){6 d=a[c];11(L.1r(d)||L.4B(d)||L.4C(d)){11(b.15>0){b+="&"}b+=T(c);b+="=";b+=T(d)}14{11(L.1K(d)){19(6 i=0;i<d.15;++i){6 v=d[i];11(L.1r(v)||L.4B(v)||L.4C(v)){11(b.15>0){b+="&"}b+=T(c);b+="=";b+=T(v)}}}}}13 b};6 V=9(d,e){6 f=9(a,b){6 c=d[a];11(c==12){d[a]=b}14{11(L.1K(c)){c.1h(b)}14{d[a]=[c,b]}}};6 g;19(g 2Y e){6 h=e[g];11(L.1K(h)){19(6 i=0;i<h.15;++i){6 v=h[i];f(g,v)}}14{f(g,h)}}};6 X=9(a){11(a==12){13""}6 b="";19(6 i=0;i<a.1o.15;i++){6 c=a.1o[i];7b(c.4D){2i 1:2i 5:b+=Z(c);2A;2i 8:b+="<!--"+c.3v+"-->";2A;2i 4:b+="<![7c["+c.3v+"]]>";2A;2i 3:2i 2:b+=c.3v;2A;7d:2A}}13 b};6 Z=9(a){11(a==12){13""}6 b="";b+="<"+a.4E;11(a.1g&&a.1g.15>0){19(6 i=0;i<a.1g.15;i++){b+=" "+a.1g[i].7e+\'="\'+a.1g[i].2t+\'"\'}}b+=">";b+=X(a);b+="</"+a.4E+">";13 b};6 3w=9(a){11(W.Y.
 4c.4t){1j{6 b=1c.23.15-1;11(b>0&&1c.23[b].24.15<7f){1c.23[b].24=1c.23[b].24+a}14{1c.4F().24=a}}1k(e){1j{1c.4F().24=a}1k(e){1j{6 b=1c.23.15-1;1c.23[b].24=1c.23[b].24+a}1k(17){F.17("1n","1m 4G 2j 7g.")}}}}14{6 c=1c.2g("3x")[0];6 d=1c.2P("21");d.7h("3y","1M/7i");6 f=1c.7j(a);d.3p(f);c.3p(d)}};6 4H=9(c,d){6 e=9(a,b){F.17("1n","1m 4I 2j 2Z ",c,a,b);d()};6 f=9(a){1j{3w(a.4J)}1k(1p){F.17("1n","1m 4G 2j 2Z ",c,1p)}d()};6 g={4K:"4e",1L:{2k:f,2B:e,7k:7l}};F.1i("1n","3z 2j 7m ",c);Y.4L(c,g)};6 4M=9(b,c){6 d=9(a){F.17("1n","1m 4I 1E 2Z ",b,a);c()};6 e=9(){c()};6 f={3A:e,31:d,7n:d};Y.7o.1F(b,f)};6 2l=12;6 2m=9(){11(2l==12){2l={2C:{},3B:{}};Y.4N("1F").4O(9(a){6 b=a.1G("3C");11(L.1r(b)){2l.2C[b]=1d}});Y.4N("2n").4O(9(a){6 b=a.1G("4P");11(L.1r(b)){2l.2C[b]=1d}})}13 2l};W.7p=9(){13 2m()};6 4Q=9(a,b){11(L.1r(a)&&(W.$(a)!=12||2m().3B[a]==1d)){13 1d}14{11(L.1r(b)&&2m().2C[b]==1d){13 1d}14{13 18}}};6 3D=9(a,b){11(L.1r(a)){2m().3B[a]=1d}11(L.1r(b)){2m().2C[b]=1d}};6 3E=9(a,b){1j{F.16("1n","4m 1q 
 7q:",a);6 c=a.1B.2o();11(c!="1F"&&c!="2n"&&c!="21"){F.17("1n","7r 1q 3F 7s:",a);b();13}6 d=a.1G("1Q");6 f=12;11(c=="1F"){f=a.1G("3C")}14{11(c=="2n"){f=a.1G("4P")}}F.16("1n","7t:",c,", 7u:",f,", 7v:",d);11(!4Q(d,f)){3D(d,f);11(c=="1F"){11(f!=12){F.16("1n","3z 1E:",f);4M(f,b)}14{6 g=X(a);11(g==12||g==""){g=a.1M}F.16("1n","7w 1E:",g);2e(g);b()}}14{11(c=="2n"){F.16("1n","3z 2j:",f);4H(f,b)}14{6 g=7x(a);11(g==12||g==""){g=a.1M}F.16("1n","3i 2j: ",g);3w(g);b()}}}14{F.16("1n","7y - 1q 7z 7A.");b()}}1k(e){F.17("1n","1m 7B 1q:",a,e);b()}};6 3q=9(e,f){6 g=9(){};6 h=9(a){6 b=a.1G("3C");11(L.1r(b)){3E(a,7C)}14{6 c=7D.7E.7F(a);11(c==12||c==""){c=a.1M}11(L.3f(f)){c=f(c)}6 d=a.1G(d);11(L.1r(d)){3D(d,12)}1j{2e(c)}1k(1p){F.17("1n","1m 4R 1E ",c)}}};11(1w(e)!="1D"&&1w(e.1B)!="1D"&&e.1B.2o()=="1F"){h(e)}14{11(e.1o.15>0){6 j=e.2g("1F");19(6 i=0;i<j.15;++i){h(j[i])}}}};6 32=9(c){6 a=c;6 b=9(a){11(a){13 1d}14{13 18}};6 d=9(a){11(L.3f(a)){13[a]}14{11(L.1K(a)){13 a}14{13[]}}};6 m=9(a,b){a=d(a);b=d(
 b);13 a.7G(b)};6 e=W.1y.1H;7.1g={1S:a.1S||a.c||12,1N:a.1N||a.f||12,4S:b(a.4S||a.m),3G:b(a.3G||a.7H),33:a.33||a.7I||e.4T,3H:a.3H||a.7J||e.4U,3I:a.3I||a.p||e.4V,3J:a.3J||a.l||12,3K:a.3K||a.b,1s:a.1s||a.t||e.4W,34:b(a.34||a.r||e.4X),1v:a.1v||a.7K||12,2D:b(a.2D||a.7L),2p:m(a.2p||a.7M,e.2p),2E:m(a.2E||a.2W,e.2E),2F:m(a.2F||a.s,e.2F),2G:m(a.2G||a.e,e.2G),35:a.35||a.u||12,2q:m(a.2q||a.7N,e.2q),1I:m(a.1I||a.7O,e.1I)};F.16("1a","7P 4Y 1O",7.1g)};W.3L=32;32.1A={4Z:9(){11(7.51!=1d){7.51=1d;6 l=7.1g.1I;19(6 i=0;i<l.15;++i){6 a=l[i];1j{a(7)}1k(1p){F.17("1a","1m 25 3L 7Q 7R",1p)}}}},52:9(b,c,d){6 f=w(9(){F.1i("1a","53 54 - 7S 2h; 1O: ",7," 53: ",b);d()},7);6 e=18;6 g=9(){e=1d};6 h=9(a){11(a==18){f()}14{c()}};6 i;1j{i=b(7,g,h)}1k(1p){F.17("1a","1m 4R 7T ",b,"36: ",1p);e=18;i=18}11(e==18){11(i==18){f()}14{c()}}},55:9(e,f){6 g=1e 1J();6 h=x(7.1g.2p);h.1h(56);6 i=y(7.1g.2p,w(9(d){g.1h(w(9(a){6 b=a;6 c=f;7.52(d,b,c)},7))},7));g.1h(9(a){a();e()});1e J(g).1Z()},57:9(){y(7.1g.2E,w(9(a){1j{a(7)}1k
 (1p){F.17("1a","1m 25 3M 3N ",a,"36: ",1p)}},7))},58:9(){y(7.1g.2F,w(9(a){1j{a(7)}1k(1p){F.17("1a","1m 25 2k 3N ",a,"36: ",1p)}},7))},59:9(b){y(7.1g.2G,w(9(a){1j{a(7,b)}1k(1p){F.17("1a","1m 25 17 3N ",a,"36: ",1p)}},7))},2k:9(){11(7.1z!=12){F.1x("1a","1O 5a 7U",7);7.58();7.1z();7.1z=12}},2B:9(a){11(7.1z!=12){7.59(a);7.1z();7.1z=12}},5b:9(a){6 s="<3x>"+a+"</3x>";6 b;11(1f.5c){b=1e 5c("7V.7W");b.7X(s)}14{6 c=1e 7Y();b=c.7Z(s,"1M/80")}13 b.81},5d:9(d,e){6 f=7.5b(d);6 g=9(b){6 c=b.1B.2o();11(c=="1F"||c=="2n"||c=="21"){e.1h(9(a){3E(b,a)})}};19(6 i=0;i<f.1o.15;i++){6 h=f.1o[i];11(h.1B!=12){6 k=h.1B.2o();11(k=="5e:2n"){19(6 j=0;j<h.1o.15;++j){6 l=h.1o[j];11(l.4D==1){g(l)}}}g(h)}}},3O:9(d,e){6 g=w(9(b){11(b.82==1d){6 f=K("(9(1I, 2d) {"+b.1E+"})");6 c=w(9(a){f(7,a)},7);e.1h(c)}14{6 f=K("(9(1I) {"+b.1E+"})");6 c=w(9(a){f(7);a()},7);e.1h(c)}},7);11(L.1K(d)){19(6 i=0;i<d.15;++i){6 j=d[i];g(j)}}},5f:9(g,h){6 i=g.5g;6 j=g.37;6 k=g.83;6 l=g.84;6 m=g.85;11(k!=12){6 f=K("(9(1I, 37, 2d) {"+k+
 "})");6 n=w(9(a){F.16("1a","3u 3M 38 1E",f);f(7,j,a)},7);h.1h(n)}6 o;11(m!=12){o=K("(9(1I, 37, 5g, 2d) {"+k+"})")}14{o=9(a,b,c,d){F.16("1a","4y 1S",a,b,c);6 e=W.$(b);6 f;11(e==12){F.17("1a","86\'t 87 1q 3F 2W 88 ",b)}14{f=W.4v(e,c);F.16("1a","89 8a:",f)}d(f)}}6 p=12;6 q=w(9(b){6 c=w(9(a){11(L.1K(a)){p=a;W.1y.5h(a,7);W.1y.5i(j,7)}b()},7);W.1y.5j(j,7);o(7,j,i,c)},7);h.1h(q);11(l!=12){6 f=K("(9(1I, 37, 2d, 8b) {"+l+"})");6 n=w(9(a){F.16("1a","3u 5k 38 1E",f);f(7,j,a,p)},7);h.1h(n)}},5l:9(a,b){11(L.1K(a)){19(6 i=0;i<a.15;++i){6 c=a[i];11(L.3P(c)){7.5f(c,b)}}}},5m:9(a){1f.8c=a},5n:9(b){11(L.1r(b.5o)){7.5m(b.5o);7.2k()}6 c=1e 1J();7.3O(b.8d,c);11(b.5p!=12){7.5d(b.5p,c)}7.5l(b.8e,c);7.3O(b.8f,c);c.1h(w(9(a){7.2k()},7));F.1i("1a","39 5a: ",{4g:9(){13"8g..."},8h:c},". 4z.");1e J(c).1Z()},3A:9(a,b){F.1i("1a","3Q 8i - 5q: ",a," 39: ",b,"1O: ",7);1j{6 c=b.4J.3e(10);6 d=2e(c);F.1i("1a","39 8j: ",d);11(L.3P(d)){7.5n(d)}}1k(1p){F.17("1a","1m 8k 8l 8m 8n.",1p);7.2B(1p)}},31:9(a,b){F.1i("1a"
 ,"3Q 54 - 5q: ",a," 39: ",b,"1O: ",7);7.2B()},5r:9(){6 a=7.1g;6 b=(a.1S==12)?12:(W.$(a.1S).1G("1Q"));6 c={};6 d=W.1y.1H;c[d.5s]=b;c[d.5t]=a.3I;c[d.5u]=a.1N;c[d.5v]=a.3J;c[d.5w]=a.3K;13 c},5x:9(){6 a=W.1y.1H.5y;6 b=""+(5z++)+(3R.8o(3R.5A()*8p));11(a.28("?")==-1){a+="?"}14{a+="&"}a+=W.1y.1H.5B;a+="=";a+=b;13 a},5C:9(){6 a=7.1g;6 b=1e 8q();11(a.35!=12){V(b,a.35)}19(6 i=0;i<a.2q.15;++i){6 m=a.2q[i](7);11(L.3P(m)){V(b,m)}}V(b,7.5r());13 U(b)},5D:9(b){6 a=7.1g;6 m=a.1N!=12?"5E":"5F";11(m=="5F"&&a.3G==1d){m="5E"}6 f=a.1N!=12?{1Q:a.1N}:12;6 c={4K:m,8r:b,1L:{2k:w(7.3A,7),2B:w(7.31,7),8s:w(7.31,7)},8t:f,2y:a.33};13 c},2z:9(a){7.57();7.1z=a;6 b=7.5C();6 c=7.5x();6 d=7.5D(b);F.1x("1a","8u 8v 3Q 1L ",c," 8w 8x ",d);6 e=Y.4L(c,d);F.16("1a","8y 8z 8A ",e)}};6 3S=9(){7.1C=1e 1J();7.5G=1e R()};3S.1A={3T:9(b){6 c=7.1C.15==0;6 a=b.1g;11(a.34){11(!S(a.1s)){F.1u("1a","1O ",b," 3U 34 3V 3W 2H 1s 3X - 3Y")}14{7.5H(a.1s)}}7.1C.1h(b);11(c){7.1z()}},5H:9(a){11(a!=12){19(6 i=0;i<7.1C.15;++i){6 b=7.1C[
 i];11(b.1g.1s==a){7.1C[i]=12}}6 q=7.1C;7.1C=1e 1J();19(6 i=0;i<q.15;++i){11(q[i]!=12){7.1C.1h(q[i])}}}},3j:9(b){11(b==12){F.17("1a","8B \'2h\' 5I 4u 2W 12.");13}14{11(b.1g==12){F.17("1a","1O ",b," 5I 8C 1g.");13}}b.4Z();6 a=b.1g;11(a.2D==1d&&a.1v==12){F.1u("1a","1O ",b," 3U 2D 3V 3W 2H 1v 3X - 3Y.")}14{11(a.1v!=12&&!S(a.1s)){F.1u("1a","1O ",b," 3U 1v 3V 3W 2H 1s 3X - 3Y.")}14{11(a.1v!=12){6 f=w(9(){7.3T(b)},7);7.5G.1v(a.1s,a.1v,f,a.2D);13}}}7.3T(b)},5J:9(){7.3a=12;11(7.1C.15>0){6 i=7.1C.8D();6 c=w(9(){7.3a=i;6 s=w(9(){7.5K(i)},7);6 a=i.1g;6 t=a.33+a.3H+8E;1f.1Y(s,t);6 b=w(7.1z,7);i.2z(b)},7);6 d=w(9(){7.1z()},7);i.55(c,d)}},1z:9(){1f.1Y(w(7.5J,7),0)},5K:9(a){11(7.3a==a){F.17("1a","8F 8G, 3Z 2h",a);7.3a=12;7.1z()}}};6 56=9(b){6 a=b.1g;11(a.1S!=12){11(!W.$$(a.1S)){F.1i("1a","8H ",a.1S," 2H 5L 2Y 1c, 3Z 2h.");13 18}}11(a.1N!=12){11(!W.$$(a.1N)){F.1i("1a","8I ",a.1N," 2H 5L 2Y 1c, 3Z 2h.");13 18}}13 1d};6 5z=0;6 5M=9(a){6 b={};b[W.1y.1H.5N]=W.1y.1H.5O;b["5e:1y"]=1d;13 b};6 5P=9(
 a,b){F.16("4i","4Y 5Q 5R 3F 1c:",a,", 2Z 3L (8J):",b);11(L.1K(a)){W.3b.40(a)}};6 5S=9(a,b){W.3b.5T()};6 5U=9(a,b){W.3b.5V()};6 5W={4T:5X,4U:5X,4V:-1,4W:12,4X:18,2E:[],2p:[],2F:[],2G:[],8K:[],2q:[5M],1I:[],5y:"8L",5s:"8M",5B:"8N",5t:"8O",5u:"8P",5v:"8Q",5w:"8R",5N:"8S",5O:0,5Y:[5P],5Z:[5S],60:[5U]};6 41=9(){7.1H=5W;7.61=1e 3S()};41.1A={5h:9(a,b){1j{6 l=7.1H.5Y;19(6 i=0;i<l.15;++i){l[i](a,b)}}1k(e){F.17("42","1m 25 5Q 5R 2v",e)}},5j:9(a,b){1j{6 l=7.1H.5Z;19(6 i=0;i<l.15;++i){l[i](a,b)}}1k(e){F.17("42","1m 25 3M 38 2v",e)}},5i:9(a,b){1j{6 l=7.1H.60;19(6 i=0;i<l.15;++i){l[i](a,b)}}1k(e){F.17("42","1m 25 5k 38 2v",e)}}};W.1y=1e 41();6 62=9(a,b,c){11(1w a.43!="1D"&&1w a.63!="1D"){a.8T(b,c);a.26()}14{11(1c.2I&&1c.2I.3r){6 d=a.8U();d.8V("64",b);d.8W("64",c-b);d.44()}}};6 2r=9(a){7.1q=a};2r.1A.65=9(){11(1c.2I!=12&&7.1q.43==12){13 7.66()}14{13 7.67()}};2r.1A.67=9(){13{1Z:7.1q.43,3c:7.1q.63}};2r.1A.66=9(){7.1q.26();6 a=1c.2I.3r();6 b=a.8X();6 c=7.1q.2t;6 d=c;6 e=7.45();1U(c.28(e)!=-1){
 e=7.45()}6 f=a.8Y();11(f==12||(f.3y!="46"&&f.3y!="1M")){13{1Z:0,3c:0}}a.1M=e+a.1M+e;c=7.1q.2t;6 g={};g.1Z=c.28(e);c=c.4f(e,"");g.3c=c.28(e);7.1q.2t=d;a.8Z(b);a.44();13 g};2r.1A.45=9(){13"##90"+3R.5A()+"##"};6 68=9(a){6 b=1e 2r(a);6 s=b.65();13[s.1Z,s.3c]};6 47=9(){7.48=["69","44","46","91","a"];6 a=w(9(){7.40([1c])},7);Y.1L("2c:92",a);7.1T=12};47.1A={40:9(a){F.16("1V","93 26 6a",a);19(6 i=0;i<a.15;++i){6 e=a[i];19(6 j=0;j<7.48.15;++j){6 b=7.48[j];6 c=e.2g(b);19(6 k=0;k<c.15;++k){6 n=c[k];11(n.6b!=1d){F.16("1V","94 26 6a 1L",n);Y.1L("26",7.6c,n,7);Y.1L("95",7.6d,n,7);n.6b=1d}}}}},6c:9(a){7.1T=a.6e.1G("1Q")},6d:9(a){6 b=a.6e.1G("1Q");11(7.1T==b){7.1T=12}},5T:9(){F.16("1V","96 6f 6g 1q 1Q:",7.1T);7.3d=7.1T;6 e=W.$(7.1T);7.27=12;11(e!=12){11(e.1B.2o()=="69"||e.1B.2o()=="46"){7.27=68(e);F.16("1V","97 2I: ",7.27)}}},5V:9(){6 f=w(9(){1j{F.16("1V","98 6f 6g 1q 1Q:",7.1T);11(7.3d!=12){6 e=W.$(7.3d);e.26();11(7.27!=12){62(e,7.27[0],7.27[1])}7.27=12;7.3d=12;13 1d}}1k(e){F.1i("1V","1m 9
 9 26 ",e);13 18}},7);11(f()==18){1f.1Y(f,0)}}};W.3b=1e 47();6 6h=9(e,a){13 e+"---"+a.c+"---"+a.b};6 6i=9(a){11(a.49==12){a.49={}}13 a.49};W.6j=9(a,b,c){6 d;11(b.c==12){d=1f}14{d=W.$(b.c)}6 e=6h(a,b);6 h=6i(d);6 f=h[e];11(f!=12){F.16("2K","9a 9b ",f);f.9c()}f=Y.1L(a,c,d);h[e]=f};W.e=9(c,d,e){6 f=9(a){6 b=1e 32(d);b.2c=a;W.1y.61.3j(b);11(e!=1d){a.9d()}};W.6j(c,d,f)};1f.W=W})})();',62,572,'||||||var|this||function||||||||||||||||||||||||||||||||||||||||||||||||||||||if|null|return|else|length|trace|error|false|for|RequestQueue|arguments|document|true|new|window|attributes|push|debug|try|catch|console|Error|Contribution|childNodes|exception|element|isString|token|apply|warn|throttle|typeof|info|ajax|next|prototype|tagName|queue|undefined|javascript|script|getAttribute|globalSettings|requestQueueItem|Array|isArray|on|text|formId|Item|innerHTML|id|func|component|focusedElement|while|Focus|Throttler|elementsWithListeners|setTimeout|start|div|style|entries|styleSheets|cssText|invoki
 ng|focus|lastSelection|indexOf|arg|disableAll|beingPurged|event|notify|eval|table|getElementsByTagName|item|case|stylesheet|success|bC|bD|link|toLowerCase|preconditions|urlArgumentMethods|bT|Event|value|log|listeners|parentNode|executionTimes|timeout|execute|break|failure|urls|throttlePostpone|beforeHandlers|successHandlers|errorHandlers|no|selection|unshift|Events|purgedCount|addListener|current|depth|createElement|parent|display|none|removeChild|outerHTML|nextSibling|be|millis|in|from||onFailure|bI|requestTimeout|removePrevious|urlArguments|Exception|componentId|replacement|Response|currentItem|focusManager|end|lastFocusedElement|substring|isFunction|GarbageCollector|purge|Adding|add|functions|processNext|__tmp|markIframe|ReplaceOuterHtml|appendChild|bH|createRange|Date|getTime|Invoking|nodeValue|bz|head|type|Loading|onSuccess|ids|src|bF|bG|to|forcePost|processingTimeout|pageId|listenerInterface|behaviorIndex|RequestQueueItem|before|handler|processJavascripts|isObject|Requ
 est|Math|bJ|addInternal|has|set|but|specified|ignored|skipping|attachFocusEvent|bR|Ajax|selectionStart|select|_createSelectionMarker|textarea|bV|tagNames|wicketEventHandlers|YUI|use|UA|string|get|replace|toString|webkit|General|Log|purgeInactiveListeners|Purge|Begin|dom|ex|removeIframeMark|SCRIPT|evaluation|body|ie|not|replaceOuterHtml|checkLastExecutionTime|clearTimeout|Replacing|Executing|encodeURIComponent|isNumber|isBoolean|nodeType|nodeName|createStyleSheet|adding|bA|loading|responseText|method|io|bB|all|each|href|bE|evaluating|multipart|defaultRequestTimeout|defaultProcessingTimeout|defaultPageId|defaultToken|defaultRemovePrevious|New|init||initialized|checkPrecondition|Precondition|failed|checkPreconditions|bK|invokeBeforeHandlers|invokeSuccessHandlers|invokeErrorHandlers|processed|parseHeaderContribution|ActiveXObject|processHeaderContribution|wicket|processComponent|markup|invokeNodesAddedListeners|invokeAfterReplacementListeners|invokeBeforeReplacementListeners|aft
 er|processComponents|processRedirect|processResponse|redirect|header|TransactionId|defaultUrlParameters|urlParamComponentId|urlParamPageId|urlParamFormId|urlParamListenerInterface|urlParamBehaviorIndex|buildUrl|urlPrefix|bL|random|urlParamTimestamp|buildUrlParameters|getRequestCfg|POST|GET|throttler|removeByToken|must|nextInternal|skip|longer|bM|urlParamUrlDepth|urlDepthValue|bN|nodes|added|bO|rememberFocus|bP|restoreFocus|bQ|60000|nodesAddedListeners|beforeReplacementListeners|afterReplacementListeners|requestQueue|bS|selectionEnd|character|create|_ieGetSelection|_mozillaGetSelection|bU|input|events|wicketFocusAttached|onFocus|onBlur|target|last|focused|bW|bX|attachEventHandler|Lang|getElementById|inDoc|isUndefined|isNull|slice|100|TRACE|DEBUG|INFO|ERROR|WARN|setLogger|getLogger|isDummyLogger|getConfig|purgeInterval|setInterval|purgeElement|End|purged|total|5000|fix|unload|FunctionsExecutor|execution|__WICKET_JS_REMOVE_X9F4A__|iframe|match|outerHtml|TBODY|TR|TD|THEAD|TFOOT|
 TH|insertBefore|ignore|safari|opera|ownerDocument|selectNode|createContextualFragment|replaceChild|Element|can|Markup|Setting|Postponing|immediately|throttled|escape|switch|CDATA|default|name|30000|definiton|setAttribute|css|createTextNode|abourt|abortHandler|resource|onTimeout|Get|getContributed|contribution|Unknown|contribute|TagName|URL|ID|Evaluating|serializeNodeChidren|Skipped|already|contributed|contributing|nofiy|Wicket|DOM|serializeNodeChildren|concat|fp|rt|pt|th|thp|pr|ua|rqi|Creating|creation|listener|skiping|precondition|successfully|Microsoft|XMLDOM|loadXML|DOMParser|parseFromString|xml|documentElement|async|beforeReplaceJavascript|afterReplaceJavascript|replaceJavascript|Couldn|find|replaced|Replacement|done|insertedElements|location|prependJavascript|components|appendJavascript|Steps|steps|successful|parsed|parsing|or|processing|response|ceil|10000|Object|data|abort|form|Initiating|AJAX|with|configuration|Obtained|request|object|Argument|contain|shift|1000|Time
 out|exceeded|Component|Form|optional|urlPostProcessors|INVALID_URL_PREFIX|INVALID_COMPONENT_ID_PARAM|INVALID_TIMESTAMP_PARAM|INVALID_PAGE_ID_PARAM|INVALID_FORM_ID_PARAM|INVALID_LISTENER_INTERFACE_PARAM|INVALID_BEHAVIOR_INDEX_PARAM|INVALID_URL_DEPTH_PARAM|setSelectionRange|createTextRange|move|moveEnd|getBookmark|parentElement|moveToBookmark|SELECTION_MARKER_|button|ready|Attach|Attaching|blur|Remembering|Last|Restoring|restoring|Detaching|handle|detach|preventDefault'.split('|'),0,{}))
\ No newline at end of file

Propchange: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/js/wicket-ajax-ng-base62.js
------------------------------------------------------------------------------
    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=692471&r1=692470&r2=692471&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 Fri Sep  5 08:59:40 2008
@@ -223,7 +223,7 @@
 	{ 
 		disableAll: false, trace: true, debug: true, info: true, error: true, warn: true, 
 		"trace:GarbageCollector": false, "trace:Contribution":false, "trace:Events":false, "trace:Focus":false,
-		"trace:RequestQueue": false, "trace:General":false, "trace:Throttler": true
+		"trace:RequestQueue": false, "trace:General":false, "trace:Throttler": false
 	};
 	
 	W.Log  = 
@@ -1401,7 +1401,8 @@
 	 *   t, token                - String     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 removePrevious 
-	 *                                        is true. Also required when throttle attribute is used.
+	 *                                        is true. If token is required and none is specified token
+	 *                                        value is generated from componentId.
 	 *        
 	 *   r, removePrevious       - Boolean    Optional. If there are previous items with same token in the 
 	 *                                        queue they will be removed if removePrevious is true. This 
@@ -1524,6 +1525,22 @@
 			indicatorId:          a.indicatorId        || a.i    || null
 		}
 		
+		var a = this.attributes;
+		if (a.throttle != null || a.removePrevious != null)
+		{
+			if (a.token == null)
+			{
+				if (a.component != null)
+				{
+					a.token = "GENERATED_TOKEN_" + a.component;
+				}
+				else
+				{
+					a.token = "GENERATED_TOKEN_PAGE";
+				}
+			}
+		}
+		
 		log.trace("RequestQueue", "Creating New Item", this.attributes);				
 	}
 		
@@ -2379,26 +2396,48 @@
 	// This script is distributed under the MIT licence.
 	// http://www.opensource.org/licenses/mit-license.php
 
-	var Selection = function(textareaElement) {
+	var Selection = function(textareaElement) 
+	{
 	    this.element = textareaElement;
 	}
 
-	Selection.prototype.create = function() {
-	    if (document.selection != null && this.element.selectionStart == null) {
+	Selection.prototype.create = function() 
+	{
+	    if (document.selection != null && this.element.selectionStart == null) 
+	    {
 	        return this._ieGetSelection();
-	    } else {
+	    } 
+	    else 
+	    {
 	        return this._mozillaGetSelection();
 	    }
 	}
 
-	Selection.prototype._mozillaGetSelection = function() {
-	    return { 
-	        start: this.element.selectionStart, 
-	        end: this.element.selectionEnd 
-	    };
+	Selection.prototype._mozillaGetSelection = function() 
+	{
+		var type = this.element.type;
+		var res;
+		if (type == "textarea" || type == "text")
+		{			
+		    res = 
+		    { 
+		        start: this.element.selectionStart, 
+		        end: this.element.selectionEnd 
+		    };
+		}
+		else
+		{
+			res =  
+			{
+				start: 0,
+				end: 0
+			};
+		}
+		return res;
 	}
 
-	Selection.prototype._ieGetSelection = function() {
+	Selection.prototype._ieGetSelection = function() 
+	{
 	    this.element.focus();
 
 	    var range = document.selection.createRange();
@@ -2407,13 +2446,20 @@
 	    var contents = this.element.value;
 	    var originalContents = contents;
 	    var marker = this._createSelectionMarker();
-	    while(contents.indexOf(marker) != -1) {
+	    while(contents.indexOf(marker) != -1) 
+	    {
 	        marker = this._createSelectionMarker();
 	    }
 
 	    var parent = range.parentElement();
-	    if (parent == null || (parent.type != "textarea" && parent.type != "text")) {
-	        return { start: 0, end: 0 };
+	    if (parent == null || (parent.type != "textarea" && parent.type != "text")) 
+	    {
+	        var res = 
+	        { 
+	        	start: 0, 
+	        	end: 0 
+	        };
+			return res;
 	    }
 	    range.text = marker + range.text + marker;
 	    contents = this.element.value;
@@ -2430,7 +2476,8 @@
 	    return result;
 	}
 
-	Selection.prototype._createSelectionMarker = function() {
+	Selection.prototype._createSelectionMarker = function() 
+	{
 	    return "##SELECTION_MARKER_" + Math.random() + "##";
 	}
 	

Added: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/markup/html/form/AjaxButton.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/markup/html/form/AjaxButton.java?rev=692471&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/markup/html/form/AjaxButton.java (added)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/ajaxng/markup/html/form/AjaxButton.java Fri Sep  5 08:59:40 2008
@@ -0,0 +1,86 @@
+/*
+ * 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.markup.html.form;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.ajaxng.AjaxRequestAttributes;
+import org.apache.wicket.ajaxng.AjaxRequestTarget;
+import org.apache.wicket.ajaxng.form.AjaxFormSubmitBehavior;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.Form;
+
+public abstract class AjaxButton extends Button
+{
+
+	private static final long serialVersionUID = 1L;
+
+	public AjaxButton(String id)
+	{
+		this(id, null);
+	}
+
+	public AjaxButton(String id, Form<?> form)
+	{
+		super(id);
+		
+		add(new AjaxFormSubmitBehavior(form, "click") 
+		{
+
+			private static final long serialVersionUID = 1L;
+			
+			@Override
+			protected void onSubmit(AjaxRequestTarget target)
+			{
+				AjaxButton.this.onSubmit(target,getForm());
+			}
+			@Override
+			protected void onError(AjaxRequestTarget target)
+			{
+				AjaxButton.this.onError(target, getForm());
+			}
+			@Override
+			protected void updateAttributes(AjaxRequestAttributes attributes, Component component)
+			{
+				super.updateAttributes(attributes, component);
+				AjaxButton.this.updateAttributes(attributes);
+			}
+		});
+	}
+	
+	protected void updateAttributes(AjaxRequestAttributes attributes)
+	{
+		
+	}
+	
+	@Override
+	public final void onSubmit()
+	{
+		if (AjaxRequestTarget.get() == null)
+		{
+			onSubmit(null, getForm());
+		}
+	}
+	
+	protected abstract void onSubmit(AjaxRequestTarget target, Form<?> form);
+	
+	protected void onError(AjaxRequestTarget target, Form<?> form)
+	{
+		
+	}
+	
+
+}

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

Modified: wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=692471&r1=692470&r2=692471&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java (original)
+++ wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Fri Sep  5 08:59:40 2008
@@ -1920,7 +1920,7 @@
 	 * 
 	 * @param validator
 	 */
-	protected final void validateFormValidator(final IFormValidator validator)
+	public final void validateFormValidator(final IFormValidator validator)
 	{
 		if (validator == null)
 		{