[wicket] branch modal-dialog updated (0460768 -> 029f6f0)

2019-05-14 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a change to branch modal-dialog
in repository https://gitbox.apache.org/repos/asf/wicket.git.


from 0460768  WICKET- initial checkin of new ModalDialog
 add 029f6f0  WICKET- tweaks based on feedback from pull request

No new revisions were added by this update.

Summary of changes:
 .../wicket/extensions/ajax/markup/html/modal/ModalDialog.java  |  4 
 .../wicket/extensions/ajax/markup/html/modal/ModalDialog.js| 10 +-
 .../ajax/markup/html/modal/ModalDialogReferences.java  |  8 
 3 files changed, 17 insertions(+), 5 deletions(-)



[wicket] 01/01: WICKET-6666 initial checkin of new ModalDialog

2019-05-10 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a commit to branch modal-dialog
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 0460768cc29dfeb78f74284ed5b7ac98d85885ba
Author: Igor Vaynberg 
AuthorDate: Fri May 10 13:41:39 2019 -0700

WICKET- initial checkin of new ModalDialog
---
 .../examples/ajax/builtin/AjaxApplication.java |   2 +
 .../apache/wicket/examples/ajax/builtin/Index.html |   2 +
 .../ajax/builtin/modal/ModalDialogPage.html|  19 +
 .../ajax/builtin/modal/ModalDialogPage.java|  77 
 .../ajax/markup/html/modal/ModalDialog-skin.css|  24 ++
 .../ajax/markup/html/modal/ModalDialog.css |  43 +++
 .../ajax/markup/html/modal/ModalDialog.html|   7 +
 .../ajax/markup/html/modal/ModalDialog.java| 240 
 .../ajax/markup/html/modal/ModalDialog.js  | 424 +
 .../markup/html/modal/ModalDialogReferences.java   |  38 ++
 10 files changed, 876 insertions(+)

diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
index 82caa41..a5ce9ac 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
@@ -21,6 +21,7 @@ import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxNewWindowNotifyingBehavior;
 import org.apache.wicket.application.IComponentInitializationListener;
 import org.apache.wicket.examples.WicketExampleApplication;
+import org.apache.wicket.examples.ajax.builtin.modal.ModalDialogPage;
 import org.apache.wicket.examples.ajax.builtin.modal.ModalWindowPage;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.response.filter.AjaxServerAndClientTimeFilter;
@@ -65,6 +66,7 @@ public class AjaxApplication extends WicketExampleApplication
mountPage("lazy-loading", LazyLoadingPage.class);
mountPage("links", LinksPage.class);
mountPage("modal-window", ModalWindowPage.class);
+   mountPage("modal-dialog", ModalDialogPage.class);
mountPage("on-change-ajax-behavior", 
OnChangeAjaxBehaviorPage.class);
mountPage("pageables", PageablesPage.class);
mountPage("ratings", RatingsPage.class);
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/Index.html
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/Index.html
index 2da2160..30aa04c 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/Index.html
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/Index.html
@@ -24,6 +24,8 @@
 
 Modal window: javascript modal window 
example
 
+Modal dialog (replaces deprecated Modal 
Window): javascript modal dialog example
+
 On Change Ajax Updater Example: 
demonstrates updating page with ajax when text field value is changed  
 
 Pageables Example: shows ajax paging
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.html
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.html
new file mode 100644
index 000..1fbe9d5
--- /dev/null
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.html
@@ -0,0 +1,19 @@
+
+http://wicket.apache.org";>
+
+   
+   
+   Open Dialog 1
+   
+   
+   
+   
+   This is a modal dialog
+   
+   
+   Close
+   
+   
+   
+
+
\ No newline at end of file
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.java
new file mode 100644
index 000..ff1974c
--- /dev/null
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalDialogPage.java
@@ -0,0 +1,77 @@
+/*
+ * 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,
+ * WI

[wicket] branch modal-dialog created (now 0460768)

2019-05-10 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a change to branch modal-dialog
in repository https://gitbox.apache.org/repos/asf/wicket.git.


  at 0460768  WICKET- initial checkin of new ModalDialog

This branch includes the following new commits:

 new 0460768  WICKET- initial checkin of new ModalDialog

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[wicket] branch master updated: WICKET-6626 - application wide Component#onComponentTag listeners - fix imports

2019-01-03 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
 new e5f9c94  WICKET-6626 - application wide Component#onComponentTag 
listeners - fix imports
e5f9c94 is described below

commit e5f9c94641a14b5291fbc27536853e053aa342a1
Author: Igor Vaynberg 
AuthorDate: Thu Jan 3 16:40:48 2019 -0800

WICKET-6626 - application wide Component#onComponentTag listeners - fix 
imports
---
 .../src/test/java/org/apache/wicket/OnComponentTagListenerTest.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/wicket-core/src/test/java/org/apache/wicket/OnComponentTagListenerTest.java 
b/wicket-core/src/test/java/org/apache/wicket/OnComponentTagListenerTest.java
index 073e143..23af5a2 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/OnComponentTagListenerTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/OnComponentTagListenerTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket;
 
+import static org.junit.Assert.*;
+
 import org.apache.commons.collections4.MultiSet;
 import org.apache.commons.collections4.multiset.HashMultiSet;
 import org.apache.wicket.application.IOnComponentTagListener;



[wicket] branch wicket-8.x updated: WICKET-6626 - application wide Component#onComponentTag listeners

2019-01-03 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-8.x by this push:
 new a3aa2a6  WICKET-6626 - application wide Component#onComponentTag 
listeners
a3aa2a6 is described below

commit a3aa2a6b5a0232757a79d9802f0bf431ec4cee67
Author: Igor Vaynberg 
AuthorDate: Thu Jan 3 16:27:39 2019 -0800

WICKET-6626 - application wide Component#onComponentTag listeners
---
 .../main/java/org/apache/wicket/Application.java   |   9 ++
 .../src/main/java/org/apache/wicket/Component.java |   3 +
 .../application/IOnComponentTagListener.java   |  38 ++
 .../OnComponentTagListenerCollection.java  |  37 ++
 .../apache/wicket/OnComponentTagListenerTest.java  | 128 +
 5 files changed, 215 insertions(+)

diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java 
b/wicket-core/src/main/java/org/apache/wicket/Application.java
index 9415afa..5178f3b 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.java
@@ -33,6 +33,7 @@ import 
org.apache.wicket.application.ComponentOnConfigureListenerCollection;
 import org.apache.wicket.application.HeaderContributorListenerCollection;
 import org.apache.wicket.application.IComponentInitializationListener;
 import org.apache.wicket.application.IComponentInstantiationListener;
+import org.apache.wicket.application.OnComponentTagListenerCollection;
 import org.apache.wicket.core.request.mapper.IMapperContext;
 import org.apache.wicket.core.util.lang.PropertyResolver;
 import org.apache.wicket.core.util.lang.WicketObjects;
@@ -887,6 +888,8 @@ public abstract class Application implements 
UnboundListener, IEventSink
 
private final BehaviorInstantiationListenerCollection 
behaviorInstantiationListeners = new BehaviorInstantiationListenerCollection();
 
+   private final OnComponentTagListenerCollection onComponentTagListeners 
= new OnComponentTagListenerCollection();
+
/**
 * @return Gets the application's {@link 
HeaderContributorListenerCollection}
 */
@@ -927,6 +930,12 @@ public abstract class Application implements 
UnboundListener, IEventSink
return behaviorInstantiationListeners;
}
 
+   /**
+* @return collection of application's on-component-tag listeners
+*/
+   public final OnComponentTagListenerCollection 
getOnComponentTagListeners() {
+   return onComponentTagListeners;
+   }
 
/**
 * @return Gets the application's 
ComponentInstantiationListenerCollection
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 4968843..2e1b935 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -2418,6 +2418,9 @@ public abstract class Component
final ComponentTag openTag = markupStream.getTag();
final ComponentTag tag = openTag.mutable();
 
+   // call application-wide tag listeners
+   
getApplication().getOnComponentTagListeners().onComponentTag(this, tag);
+
// Call any tag handler
onComponentTag(tag);
 
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
new file mode 100644
index 000..21be8f7
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
@@ -0,0 +1,38 @@
+/*
+ * 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.application;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.ComponentTag;
+
+/**
+ * Listener interface that receives messages when components render their 
tags. Useful for cross-cutting concerns that
+ * want to output tag attribute or otherwise modify component 

[wicket] branch master updated: WICKET-6626 - application wide Component#onComponentTag listeners

2019-01-03 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
 new efe30a9  WICKET-6626 - application wide Component#onComponentTag 
listeners
efe30a9 is described below

commit efe30a905335cd6d45baace4dd7d80bef5d78000
Author: Igor Vaynberg 
AuthorDate: Thu Jan 3 16:27:39 2019 -0800

WICKET-6626 - application wide Component#onComponentTag listeners
---
 .../main/java/org/apache/wicket/Application.java   |   9 ++
 .../src/main/java/org/apache/wicket/Component.java |   3 +
 .../application/IOnComponentTagListener.java   |  38 ++
 .../OnComponentTagListenerCollection.java  |  37 ++
 .../apache/wicket/OnComponentTagListenerTest.java  | 128 +
 5 files changed, 215 insertions(+)

diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java 
b/wicket-core/src/main/java/org/apache/wicket/Application.java
index 4ba6e05..c97c582 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.java
@@ -33,6 +33,7 @@ import 
org.apache.wicket.application.ComponentOnConfigureListenerCollection;
 import org.apache.wicket.application.HeaderContributorListenerCollection;
 import org.apache.wicket.application.IComponentInitializationListener;
 import org.apache.wicket.application.IComponentInstantiationListener;
+import org.apache.wicket.application.OnComponentTagListenerCollection;
 import org.apache.wicket.core.request.mapper.IMapperContext;
 import org.apache.wicket.core.util.lang.PropertyResolver;
 import org.apache.wicket.core.util.lang.WicketObjects;
@@ -889,6 +890,8 @@ public abstract class Application implements 
UnboundListener, IEventSink, IMetad
 
private final BehaviorInstantiationListenerCollection 
behaviorInstantiationListeners = new BehaviorInstantiationListenerCollection();
 
+   private final OnComponentTagListenerCollection onComponentTagListeners 
= new OnComponentTagListenerCollection();
+
/**
 * @return Gets the application's {@link 
HeaderContributorListenerCollection}
 */
@@ -929,6 +932,12 @@ public abstract class Application implements 
UnboundListener, IEventSink, IMetad
return behaviorInstantiationListeners;
}
 
+   /**
+* @return collection of application's on-component-tag listeners
+*/
+   public final OnComponentTagListenerCollection 
getOnComponentTagListeners() {
+   return onComponentTagListeners;
+   }
 
/**
 * @return Gets the application's 
ComponentInstantiationListenerCollection
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 0a90016..9c191a8 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -2420,6 +2420,9 @@ public abstract class Component
final ComponentTag openTag = markupStream.getTag();
final ComponentTag tag = openTag.mutable();
 
+   // call application-wide tag listeners
+   
getApplication().getOnComponentTagListeners().onComponentTag(this, tag);
+
// Call any tag handler
onComponentTag(tag);
 
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
new file mode 100644
index 000..21be8f7
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
@@ -0,0 +1,38 @@
+/*
+ * 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.application;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.ComponentTag;
+
+/**
+ * Listener interface that receives messages when components render their 
tags. Useful for cross-cutting concerns that
+ * want to output tag attribute or otherwise modify c

[wicket] branch wicket-7.x updated: WICKET-6626 - application wide Component#onComponentTag listeners

2019-01-03 Thread ivaynberg
This is an automated email from the ASF dual-hosted git repository.

ivaynberg pushed a commit to branch wicket-7.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-7.x by this push:
 new fdd8517  WICKET-6626 - application wide Component#onComponentTag 
listeners
fdd8517 is described below

commit fdd8517bacc9145e9ec7299245afc3d81794e9db
Author: Igor Vaynberg 
AuthorDate: Thu Jan 3 16:27:39 2019 -0800

WICKET-6626 - application wide Component#onComponentTag listeners
---
 .../main/java/org/apache/wicket/Application.java   |   9 ++
 .../src/main/java/org/apache/wicket/Component.java |   3 +
 .../application/IOnComponentTagListener.java   |  38 ++
 .../OnComponentTagListenerCollection.java  |  42 +++
 .../apache/wicket/OnComponentTagListenerTest.java  | 128 +
 5 files changed, 220 insertions(+)

diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java 
b/wicket-core/src/main/java/org/apache/wicket/Application.java
index 22a9971..7502679 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.java
@@ -43,6 +43,7 @@ import 
org.apache.wicket.application.ComponentOnConfigureListenerCollection;
 import org.apache.wicket.application.HeaderContributorListenerCollection;
 import org.apache.wicket.application.IComponentInitializationListener;
 import org.apache.wicket.application.IComponentInstantiationListener;
+import org.apache.wicket.application.OnComponentTagListenerCollection;
 import org.apache.wicket.core.request.mapper.IMapperContext;
 import org.apache.wicket.core.util.lang.PropertyResolver;
 import org.apache.wicket.core.util.lang.WicketObjects;
@@ -1058,6 +1059,8 @@ public abstract class Application implements 
UnboundListener, IEventSink
 
private final BehaviorInstantiationListenerCollection 
behaviorInstantiationListeners = new BehaviorInstantiationListenerCollection();
 
+   private final OnComponentTagListenerCollection onComponentTagListeners 
= new OnComponentTagListenerCollection();
+
/**
 * @return Gets the application's {@link 
HeaderContributorListenerCollection}
 */
@@ -1098,6 +1101,12 @@ public abstract class Application implements 
UnboundListener, IEventSink
return behaviorInstantiationListeners;
}
 
+   /**
+* @return collection of application's on-component-tag listeners
+*/
+   public final OnComponentTagListenerCollection 
getOnComponentTagListeners() {
+   return onComponentTagListeners;
+   }
 
/**
 * @return Gets the application's 
ComponentInstantiationListenerCollection
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 368941a..3a4d0dc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -2540,6 +2540,9 @@ public abstract class Component
final ComponentTag openTag = markupStream.getTag();
final ComponentTag tag = openTag.mutable();
 
+   // call application-wide tag listeners
+   
getApplication().getOnComponentTagListeners().onComponentTag(this, tag);
+
// Call any tag handler
onComponentTag(tag);
 
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
new file mode 100644
index 000..21be8f7
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/IOnComponentTagListener.java
@@ -0,0 +1,38 @@
+/*
+ * 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.application;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.ComponentTag;
+
+/**
+ * Listener interface that receives messages when components render their 
tags. Useful for cross-cutting concerns that
+ * want to output tag attribute or otherwise modify c

wicket git commit: WICKET-6623 correctly remove consecutive temporary behaviors - test fix

2018-12-13 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master ad39487fa -> 7544d4d31


WICKET-6623 correctly remove consecutive temporary behaviors - test fix


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7544d4d3
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7544d4d3
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7544d4d3

Branch: refs/heads/master
Commit: 7544d4d3113daad60a1aa3e2d9add171305c8494
Parents: ad39487
Author: Igor Vaynberg 
Authored: Thu Dec 13 11:14:23 2018 -0800
Committer: Igor Vaynberg 
Committed: Thu Dec 13 11:14:23 2018 -0800

--
 .../src/test/java/org/apache/wicket/behavior/BehaviorTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7544d4d3/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java 
b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
index ba77c4d..db5f658 100644
--- a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.wicket.behavior;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.*;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.MockPageWithOneComponent;



wicket git commit: WICKET-6623 correctly remove consecutive temporary behaviors

2018-12-11 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 8e678fd26 -> d7a00f557


WICKET-6623 correctly remove consecutive temporary behaviors


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d7a00f55
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d7a00f55
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d7a00f55

Branch: refs/heads/wicket-7.x
Commit: d7a00f557cd576ba3cf0f1e9e2c26911bc9bb5b9
Parents: 8e678fd
Author: Igor Vaynberg 
Authored: Tue Dec 11 15:36:54 2018 -0800
Committer: Igor Vaynberg 
Committed: Tue Dec 11 15:50:40 2018 -0800

--
 .../main/java/org/apache/wicket/Behaviors.java  |  4 +-
 .../apache/wicket/behavior/BehaviorTest.java| 66 
 2 files changed, 69 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/d7a00f55/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java 
b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
index 3d406f2..672cc57 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
@@ -126,7 +126,7 @@ final class Behaviors implements IDetachable
@Override
public final void detach()
{
-   final int len = component.data_length();
+   int len = component.data_length();
for (int i = component.data_start(); i < len; i++)
{
Object obj = component.data_get(i);
@@ -139,6 +139,8 @@ final class Behaviors implements IDetachable
if (behavior.isTemporary(component))
{
internalRemove(behavior);
+   i--;
+   len--;
}
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/d7a00f55/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java 
b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
new file mode 100644
index 000..37862f7
--- /dev/null
+++ b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.behavior;
+
+import static org.hamcrest.Matchers.*;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.MockPageWithOneComponent;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.util.tester.TagTester;
+import org.apache.wicket.util.tester.WicketTestCase;
+import org.junit.Test;
+
+/**
+ * Tests for {@link Behavior}
+ */
+public class BehaviorTest extends WicketTestCase
+{
+
+   @Test
+   public void temporaryBehaviorsAreRemoved() {
+   WebMarkupContainer container = new WebMarkupContainer("test");
+   TestTemporaryBehavior temp = new TestTemporaryBehavior();
+   container.add(temp);
+   assertTrue(container.getBehaviors().contains(temp));
+   container.detach();
+   assertFalse(container.getBehaviors().contains(temp));
+   }
+
+   @Test
+   public void consecutiveTemporaryBehaviorsAreRemoved() {
+   WebMarkupContainer container = new WebMarkupContainer("test");
+   TestTemporaryBehavior temp1 = new TestTemporaryBehavior();
+   TestTemporaryBehavior temp2 = new TestTemporaryBehavior();
+   container.add(temp1, temp2);
+   assertTrue(container.getBehaviors().contains(temp1));
+   assertTrue(container.getBehaviors().contains(temp2));
+   container.detach();
+

wicket git commit: WICKET-6623 correctly remove consecutive temporary behaviors

2018-12-11 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master 77e928ecd -> ad39487fa


WICKET-6623 correctly remove consecutive temporary behaviors


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ad39487f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ad39487f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ad39487f

Branch: refs/heads/master
Commit: ad39487faa573144deee6da3e6e6f9dd73d382c1
Parents: 77e928e
Author: Igor Vaynberg 
Authored: Tue Dec 11 15:36:54 2018 -0800
Committer: Igor Vaynberg 
Committed: Tue Dec 11 15:40:48 2018 -0800

--
 .../main/java/org/apache/wicket/Behaviors.java  |  4 ++-
 .../apache/wicket/behavior/BehaviorTest.java| 34 
 2 files changed, 37 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ad39487f/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java 
b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
index 3d406f2..672cc57 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
@@ -126,7 +126,7 @@ final class Behaviors implements IDetachable
@Override
public final void detach()
{
-   final int len = component.data_length();
+   int len = component.data_length();
for (int i = component.data_start(); i < len; i++)
{
Object obj = component.data_get(i);
@@ -139,6 +139,8 @@ final class Behaviors implements IDetachable
if (behavior.isTemporary(component))
{
internalRemove(behavior);
+   i--;
+   len--;
}
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/ad39487f/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java 
b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
index 29f69d4..ba77c4d 100644
--- a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
@@ -18,6 +18,7 @@ package org.apache.wicket.behavior;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.MockPageWithOneComponent;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.util.tester.TagTester;
@@ -64,4 +65,37 @@ class BehaviorTest extends WicketTestCase
TagTester tagTester = 
tester.getTagByWicketId(MockPageWithOneComponent.COMPONENT_ID);
assertEquals(value, tagTester.getAttribute(key));
}
+
+   @Test
+   public void temporaryBehaviorsAreRemoved() {
+   WebMarkupContainer container = new WebMarkupContainer("test");
+   TestTemporaryBehavior temp = new TestTemporaryBehavior();
+   container.add(temp);
+   assertTrue(container.getBehaviors().contains(temp));
+   container.detach();
+   assertFalse(container.getBehaviors().contains(temp));
+   }
+
+   @Test
+   public void consecutiveTemporaryBehaviorsAreRemoved() {
+   WebMarkupContainer container = new WebMarkupContainer("test");
+   TestTemporaryBehavior temp1 = new TestTemporaryBehavior();
+   TestTemporaryBehavior temp2 = new TestTemporaryBehavior();
+   container.add(temp1, temp2);
+   assertTrue(container.getBehaviors().contains(temp1));
+   assertTrue(container.getBehaviors().contains(temp2));
+   container.detach();
+   assertFalse(container.getBehaviors().contains(temp1));
+   assertFalse(container.getBehaviors().contains(temp2));
+   }
+
+   private static class TestTemporaryBehavior extends Behavior {
+   private static final long serialVersionUID = 1L;
+
+   @Override
+   public boolean isTemporary(Component c) {
+   return true;
+   }
+   }
+
 }



wicket git commit: WICKET-6623 correctly remove consecutive temporary behaviors

2018-12-11 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/wicket-8.x 70c19265e -> 567b62417


WICKET-6623 correctly remove consecutive temporary behaviors


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/567b6241
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/567b6241
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/567b6241

Branch: refs/heads/wicket-8.x
Commit: 567b62417ae85ee78051204c784fb0a2411fc414
Parents: 70c1926
Author: Igor Vaynberg 
Authored: Tue Dec 11 15:36:54 2018 -0800
Committer: Igor Vaynberg 
Committed: Tue Dec 11 15:37:15 2018 -0800

--
 .../main/java/org/apache/wicket/Behaviors.java  |  4 ++-
 .../apache/wicket/behavior/BehaviorTest.java| 37 ++--
 2 files changed, 38 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/567b6241/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java 
b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
index 3d406f2..672cc57 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
@@ -126,7 +126,7 @@ final class Behaviors implements IDetachable
@Override
public final void detach()
{
-   final int len = component.data_length();
+   int len = component.data_length();
for (int i = component.data_start(); i < len; i++)
{
Object obj = component.data_get(i);
@@ -139,6 +139,8 @@ final class Behaviors implements IDetachable
if (behavior.isTemporary(component))
{
internalRemove(behavior);
+   i--;
+   len--;
}
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/567b6241/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java 
b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
index ed4f473..93a57ca 100644
--- a/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/behavior/BehaviorTest.java
@@ -16,9 +16,9 @@
  */
 package org.apache.wicket.behavior;
 
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.*;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.MockPageWithOneComponent;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.util.tester.TagTester;
@@ -63,4 +63,37 @@ public class BehaviorTest extends WicketTestCase
TagTester tagTester = 
tester.getTagByWicketId(MockPageWithOneComponent.COMPONENT_ID);
assertThat(tagTester.getAttribute(key), is(equalTo(value)));
}
+
+   @Test
+   public void temporaryBehaviorsAreRemoved() {
+   WebMarkupContainer container = new WebMarkupContainer("test");
+   TestTemporaryBehavior temp = new TestTemporaryBehavior();
+   container.add(temp);
+   assertTrue(container.getBehaviors().contains(temp));
+   container.detach();
+   assertFalse(container.getBehaviors().contains(temp));
+   }
+
+   @Test
+   public void consecutiveTemporaryBehaviorsAreRemoved() {
+   WebMarkupContainer container = new WebMarkupContainer("test");
+   TestTemporaryBehavior temp1 = new TestTemporaryBehavior();
+   TestTemporaryBehavior temp2 = new TestTemporaryBehavior();
+   container.add(temp1, temp2);
+   assertTrue(container.getBehaviors().contains(temp1));
+   assertTrue(container.getBehaviors().contains(temp2));
+   container.detach();
+   assertFalse(container.getBehaviors().contains(temp1));
+   assertFalse(container.getBehaviors().contains(temp2));
+   }
+
+   private static class TestTemporaryBehavior extends Behavior {
+   private static final long serialVersionUID = 1L;
+
+   @Override
+   public boolean isTemporary(Component c) {
+   return true;
+   }
+   }
+
 }



wicket git commit: WICKET-6604 fixed bug where controllers of enclosures were not correctly repainted in ajax if they were outside enclosures

2018-10-30 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master 08f6a531a -> a6d73f46b


WICKET-6604 fixed bug where controllers of enclosures were not correctly 
repainted in ajax if they were outside enclosures


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a6d73f46
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a6d73f46
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a6d73f46

Branch: refs/heads/master
Commit: a6d73f46b30e0846701bc8fdf3039895520eea1d
Parents: 08f6a53
Author: Igor Vaynberg 
Authored: Fri Oct 26 12:11:41 2018 -0700
Committer: Igor Vaynberg 
Committed: Tue Oct 30 08:29:07 2018 -0700

--
 .../protocol/http/AjaxEnclosureListener.java| 13 +++-
 .../html/internal/AjaxEnclosurePage_4.html  | 11 +++
 .../html/internal/AjaxEnclosurePage_4.java  | 75 
 .../markup/html/internal/AjaxEnclosureTest.java |  8 +++
 4 files changed, 105 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a6d73f46/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
index b966580..351d549 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
@@ -82,13 +82,22 @@ public class AjaxEnclosureListener implements 
AjaxRequestTarget.IListener
while (entriesItor.hasNext())
{
Map.Entry entry = 
entriesItor.next();
-   String componentId = entry.getKey();
Component component = entry.getValue();
if (isControllerOfEnclosure(component, 
enclosure))
{
+   final Component controller = 
component;
target.add(enclosure);
visit.dontGoDeeper();
-   keysToRemove.add(componentId);
+   enclosure.visitChildren(new 
IVisitor() {
+   @Override
+   public void 
component(Component descendant, IVisit visit) {
+   if (descendant 
== controller) {
+   // if 
the controlling component is in the enclosure we do not need to repaint it
+   // 
individually, it will be repainted as part of the enclosure repaint
+   
keysToRemove.add(controller.getId());
+   }
+   }
+   });
break;
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/a6d73f46/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
new file mode 100644
index 000..8f54a85
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
@@ -0,0 +1,11 @@
+
+
+
+
+   Name
+   
+   submit
+
+
+
+

http://git-wip-us.apache.org/repos/asf/wicket/blob/a6d73f46/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
new file mode 100644
index 000..bdeb27d
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Founda

wicket git commit: WICKET-6604 fixed bug where controllers of enclosures were not correctly repainted in ajax if they were outside enclosures

2018-10-26 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/wicket-8.x fc8a5ab4d -> ec1549118


WICKET-6604 fixed bug where controllers of enclosures were not correctly 
repainted in ajax if they were outside enclosures


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ec154911
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ec154911
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ec154911

Branch: refs/heads/wicket-8.x
Commit: ec1549118b3c583afdfb3ef45b0e62d870f318b6
Parents: fc8a5ab
Author: Igor Vaynberg 
Authored: Fri Oct 26 12:11:41 2018 -0700
Committer: Igor Vaynberg 
Committed: Fri Oct 26 13:20:29 2018 -0700

--
 .../protocol/http/AjaxEnclosureListener.java| 13 +++-
 .../html/internal/AjaxEnclosurePage_4.html  | 11 +++
 .../html/internal/AjaxEnclosurePage_4.java  | 75 
 .../markup/html/internal/AjaxEnclosureTest.java |  8 +++
 4 files changed, 105 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ec154911/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
index b966580..351d549 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
@@ -82,13 +82,22 @@ public class AjaxEnclosureListener implements 
AjaxRequestTarget.IListener
while (entriesItor.hasNext())
{
Map.Entry entry = 
entriesItor.next();
-   String componentId = entry.getKey();
Component component = entry.getValue();
if (isControllerOfEnclosure(component, 
enclosure))
{
+   final Component controller = 
component;
target.add(enclosure);
visit.dontGoDeeper();
-   keysToRemove.add(componentId);
+   enclosure.visitChildren(new 
IVisitor() {
+   @Override
+   public void 
component(Component descendant, IVisit visit) {
+   if (descendant 
== controller) {
+   // if 
the controlling component is in the enclosure we do not need to repaint it
+   // 
individually, it will be repainted as part of the enclosure repaint
+   
keysToRemove.add(controller.getId());
+   }
+   }
+   });
break;
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/ec154911/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
new file mode 100644
index 000..8f54a85
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
@@ -0,0 +1,11 @@
+
+
+
+
+   Name
+   
+   submit
+
+
+
+

http://git-wip-us.apache.org/repos/asf/wicket/blob/ec154911/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
new file mode 100644
index 000..bdeb27d
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Softwar

wicket git commit: WICKET-6604 fixed bug where controllers of enclosures were not correctly repainted in ajax if they were outside enclosures

2018-10-26 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x b342b64b4 -> 88a521ce8


WICKET-6604 fixed bug where controllers of enclosures were not correctly 
repainted in ajax if they were outside enclosures


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/88a521ce
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/88a521ce
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/88a521ce

Branch: refs/heads/wicket-7.x
Commit: 88a521ce88737719808e362d8a082046406d0cdd
Parents: b342b64
Author: Igor Vaynberg 
Authored: Fri Oct 26 12:11:41 2018 -0700
Committer: Igor Vaynberg 
Committed: Fri Oct 26 12:11:41 2018 -0700

--
 .../protocol/http/AjaxEnclosureListener.java| 13 +++-
 .../html/internal/AjaxEnclosurePage_4.html  | 11 +++
 .../html/internal/AjaxEnclosurePage_4.java  | 75 
 .../markup/html/internal/AjaxEnclosureTest.java |  8 +++
 4 files changed, 105 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/88a521ce/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
index 5e6c0c0..5a9725c 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
@@ -81,13 +81,22 @@ public class AjaxEnclosureListener extends 
AjaxRequestTarget.AbstractListener
while (entriesItor.hasNext())
{
Map.Entry entry = 
entriesItor.next();
-   String componentId = entry.getKey();
Component component = entry.getValue();
if (isControllerOfEnclosure(component, 
enclosure))
{
+   final Component controller = 
component;
target.add(enclosure);
visit.dontGoDeeper();
-   keysToRemove.add(componentId);
+   enclosure.visitChildren(new 
IVisitor() {
+   @Override
+   public void 
component(Component descendant, IVisit visit) {
+   if (descendant 
== controller) {
+   // if 
the controlling component is in the enclosure we do not need to repaint it
+   // 
individually, it will be repainted as part of the enclosure repaint
+   
keysToRemove.add(controller.getId());
+   }
+   }
+   });
break;
}
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/88a521ce/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
new file mode 100644
index 000..8f54a85
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.html
@@ -0,0 +1,11 @@
+
+
+
+
+   Name
+   
+   submit
+
+
+
+

http://git-wip-us.apache.org/repos/asf/wicket/blob/88a521ce/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
new file mode 100644
index 000..637c966
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/internal/AjaxEnclosurePage_4.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Sof

git commit: WICKET-3335 fix remaining test

2014-02-25 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master c2e12216f -> da98a830c


WICKET-3335 fix remaining test


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/da98a830
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/da98a830
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/da98a830

Branch: refs/heads/master
Commit: da98a830ce75b94bd7885a759659d1bd7abcf193
Parents: c2e1221
Author: Igor Vaynberg 
Authored: Tue Feb 25 14:54:50 2014 -0800
Committer: Igor Vaynberg 
Committed: Tue Feb 25 14:54:52 2014 -0800

--
 .../src/main/java/org/apache/wicket/MarkupContainer.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/da98a830/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 914112a..d588112 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -939,11 +939,18 @@ public abstract class MarkupContainer extends Component 
implements Iterable

git commit: WICKET-3335 small cleanup of dequeuing code

2014-02-25 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master 8088d460a -> a8c6daec3


WICKET-3335 small cleanup of dequeuing code


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a8c6daec
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a8c6daec
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a8c6daec

Branch: refs/heads/master
Commit: a8c6daec3cf6241bee5741e1083dfc0db1a3d6a8
Parents: 8088d46
Author: Igor Vaynberg 
Authored: Tue Feb 25 08:20:53 2014 -0800
Committer: Igor Vaynberg 
Committed: Tue Feb 25 09:25:35 2014 -0800

--
 .../html/panel/DequeueMarkupFragment.java   | 23 
 .../wicket/markup/html/panel/Fragment.java  |  2 +-
 2 files changed, 1 insertion(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a8c6daec/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DequeueMarkupFragment.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DequeueMarkupFragment.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DequeueMarkupFragment.java
deleted file mode 100644
index 2239989..000
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DequeueMarkupFragment.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.markup.html.panel;
-
-//TODO queueing Do we need this class ? It is not used at he moment
-public class DequeueMarkupFragment
-{
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/a8c6daec/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
index e915714..25e9b10 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
@@ -136,7 +136,7 @@ public class Fragment extends WebMarkupContainer implements 
IQueueRegion
@Override
public DequeueContext newDequeueContext()
{
-   IMarkupFragment markup = 
newMarkupSourcingStrategy().getMarkup(this, null);
+   IMarkupFragment markup = 
getMarkupSourcingStrategy().getMarkup(this, null);
if (markup == null)
{
return null;



git commit: WICKET-3335 refactor/cleanup component queueing - a clean way to ignore outer tags which is necessary for proper fragment and border support

2014-02-24 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master cc5d56a50 -> 2008dfb70


WICKET-3335 refactor/cleanup component queueing - a clean way to ignore outer 
tags which is necessary for proper fragment and border support


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2008dfb7
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2008dfb7
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2008dfb7

Branch: refs/heads/master
Commit: 2008dfb7044f544d7b112cf4666dfacf42406b89
Parents: cc5d56a
Author: Igor Vaynberg 
Authored: Mon Feb 24 22:28:03 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Feb 24 22:28:03 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  | 90 ++--
 .../org/apache/wicket/DequeueTagAction.java | 11 +++
 .../java/org/apache/wicket/IQueueRegion.java|  8 +-
 .../java/org/apache/wicket/MarkupContainer.java | 59 +++--
 .../wicket/markup/html/border/Border.java   | 59 ++---
 .../html/panel/DequeueMarkupFragment.java   |  6 ++
 .../wicket/markup/html/panel/Fragment.java  | 16 ++--
 .../wicket/queueing/ComponentQueueingTest.java  | 24 +-
 8 files changed, 168 insertions(+), 105 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2008dfb7/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index a5bb925..2717e8c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -34,6 +34,8 @@ public final class DequeueContext
private int index;
private ComponentTag next;
private ArrayListStack tags = new ArrayListStack<>();
+   private final boolean skipFirst;
+   private ComponentTag first;
 
private ArrayListStack containers = new 
ArrayListStack<>();
 
@@ -62,9 +64,10 @@ public final class DequeueContext
}
}

-   public DequeueContext(IMarkupFragment markup, MarkupContainer root)
+   public DequeueContext(IMarkupFragment markup, MarkupContainer root, 
boolean skipFirst)
{
this.markup = markup;
+   this.skipFirst = skipFirst;
containers.push(root);
next=nextTag();
}
@@ -105,6 +108,12 @@ public final class DequeueContext
public ComponentTag takeTag()
{
ComponentTag taken=next;
+
+   if (taken == null)
+   {
+   return null;
+   }
+
if (taken.isOpen() && !taken.hasNoCloseTag())
{
tags.push(taken);
@@ -130,27 +139,89 @@ public final class DequeueContext

private ComponentTag nextTag()
{
+   if (skipFirst && first == null)
+   {
+   for (; index < markup.size(); index++)
+   {
+   MarkupElement element = markup.get(index);
+   if (element instanceof ComponentTag)
+   {
+   first = (ComponentTag)element;
+   index++;
+   break;
+   }
+   }
+   }
+
for (; index < markup.size(); index++)
{
MarkupElement element = markup.get(index);
if (element instanceof ComponentTag)
{
ComponentTag tag = (ComponentTag)element;
-   ComponentTag open = tag.isClose() ? 
tag.getOpenTag() : tag;
-   if (open != null && canDequeueTag(open))
+
+   if (tag.isOpen() || tag.isOpenClose())
{
-   index++;
-   return tag;
+   DequeueTagAction action = 
canDequeueTag(tag);
+   switch (action)
+   {
+   case IGNORE :
+   continue;
+   case DEQUEUE :
+   index++;
+   return tag;
+   case SKIP 

[2/2] git commit: fix typo in method name

2014-02-24 Thread ivaynberg
fix typo in method name


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/cc5d56a5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/cc5d56a5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/cc5d56a5

Branch: refs/heads/master
Commit: cc5d56a504cb6603afacd7f7d37ae971d996e971
Parents: 61b0129
Author: Igor Vaynberg 
Authored: Mon Feb 24 11:09:39 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Feb 24 11:09:39 2014 -0800

--
 wicket-core/src/main/java/org/apache/wicket/markup/WicketTag.java  | 2 +-
 .../wicket/markup/html/panel/FragmentMarkupSourcingStrategy.java   | 2 +-
 .../java/org/apache/wicket/markup/resolver/FragmentResolver.java   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/cc5d56a5/wicket-core/src/main/java/org/apache/wicket/markup/WicketTag.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/WicketTag.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/WicketTag.java
index b609f7b..98b99cd 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/WicketTag.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/WicketTag.java
@@ -159,7 +159,7 @@ public class WicketTag extends ComponentTag
/**
 * @return True if 
 */
-   public final boolean isFragementTag()
+   public final boolean isFragmentTag()
{
return FragmentResolver.FRAGMENT.equalsIgnoreCase(getName());
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/cc5d56a5/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FragmentMarkupSourcingStrategy.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FragmentMarkupSourcingStrategy.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FragmentMarkupSourcingStrategy.java
index 400ea8d..1d82e42 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FragmentMarkupSourcingStrategy.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FragmentMarkupSourcingStrategy.java
@@ -148,7 +148,7 @@ public class FragmentMarkupSourcingStrategy extends 
AbstractMarkupSourcingStrate
else
{
MarkupElement fragmentTag = childMarkup.get(0);
-   if ((fragmentTag instanceof WicketTag && 
((WicketTag)fragmentTag).isFragementTag()) == false)
+   if ((fragmentTag instanceof WicketTag && 
((WicketTag)fragmentTag).isFragmentTag()) == false)
{
throw new MarkupNotFoundException("Markup found 
for Fragment '" + markupId
+ "' in providing markup container " + 
getMarkupProvider(container)

http://git-wip-us.apache.org/repos/asf/wicket/blob/cc5d56a5/wicket-core/src/main/java/org/apache/wicket/markup/resolver/FragmentResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/resolver/FragmentResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/resolver/FragmentResolver.java
index 974fdf8..bd25302 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/resolver/FragmentResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/resolver/FragmentResolver.java
@@ -52,7 +52,7 @@ public class FragmentResolver implements IComponentResolver
final WicketTag wTag = (WicketTag)tag;
 
// If 
-   if (wTag.isFragementTag())
+   if (wTag.isFragmentTag())
{
return new 
WebComponent(wTag.getId()).setVisible(false);
}



[1/2] git commit: WICKET-3335 fragment and wicket:container support

2014-02-24 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master a79ed51e9 -> cc5d56a50


WICKET-3335 fragment and wicket:container support


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/61b01295
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/61b01295
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/61b01295

Branch: refs/heads/master
Commit: 61b01295d0d52929178d058d48456cae4acbc3e7
Parents: a79ed51
Author: Igor Vaynberg 
Authored: Mon Feb 24 11:09:12 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Feb 24 11:09:12 2014 -0800

--
 .../java/org/apache/wicket/MarkupContainer.java |  4 ++
 .../wicket/markup/html/panel/Fragment.java  | 10 +++-
 .../wicket/queueing/ComponentQueueingTest.java  | 53 
 3 files changed, 56 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/61b01295/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 087d655..1aba865 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2169,6 +2169,10 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/61b01295/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
index 078aa44..676cca5 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
@@ -17,8 +17,12 @@
 package org.apache.wicket.markup.html.panel;
 
 import org.apache.wicket.Component;
+import org.apache.wicket.IQueueRegion;
 import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.markup.IMarkupFragment;
+import org.apache.wicket.markup.MarkupElement;
+import org.apache.wicket.markup.MarkupFragment;
+import org.apache.wicket.markup.WicketTag;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.util.lang.Args;
@@ -46,7 +50,7 @@ import org.apache.wicket.util.lang.Args;
  * 
  * @author Juergen Donnerstag
  */
-public class Fragment extends WebMarkupContainer
+public class Fragment extends WebMarkupContainer implements IQueueRegion
 {
private static final long serialVersionUID = 1L;
 
@@ -130,4 +134,8 @@ public class Fragment extends WebMarkupContainer
return associatedMarkupId;
}
 
+   @Override
+   public IMarkupFragment getDequeueMarkup() {
+   return newMarkupSourcingStrategy().getMarkup(this, null);
+   }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/61b01295/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 34f1317..96f0c77 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -33,6 +33,7 @@ import org.apache.wicket.markup.html.internal.Enclosure;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.queueing.nestedborders.InnerBorder;
@@ -205,7 +206,7 @@ public class ComponentQueueingTest extends WicketTestCase
 
/** {@code [a,q[r,s]] - > [a[q[r[s } */
@Test
-   public void dequeueWithPanel1()
+   public void panel1()
{
MarkupContainer a = new A(), r = new R(), s = new S();
 
@@ -225,7 +226,7 @@ public class ComponentQueueingTest extends WicketTestCase
 
/** panel has leading markup */
@Test
-   public void dequeueWithPanel2()
+   public void panel2()
{
MarkupContainer r = new R();
 
@@ -244,7 +245,7 @@ public class ComponentQueueingTest extends WicketTestCase
 
/** panel with a static header section */
  

git commit: WICKET-3335 small cleanup

2014-02-21 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master f0f8a0a44 -> b3e922c76


WICKET-3335 small cleanup


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b3e922c7
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b3e922c7
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b3e922c7

Branch: refs/heads/master
Commit: b3e922c76e6705c46f84dc4d8258ba3906379a4b
Parents: f0f8a0a
Author: Igor Vaynberg 
Authored: Fri Feb 21 07:25:34 2014 -0800
Committer: Igor Vaynberg 
Committed: Fri Feb 21 07:25:57 2014 -0800

--
 .../java/org/apache/wicket/markup/html/border/Border.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b3e922c7/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index c44d60b..a53b780 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -541,7 +541,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
public IMarkupFragment getDequeueMarkup()
{
Border border=findParent(Border.class);
-   IMarkupFragment 
fragment=findParent(Border.class).getMarkup();
+   IMarkupFragment fragment = border.getMarkup();
 
if (fragment == null)
{
@@ -574,8 +574,9 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
 
 
-   /* TODO queueing The comment is not finished
-* (i) is now at the border tag, find the next 
component tag which
+   /*
+* (i) is now at the border tag, find the next 
component tag (the tag that will belong
+* to the first direct child
 */
 
i++;



[24/31] git commit: Fix typos in javadoc

2014-02-20 Thread ivaynberg
Fix typos in javadoc


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/39c7b74f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/39c7b74f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/39c7b74f

Branch: refs/heads/master
Commit: 39c7b74f8eb2e83421c6d5d86ab51ac6e0800575
Parents: acb4360
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 16:13:03 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../src/main/java/org/apache/wicket/IQueueRegion.java   | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/39c7b74f/wicket-core/src/main/java/org/apache/wicket/IQueueRegion.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/IQueueRegion.java 
b/wicket-core/src/main/java/org/apache/wicket/IQueueRegion.java
index beebdda..c0e431a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/IQueueRegion.java
+++ b/wicket-core/src/main/java/org/apache/wicket/IQueueRegion.java
@@ -35,18 +35,18 @@ public interface IQueueRegion
/**
 * Gets the markup that will be used to dequeue components in this 
container. Usually containers
 * will return their associated markup by simply delegating to
-* {@link MarkupContainer#getAssociatedMarkup()}, but compoennts that 
do not render markup in a
+* {@link MarkupContainer#getAssociatedMarkup()}, but components that 
do not render markup in a
 * standard way (such as repeaters and borders) may choose to override 
this method to implement
-* custom behavior for the dequeuing process.
+* custom behavior for the dequeueing process.
 */
public IMarkupFragment getDequeueMarkup();
 
/**
 * Starts component dequeueing on this {@link IQueueRegion}. This is 
the entry point into the
-* dequeuing process, it creates the {@link DequeueContext} and 
delegates the opreation to the
-* {@link #dequeue(DequeueContext)} method which performs the actual 
dequeuing. The context's
-* markup is retrieved using the {@link #getDequeueMarkup()} method 
which allows subclasses to
-* provide dequeueing-specific markup.
+* dequeuing process, it creates the {@link DequeueContext} and 
delegates the operation to the
+* {@link org.apache.wicket.MarkupContainer#dequeue(DequeueContext)} 
method which performs the
+* actual dequeueing. The context's markup is retrieved using the 
{@link #getDequeueMarkup()}
+* method which allows subclasses to provide dequeueing-specific markup.
 */
public void dequeue();
 }



[03/31] git commit: WICKET-3335 Add support for InlineEnclosure

2014-02-20 Thread ivaynberg
WICKET-3335 Add support for InlineEnclosure


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0e115590
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0e115590
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0e115590

Branch: refs/heads/master
Commit: 0e1155909b5ce4eba96f0c55ecdb1312d1e2447a
Parents: 7729de4
Author: Martin Tzvetanov Grigorov 
Authored: Mon Feb 10 14:46:50 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 .../markup/parser/filter/EnclosureHandler.java  |  3 --
 .../parser/filter/InlineEnclosureHandler.java   | 10 +++
 .../wicket/queueing/ComponentQueueingTest.java  | 30 
 3 files changed, 40 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0e115590/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/EnclosureHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/EnclosureHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/EnclosureHandler.java
index 91d53e7..4a47f38 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/EnclosureHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/EnclosureHandler.java
@@ -45,7 +45,6 @@ import org.apache.wicket.markup.resolver.IComponentResolver;
  * enclosure is identified by the 'child' attribute value which must be equal 
to the relative child
  * id path.
  * 
- * @see EnclosureResolver
  * @see Enclosure
  * 
  * @author Juergen Donnerstag
@@ -56,8 +55,6 @@ public final class EnclosureHandler extends 
AbstractMarkupFilter implements ICom
 
private static final IAutoComponentFactory FACTORY = new 
IAutoComponentFactory()
{
-
-
@Override
public Component newComponent(ComponentTag tag)
{

http://git-wip-us.apache.org/repos/asf/wicket/blob/0e115590/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
index 5eb94fc..e3c953a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
@@ -124,6 +124,16 @@ public final class InlineEnclosureHandler extends 
AbstractMarkupFilter
}
 
tag.setAutoComponentTag(true);
+   tag.setAutoComponentFactory(new 
ComponentTag.IAutoComponentFactory()
+   {
+   @Override
+   public Component 
newComponent(ComponentTag tag)
+   {
+   String attributeName = 
getInlineEnclosureAttributeName(null);
+   String childId = 
tag.getAttribute(attributeName);
+   return new 
InlineEnclosure(tag.getId(), childId);
+   }
+   });
tag.setModified(true);
}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/0e115590/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 175a8d6..6a247ff 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -515,6 +515,36 @@ public class ComponentQueueingTest extends WicketTestCase
assertEquals("", tester.getLastResponseAsString());
}
 
+   /**
+* Test InlineEnclosure
+*/
+   @Test
+   public void autos6()
+   {
+   TestPage p = new TestPage();
+   p.setPageMarkup("");
+   A a = new A();
+   B b = new B();
+   p.queue(a, b);
+   tester.startPage(p);
+
+  

[12/31] git commit: WICKET-3335 Add ignored test that uses nested borders

2014-02-20 Thread ivaynberg
WICKET-3335 Add ignored test that uses nested borders

The inner border is never dequeued


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/aa95974d
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/aa95974d
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/aa95974d

Branch: refs/heads/master
Commit: aa95974df295a2d9893c73c0971bab104ec606ae
Parents: d03a62e
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:04:27 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../wicket/queueing/ComponentQueueingTest.java  | 27 
 1 file changed, 27 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/aa95974d/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index ae00303..b0d13d7 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -567,6 +567,33 @@ public class ComponentQueueingTest extends WicketTestCase
assertThat(p, hasPath(new Path(a, border, r, s)));
}
 
+   @Ignore
+   @Test
+   public void dequeueWithNestedBorders()
+   {
+   MarkupContainer a = new A(), b = new B(), c= new C(), d = new 
D(), r = new R();
+
+   TestBorder outerBorder = new TestBorder("outerBorder");
+   outerBorder.setBorderMarkup("" +
+   "");
+
+   TestBorder innerBorder = new TestBorder("innerBorder");
+   innerBorder.setBorderMarkup("" +
+   "");
+   innerBorder.queueToBorder(c, d);
+
+   outerBorder.queueToBorder(r, innerBorder);
+
+   TestPage p = new TestPage();
+   p.setPageMarkup("");
+
+   p.queue(b, outerBorder, a);
+
+   tester.startPage(p);
+
+   assertThat(p, hasPath(new Path(a, outerBorder, r, innerBorder, 
c, d)));
+   }
+
private static class A extends WebMarkupContainer
{
public A()



[07/31] git commit: WICKET-3335 Attempt to add support for Border component

2014-02-20 Thread ivaynberg
WICKET-3335 Attempt to add support for Border component


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ec84bb57
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ec84bb57
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ec84bb57

Branch: refs/heads/master
Commit: ec84bb57fbfadce914a1af79b1c47c3267de5d4b
Parents: d2493d3
Author: Martin Tzvetanov Grigorov 
Authored: Mon Feb 10 16:16:59 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 .../java/org/apache/wicket/MarkupContainer.java | 42 +++---
 .../wicket/markup/html/border/Border.java   | 23 +++-
 .../wicket/queueing/ComponentQueueingTest.java  | 59 +++-
 3 files changed, 112 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ec84bb57/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index ffd5488..b34a6fc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2018,7 +2018,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable tags = new 
ArrayListStack();
-   ArrayListStack containers = new 
ArrayListStack();
-   ArrayListStack repeaters = new 
ArrayListStack();
+   ArrayListStack tags = new ArrayListStack<>();
+   ArrayListStack containers = new 
ArrayListStack<>();
+   ArrayListStack repeaters = new ArrayListStack<>();
 
containers.push(this);
 
@@ -2182,7 +2184,16 @@ public abstract class MarkupContainer extends Component 
implements Iterable tags, 
MarkupContainer parentContainer)
+   {
+   boolean result = false;
+   if (parentContainer instanceof Border && tags.empty() == false)
+   {
+   ComponentTag parentsTag = tags.peek();
+   if (parentsTag instanceof WicketTag && 
((WicketTag)parentsTag).isBorderTag())
+   {
+   result = true;
+   }
+   }
+   return result;
+   }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ec84bb57/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 705c124..3c5b0d7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.markup.html.border;
 
 import org.apache.wicket.Component;
+import org.apache.wicket.IQueueRegion;
 import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.IMarkupFragment;
@@ -132,7 +133,7 @@ import org.apache.wicket.util.lang.Args;
  * @author Jonathan Locke
  * @author Juergen Donnerstag
  */
-public abstract class Border extends WebMarkupContainer implements 
IComponentResolver
+public abstract class Border extends WebMarkupContainer implements 
IComponentResolver, IQueueRegion
 {
private static final long serialVersionUID = 1L;
 
@@ -212,6 +213,13 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
 
@Override
+   public Border queue(Component... components)
+   {
+   getBodyContainer().queue(components);
+   return this;
+   }
+
+   @Override
public Border remove(final Component component)
{
if (component == body)
@@ -263,6 +271,19 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
 
/**
+* Queues children components to the Border itself
+*
+* @param children
+*the children components to queue
+* @return this
+*/
+   public Border queueToBorder(final Component... children)
+   {
+   super.queue(children);
+   return this;
+   }
+
+   /**
 * Removes child from the Border itself
 * 
 * @param child

http://git-wip-us.apache.org/repos/asf/wicket/blob/ec84bb57/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--

[19/31] git commit: WICKET-3335 Test with inner panels (ignored, not working)

2014-02-20 Thread ivaynberg
WICKET-3335 Test with inner panels (ignored, not working)


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/5dfa926e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/5dfa926e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/5dfa926e

Branch: refs/heads/master
Commit: 5dfa926e1c6cc3027c7d0ca469cf9ff3773651c2
Parents: ed80141
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:40:51 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../wicket/queueing/ComponentQueueingTest.java  | 33 
 1 file changed, 33 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/5dfa926e/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 55344a8..0687177 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -260,6 +260,39 @@ public class ComponentQueueingTest extends WicketTestCase
tester.assertContains(""); // contributed by 

}
 
+   /**
+* test with inner panels
+*/
+   @Ignore
+   @Test
+   public void dequeueWithNestedPanels()
+   {
+   MarkupContainer r = new R(), s = new S();
+
+   TestPanel innerPanel = new TestPanel("inner");
+   innerPanel.setPanelMarkup(""
+   + "");
+   innerPanel.queue(s);
+
+   TestPanel outerPanel = new TestPanel("outer");
+   
outerPanel.setPanelMarkup(""
+   + "" +
+   "");
+
+   outerPanel.queue(r, innerPanel);
+
+   TestPage p = new TestPage();
+   p.setPageMarkup("");
+   p.queue(outerPanel);
+
+   tester.startPage(p);
+
+   assertThat(p, hasPath(new Path(outerPanel, r)));
+   assertThat(p, hasPath(new Path(outerPanel, innerPanel, s)));
+   tester.assertContains(""); // contributed by 
 in outer
+   tester.assertContains(""); // contributed by 
 in inner
+   }
+
@Test
public void dequeueWithRepeater1()
{



[26/31] git commit: Formatting and typo fixes. No functional changes

2014-02-20 Thread ivaynberg
Formatting and typo fixes. No functional changes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/abb316ce
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/abb316ce
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/abb316ce

Branch: refs/heads/master
Commit: abb316cea0a31edea61a25ea4c192507d5c7b390
Parents: 39c7b74
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 16:19:54 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../java/org/apache/wicket/MarkupContainer.java   | 12 ++--
 .../apache/wicket/markup/html/border/Border.java  |  9 -
 .../wicket/markup/repeater/AbstractRepeater.java  | 18 +++---
 3 files changed, 21 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/abb316ce/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 3deb5ce..f6f0255 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -1976,7 +1976,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/abb316ce/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 2d03277..057553c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -627,19 +627,18 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
return null;
}
}
-   
-   
+
@Override
protected boolean canDequeueTag(ComponentTag tag)
{
-   if ((tag instanceof WicketTag)&&((WicketTag)tag).isBodyTag())
+   if ((tag instanceof WicketTag) && ((WicketTag)tag).isBodyTag())
{
return true;
}
 
return super.canDequeueTag(tag);
}
-   
+
@Override
public Component findComponentToDequeue(ComponentTag tag)
{
@@ -649,7 +648,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
return super.findComponentToDequeue(tag);
}
-   
+
@Override
protected void addDequeuedComponent(Component component, ComponentTag 
tag)
{

http://git-wip-us.apache.org/repos/asf/wicket/blob/abb316ce/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
index 2b1a4bb..7b7bb4e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
@@ -155,18 +155,22 @@ public abstract class AbstractRepeater extends 
WebMarkupContainer
protected abstract void onPopulate();

@Override
-   public void dequeue(DequeueContext dequeue) {
-   if (size()>0) {
+   public void dequeue(DequeueContext dequeue)
+   {
+   if (size() > 0)
+   {
// essentially what we do is for every child replace 
the repeater with the child in
// dequeue container stack and run the dequeue on the 
child. we also take care to reset
// the state of the dequeue context after we process 
every child.
 
-   Bookmark bookmark=dequeue.save();
-   
-   for (Component child:this) {
-   if (child instanceof MarkupContainer) {
+   Bookmark bookmark = dequeue.save();
+
+   for (Component child : this)
+   {
+   if (child instanceof MarkupContainer)
+   {
dequeue.popContainer(); // pop the 
repeater
-   MarkupContainer 
containe

[23/31] git commit: Reformat the code to follow Wicket rules. No functional changes

2014-02-20 Thread ivaynberg
Reformat the code to follow Wicket rules. No functional changes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fb4586f1
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fb4586f1
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fb4586f1

Branch: refs/heads/master
Commit: fb4586f11a414cb8cab7ed3e0f5b1aff89477728
Parents: d3ff431
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 14:59:19 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../wicket/markup/html/border/Border.java   | 77 
 1 file changed, 46 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fb4586f1/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 39e0576..be6dfc1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -548,67 +548,82 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
 * tag that the border is attached to (usually the 
first tag)
 */
 
-   int i=0;
-   while (i=fragment.size()) {
-   throw new IllegalStateException("Could not find 
starting border tag for border: "+border.getId()+" in markup: "+fragment);
+   if (i >= fragment.size())
+   {
+   throw new IllegalStateException("Could not find 
starting border tag for border: "
+   + border.getId() + " in markup: 
" + fragment);
}
 
-   
+
/*
-*  (i) is now at the border tag, find the next 
component tag which 
+* (i) is now at the border tag, find the next 
component tag which
 */
 
i++;
-   while (i

[01/31] git commit: WICKET-3335 Fix javadoc for a test

2014-02-20 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/master a09ae7699 -> 723d7d3c9


WICKET-3335 Fix javadoc for a test


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d03a62e8
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d03a62e8
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d03a62e8

Branch: refs/heads/master
Commit: d03a62e88fed0a160615481c5c101f885570cde0
Parents: 156dea5
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:04:06 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 .../java/org/apache/wicket/queueing/ComponentQueueingTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/d03a62e8/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 728f210..ae00303 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -138,9 +138,9 @@ public class ComponentQueueingTest extends WicketTestCase
assertThat(p, hasPath(new Path(a, c)));
}
 
-   /** {@code [a,b,c] -> [a[b,c]] }
-* TODO WICKET-3335 Fix the javadoc above
-* */
+   /**
+* {a[b{e}[d,f{g}]],c} -> [a[b[c,d[e],f[g
+*/
@Test
public void dequeue7()
{



[27/31] git commit: Formatting. Generics. Remove unused constructors in the tests.

2014-02-20 Thread ivaynberg
Formatting. Generics. Remove unused constructors in the tests.

Non functional changes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/acb4360a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/acb4360a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/acb4360a

Branch: refs/heads/master
Commit: acb4360abb8398d39f36f6f94b1711a98f072fbc
Parents: b265829
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 15:23:55 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  |  8 +++---
 .../java/org/apache/wicket/MarkupContainer.java | 13 ++---
 .../ComponentQueueingPerformanceTest.java   | 28 ++--
 .../wicket/queueing/ComponentQueueingTest.java  | 15 +--
 4 files changed, 28 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/acb4360a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index c13b0f2..99c102d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -40,8 +40,8 @@ public final class DequeueContext
{
parser.index = index;
parser.next = next;
-   parser.tags = new ArrayListStack(tags);
-   parser.containers = new 
ArrayListStack(containers);
+   parser.tags = new ArrayListStack<>(tags);
+   parser.containers = new ArrayListStack<>(containers);
}
}

@@ -87,9 +87,9 @@ public final class DequeueContext
 */
public ComponentTag popTag()
{
-   ComponentTag taken=next;
+   ComponentTag taken = next;
tags.push(taken);
-   next=nextTag();
+   next = nextTag();
return taken;
}


http://git-wip-us.apache.org/repos/asf/wicket/blob/acb4360a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 7c69ae1..3deb5ce 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2147,13 +2147,17 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/acb4360a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingPerformanceTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingPerformanceTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingPerformanceTest.java
index a3ee3d6..59ed56a0 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingPerformanceTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingPerformanceTest.java
@@ -48,8 +48,14 @@ public class ComponentQueueingPerformanceTest extends 
WicketTestCase
private void run(Class pageClass)
{
WicketTester tester = new WicketTester(new MockApplication());
-   tester.startPage(pageClass);
-   tester.destroy();
+   try
+   {
+   tester.startPage(pageClass);
+   }
+   finally
+   {
+   tester.destroy();
+   }
}
 
@Test
@@ -287,9 +293,9 @@ public class ComponentQueueingPerformanceTest extends 
WicketTestCase
IModel model = item.getModel();
item.add(new Label("first", new 
PropertyModel(model, "first")));
item.add(new Label("last", new 
PropertyModel(model, "first")));
-   item.add(new AddAddressPanel("addr", 
new PropertyModel(model, "address")));
-   item.add(new AddPhonePanel("work", new 
PropertyModel(model, "work")));
-   item.add(new AddPhonePanel("cell", new 
PropertyModel(model, "cell")));
+   item.add(new AddAddressPanel("addr", 
new PropertyModel(mod

[29/31] git commit: Whitespace police. Non functional changes

2014-02-20 Thread ivaynberg
Whitespace police. Non functional changes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/28a16378
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/28a16378
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/28a16378

Branch: refs/heads/master
Commit: 28a1637874300d3d8feefecffdb9e8565e3171e9
Parents: fd7ab84
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 14:48:25 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../src/main/java/org/apache/wicket/MarkupContainer.java  | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/28a16378/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 3fe7c98..c5d6add 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2079,12 +2079,9 @@ public abstract class MarkupContainer extends Component 
implements Iterable

[14/31] git commit: WICKET-3335 nested borders working. everything should be working. needs more cleanup and javadoc

2014-02-20 Thread ivaynberg
WICKET-3335 nested borders working. everything should be working. needs more 
cleanup and javadoc


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2e57d8db
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2e57d8db
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2e57d8db

Branch: refs/heads/master
Commit: 2e57d8db33b9413f1396dbd4389904cf7e7f
Parents: b9ddb88
Author: Igor Vaynberg 
Authored: Sat Feb 15 00:40:48 2014 -0800
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  |   5 +-
 .../java/org/apache/wicket/MarkupContainer.java |  11 +-
 .../wicket/markup/html/border/Border.java   | 102 ++-
 .../wicket/queueing/ComponentQueueingTest.java  |  24 ++---
 .../org/apache/wicket/queueing/HasPath.java |   7 +-
 .../queueing/nestedborders/OuterBorder.html |   2 +-
 6 files changed, 128 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2e57d8db/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index 8324161..4e62c3e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -1,13 +1,14 @@
 package org.apache.wicket;
 
 import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.IMarkupFragment;
 import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.util.collections.ArrayListStack;
 
 public class DequeueContext
 {
-   private final Markup markup;
+   private final IMarkupFragment markup;
private int index;
private ComponentTag next;
private ArrayListStack tags = new ArrayListStack<>();
@@ -37,7 +38,7 @@ public class DequeueContext
}
}

-   public DequeueContext(Markup markup, MarkupContainer root)
+   public DequeueContext(IMarkupFragment markup, MarkupContainer root)
{
this.markup = markup;
containers.push(root);

http://git-wip-us.apache.org/repos/asf/wicket/blob/2e57d8db/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 72f7cc9..e213f35 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2080,7 +2080,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/2e57d8db/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 3c5b0d7..54fa141 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -26,6 +26,7 @@ import org.apache.wicket.markup.MarkupException;
 import org.apache.wicket.markup.MarkupFragment;
 import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.markup.TagUtils;
+import org.apache.wicket.markup.WicketTag;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy;
 import org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy;
@@ -162,7 +163,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
super(id, model);
 
body = new BorderBodyContainer(id + "_" + BODY);
-   addToBorder(body);
+   queueToBorder(body);
}
 
/**
@@ -398,7 +399,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
/**
 * The container to be associated with the  tag
 */
-   public class BorderBodyContainer extends WebMarkupContainer
+   public class BorderBodyContainer extends WebMarkupContainer implements 
IQueueRegion
{
private static final long serialVersionUID = 1L;
 
@@ -535,5 +536,102 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
 
   

[22/31] git commit: dequeue docs

2014-02-20 Thread ivaynberg
dequeue docs


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fd7ab849
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fd7ab849
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fd7ab849

Branch: refs/heads/master
Commit: fd7ab849202144b183c3cbd69c81b7e4e433be99
Parents: 2e57d8d
Author: Igor Vaynberg 
Authored: Sat Feb 15 21:56:18 2014 -0800
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  |  68 ++-
 .../java/org/apache/wicket/IQueueRegion.java|  22 ++-
 .../java/org/apache/wicket/MarkupContainer.java | 190 ++-
 .../wicket/markup/html/border/Border.java   |   8 +-
 .../markup/repeater/AbstractRepeater.java   |   4 +
 5 files changed, 188 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fd7ab849/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index 4e62c3e..c13b0f2 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -2,19 +2,26 @@ package org.apache.wicket;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.IMarkupFragment;
-import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.util.collections.ArrayListStack;
 
-public class DequeueContext
+/**
+ * Context for component dequeueing. Keeps track of markup position and 
container stack.
+ * 
+ * @author igor
+ *
+ */
+public final class DequeueContext
 {
private final IMarkupFragment markup;
private int index;
private ComponentTag next;
private ArrayListStack tags = new ArrayListStack<>();
+
private ArrayListStack containers = new 
ArrayListStack<>();
 
-   public static class Bookmark
+   /** A bookmark for the DequeueContext stack */
+   public static final class Bookmark
{
private final int index;
private final ComponentTag next;
@@ -45,21 +52,39 @@ public class DequeueContext
next=nextTag();
}

+   /**
+* Saves the state of the context into a bookmark which can later be 
used to restore it.
+*/
public Bookmark save()
{
return new Bookmark(this);
}
 
+   /**
+* Restores the state of the context from the bookmark
+* 
+* @param bookmark
+*/
public void restore(Bookmark bookmark)
{
bookmark.restore(this);
}
 
+   /**
+* Peeks markup tag that would be retrieved by call to {@link #popTag()}
+* 
+* @return
+*/
public ComponentTag peekTag()
{
return next;
}

+   /**
+* Retrieves the next markup tag
+* 
+* @return
+*/
public ComponentTag popTag()
{
ComponentTag taken=next;
@@ -68,6 +93,9 @@ public class DequeueContext
return taken;
}

+   /**
+* Skips to the closing tag of the tag retrieved from last call to 
{@link #popTag()}
+*/
public void skipToCloseTag()
{
if (tags.peek().isOpen())
@@ -89,7 +117,7 @@ public class DequeueContext
{
ComponentTag tag = (ComponentTag)element;
ComponentTag open = tag.isClose() ? 
tag.getOpenTag() : tag;
-   if (canDequeue(open))
+   if (canDequeueTag(open))
{
index++;
return tag;
@@ -99,7 +127,7 @@ public class DequeueContext
return null;
}

-   private boolean canDequeue(ComponentTag open)
+   private boolean canDequeueTag(ComponentTag open)
{
if (containers.size() < 1)
{
@@ -108,7 +136,7 @@ public class DequeueContext
}
for (int i = containers.size() - 1; i >= 0; i--)
{
-   if (containers.get(i).supportsDequeueingFrom((open)))
+   if (containers.get(i).canDequeueTag((open)))
{
return true;
}
@@ -116,27 +144,53 @@ public class DequeueContext
return false;
 

[30/31] git commit: Add @Override

2014-02-20 Thread ivaynberg
Add @Override


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b0dea0e6
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b0dea0e6
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b0dea0e6

Branch: refs/heads/master
Commit: b0dea0e69965dfcbc4b8a6a786c7c6bee06c36a3
Parents: 456e74f
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 14:49:03 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../main/java/org/apache/wicket/markup/html/border/Border.java| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b0dea0e6/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index e916d18..fb146a7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -536,7 +536,8 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
 
return markup.find(child.getId());
}
-   
+
+   @Override
public IMarkupFragment getDequeueMarkup()
{
Border border=findParent(Border.class);



[08/31] git commit: WICKET-3335 Print the component queue when non-empty in IQueueRegion#onDetach()

2014-02-20 Thread ivaynberg
WICKET-3335 Print the component queue when non-empty in IQueueRegion#onDetach()


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d2493d38
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d2493d38
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d2493d38

Branch: refs/heads/master
Commit: d2493d38869387c6156d312e1b788efc0ced5850
Parents: 9b3cb1a
Author: Martin Tzvetanov Grigorov 
Authored: Mon Feb 10 15:17:13 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 .../src/main/java/org/apache/wicket/ComponentQueue.java | 9 +
 .../src/main/java/org/apache/wicket/MarkupContainer.java| 6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/d2493d38/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java 
b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java
index 758970b..661736c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java
@@ -144,4 +144,13 @@ class ComponentQueue
}
return null;
}
+
+   @Override
+   public String toString()
+   {
+   return "ComponentQueue{" +
+   "queueSize=" + queueSize +
+   ", queue=" + Arrays.toString(queue) +
+   '}';
+   }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/d2493d38/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 19b72aa..ffd5488 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2009,9 +2009,9 @@ public abstract class MarkupContainer extends Component 
implements Iterable

[25/31] git commit: Code formating and adding TODOs. No functional changes

2014-02-20 Thread ivaynberg
Code formating and adding TODOs. No functional changes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b265829c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b265829c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b265829c

Branch: refs/heads/master
Commit: b265829c9ef1de0e1840567c95bb3fca9a962fcf
Parents: fb4586f
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 15:06:38 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../wicket/markup/html/border/Border.java   | 24 
 1 file changed, 14 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b265829c/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index be6dfc1..2d03277 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -551,6 +551,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
int i = 0;
while (i < fragment.size())
{
+   // TODO queueing Use 
fragment.find(border.getId()); instead ?!
MarkupElement element = fragment.get(i);
if (element instanceof ComponentTag
&& 
((ComponentTag)element).getId().equals(border.getId()))
@@ -567,7 +568,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
 
 
-   /*
+   /* TODO queueing The comment is not finished
 * (i) is now at the border tag, find the next 
component tag which
 */
 
@@ -590,8 +591,6 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
 
return new MarkupFragment(fragment, i);
-
-
}
 
@Override
@@ -600,7 +599,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
/*
 * the body container is allowed to search for queued 
components all
 * the way to the page even though it is an 
IQueueRegion so it can
-* find components queueud below the border
+* find components queued below the border
 */
 
Component component = super.findComponentToDequeue(tag);
@@ -619,7 +618,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}
if (cursor instanceof BorderBodyContainer)
{
-   // optimization - find call above 
wouldve already recursed
+   // optimization - find call above 
would've already recursed
// to page
break;
}
@@ -631,8 +630,10 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes


@Override
-   protected boolean canDequeueTag(ComponentTag tag) {
-   if ((tag instanceof WicketTag)&&((WicketTag)tag).isBodyTag()) {
+   protected boolean canDequeueTag(ComponentTag tag)
+   {
+   if ((tag instanceof WicketTag)&&((WicketTag)tag).isBodyTag())
+   {
return true;
}
 
@@ -640,15 +641,18 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
}

@Override
-   public Component findComponentToDequeue(ComponentTag tag) {
-   if ((tag instanceof WicketTag)&&((WicketTag)tag).isBodyTag()) {
+   public Component findComponentToDequeue(ComponentTag tag)
+   {
+   if ((tag instanceof WicketTag) && ((WicketTag)tag).isBodyTag())
+   {
return getBodyContainer();
}
return super.findComponentToDequeue(tag);
}

@Override
-   protected void addDequeuedComponent(Component component, ComponentTag 
tag) {
+   protected void addDequeuedComponent(Component component, ComponentTag 
tag)
+   {
   

[20/31] git commit: WICKET-3335 Try to make the nested borders test working (no success)

2014-02-20 Thread ivaynberg
WICKET-3335 Try to make the nested borders test working (no success)


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ed80141a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ed80141a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ed80141a

Branch: refs/heads/master
Commit: ed80141a9afa5e19fbd2704e0abd6e1963ff555b
Parents: 612f6fb
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:32:43 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../org/apache/wicket/markup/html/border/Border.java|  2 +-
 .../apache/wicket/queueing/ComponentQueueingTest.java   | 12 
 2 files changed, 9 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ed80141a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 3c5b0d7..b3e1296 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -398,7 +398,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
/**
 * The container to be associated with the  tag
 */
-   public class BorderBodyContainer extends WebMarkupContainer
+   public class BorderBodyContainer extends WebMarkupContainer implements 
IQueueRegion
{
private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/ed80141a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index b0d13d7..55344a8 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -565,25 +565,28 @@ public class ComponentQueueingTest extends WicketTestCase
tester.startPage(p);
 
assertThat(p, hasPath(new Path(a, border, r, s)));
+   assertThat(p, hasPath(new Path(a, border, 
border.getBodyContainer(), b)));
}
 
@Ignore
@Test
public void dequeueWithNestedBorders()
{
-   MarkupContainer a = new A(), b = new B(), c= new C(), d = new 
D(), r = new R();
+   MarkupContainer a = new A(), b = new B(), c= new C(), d = new 
D(), r = new R(), s = new S();
 
TestBorder outerBorder = new TestBorder("outerBorder");
outerBorder.setBorderMarkup("" +
-   "");
+   "");
 
TestBorder innerBorder = new TestBorder("innerBorder");
innerBorder.setBorderMarkup("" +
"");
-   innerBorder.queueToBorder(c, d);
 
outerBorder.queueToBorder(r, innerBorder);
 
+   innerBorder.queueToBorder(c, d);
+   outerBorder.queue(s);
+
TestPage p = new TestPage();
p.setPageMarkup("");
 
@@ -591,7 +594,8 @@ public class ComponentQueueingTest extends WicketTestCase
 
tester.startPage(p);
 
-   assertThat(p, hasPath(new Path(a, outerBorder, r, innerBorder, 
c, d)));
+   assertThat(p, hasPath(new Path(a, outerBorder, r, innerBorder, 
s)));
+   assertThat(p, hasPath(new Path(a, outerBorder, r, innerBorder, 
innerBorder.getBodyContainer(), c, d)));
}
 
private static class A extends WebMarkupContainer



[10/31] git commit: Add licence headers

2014-02-20 Thread ivaynberg
Add licence headers


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a51ed318
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a51ed318
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a51ed318

Branch: refs/heads/master
Commit: a51ed3185803a52798a99a2685593bae894d0504
Parents: 58f6700
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 16:23:56 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../wicket/queueing/nestedborders/InnerBorder.java  | 16 
 .../wicket/queueing/nestedborders/OuterBorder.java  | 16 
 .../wicket/queueing/nestedpanels/InnerPanel.java| 16 
 .../wicket/queueing/nestedpanels/OuterPanel.java| 16 
 4 files changed, 64 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a51ed318/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/InnerBorder.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/InnerBorder.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/InnerBorder.java
index f4790c4..d92f869 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/InnerBorder.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/InnerBorder.java
@@ -1,3 +1,19 @@
+/*
+ * 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.queueing.nestedborders;
 
 import org.apache.wicket.markup.html.border.Border;

http://git-wip-us.apache.org/repos/asf/wicket/blob/a51ed318/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/OuterBorder.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/OuterBorder.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/OuterBorder.java
index c74859d..5ca5725 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/OuterBorder.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/nestedborders/OuterBorder.java
@@ -1,3 +1,19 @@
+/*
+ * 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.queueing.nestedborders;
 
 import org.apache.wicket.markup.html.border.Border;

http://git-wip-us.apache.org/repos/asf/wicket/blob/a51ed318/wicket-core/src/test/java/org/apache/wicket/queueing/nestedpanels/InnerPanel.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/nestedpanels/InnerPanel.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/nestedpanels/InnerPanel.java
index 2416eaf..e1ecb04 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/nestedpanels/InnerPanel.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/nestedpanels/InnerPanel.java
@@ -1,3 +1,19 @@
+/*
+ * 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 t

[02/31] git commit: WICKET-3335 Add support for queueing Border component

2014-02-20 Thread ivaynberg
WICKET-3335 Add support for queueing Border component


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/156dea5b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/156dea5b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/156dea5b

Branch: refs/heads/master
Commit: 156dea5b3479805eec964b905847ce8e177cd560
Parents: ec84bb5
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 14:38:04 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 .../java/org/apache/wicket/MarkupContainer.java   | 18 +++---
 .../wicket/queueing/ComponentQueueingTest.java|  1 -
 2 files changed, 15 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/156dea5b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index b34a6fc..4344cbf 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2129,7 +2129,19 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/156dea5b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index c96ea7b..728f210 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -547,7 +547,6 @@ public class ComponentQueueingTest extends WicketTestCase
assertEquals("", tester.getLastResponseAsString());
}
 
-   @Ignore
@Test
public void dequeueWithBorder1()
{



[21/31] git commit: Don't traverse the parents twice

2014-02-20 Thread ivaynberg
Don't traverse the parents twice


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d3ff4310
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d3ff4310
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d3ff4310

Branch: refs/heads/master
Commit: d3ff431050a1fdb37097a75b55137d85fb8d68ce
Parents: b0dea0e
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 14:57:28 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 .../main/java/org/apache/wicket/markup/html/border/Border.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/d3ff4310/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index fb146a7..39e0576 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -540,8 +540,8 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
@Override
public IMarkupFragment getDequeueMarkup()
{
-   Border border=findParent(Border.class);
-   IMarkupFragment 
fragment=findParent(Border.class).getMarkup();
+   Border border = findParent(Border.class);
+   IMarkupFragment fragment = border.getMarkup();
/*
 * we want to get the contents of the border here (the 
markup that
 * is represented by the body tag) to do this we need 
to strip the



[13/31] git commit: WICKET-3335 break up and refactor monolithing dequeuing process into delegatable chunks. all working but borders

2014-02-20 Thread ivaynberg
WICKET-3335 break up and refactor monolithing dequeuing process into 
delegatable chunks. all working but borders


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b9ddb888
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b9ddb888
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b9ddb888

Branch: refs/heads/master
Commit: b9ddb88862f15be28dd0a74869489a804e4cda43
Parents: e95c712
Author: Igor Vaynberg 
Authored: Fri Feb 14 21:38:34 2014 -0800
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../java/org/apache/wicket/ComponentQueue2.java |   2 +
 .../java/org/apache/wicket/DequeueContext.java  | 152 +++
 .../java/org/apache/wicket/MarkupContainer.java | 254 +--
 .../markup/repeater/AbstractRepeater.java   |  21 ++
 4 files changed, 240 insertions(+), 189 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b9ddb888/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java 
b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
index ec5251c..2ce3e8f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
@@ -25,6 +25,8 @@ import org.apache.wicket.util.lang.Args;
  * Manages the component queue.
  * 
  * @author igor
+ * 
+ * @deprecated uses too much memory compared to ComponentQueue
  */
 class ComponentQueue2
 {

http://git-wip-us.apache.org/repos/asf/wicket/blob/b9ddb888/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
new file mode 100644
index 000..8324161
--- /dev/null
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -0,0 +1,152 @@
+package org.apache.wicket;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.Markup;
+import org.apache.wicket.markup.MarkupElement;
+import org.apache.wicket.util.collections.ArrayListStack;
+
+public class DequeueContext
+{
+   private final Markup markup;
+   private int index;
+   private ComponentTag next;
+   private ArrayListStack tags = new ArrayListStack<>();
+   private ArrayListStack containers = new 
ArrayListStack<>();
+
+   public static class Bookmark
+   {
+   private final int index;
+   private final ComponentTag next;
+   private final ArrayListStack tags;
+   private final ArrayListStack containers;
+
+   private Bookmark(DequeueContext parser)
+   {
+   this.index = parser.index;
+   this.next = parser.next;
+   this.tags = new ArrayListStack<>(parser.tags);
+   this.containers = new 
ArrayListStack<>(parser.containers);
+   }
+
+   private void restore(DequeueContext parser)
+   {
+   parser.index = index;
+   parser.next = next;
+   parser.tags = new ArrayListStack(tags);
+   parser.containers = new 
ArrayListStack(containers);
+   }
+   }
+   
+   public DequeueContext(Markup markup, MarkupContainer root)
+   {
+   this.markup = markup;
+   containers.push(root);
+   next=nextTag();
+   }
+   
+   public Bookmark save()
+   {
+   return new Bookmark(this);
+   }
+
+   public void restore(Bookmark bookmark)
+   {
+   bookmark.restore(this);
+   }
+
+   public ComponentTag peekTag()
+   {
+   return next;
+   }
+   
+   public ComponentTag popTag()
+   {
+   ComponentTag taken=next;
+   tags.push(taken);
+   next=nextTag();
+   return taken;
+   }
+   
+   public void skipToCloseTag()
+   {
+   if (tags.peek().isOpen())
+   {
+   while (!next.closes(tags.peek()))
+   {
+   next = nextTag();
+   }
+   tags.pop();
+   }
+   }
+   
+   private ComponentTag nextTag()
+   {
+   for (; index < markup.size(); index++)
+   {
+   MarkupElement element = markup.get(index);
+   if (element instanceof Componen

[04/31] git commit: WICKET-3335 added todo

2014-02-20 Thread ivaynberg
WICKET-3335 added todo


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/58558e74
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/58558e74
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/58558e74

Branch: refs/heads/master
Commit: 58558e7491f34ebea1a3eeb3974c24cd10bbdddf
Parents: b54c663
Author: Igor Vaynberg 
Authored: Mon Feb 10 00:42:12 2014 -0800
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/58558e74/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index b537eca..2db19b2 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2053,6 +2053,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable

[06/31] git commit: WICKET-3335 Add some TODOs

2014-02-20 Thread ivaynberg
WICKET-3335 Add some TODOs


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7729de43
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7729de43
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7729de43

Branch: refs/heads/master
Commit: 7729de431bc7d480b7e10cea515e02b98edace2f
Parents: 58558e7
Author: Martin Tzvetanov Grigorov 
Authored: Mon Feb 10 14:13:28 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java | 3 +++
 .../java/org/apache/wicket/queueing/ComponentQueueingTest.java   | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7729de43/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 2db19b2..19b72aa 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -941,6 +941,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/7729de43/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index cda2e30..175a8d6 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -136,7 +136,9 @@ public class ComponentQueueingTest extends WicketTestCase
assertThat(p, hasPath(new Path(a, c)));
}
 
-   /** {@code [a,b,c] -> [a[b,c]] } */
+   /** {@code [a,b,c] -> [a[b,c]] }
+* TODO WICKET-3335 Fix the javadoc above
+* */
@Test
public void dequeue7()
{



[09/31] git commit: WICKET-3335 Fix an inline comment for the inline enclosure test

2014-02-20 Thread ivaynberg
WICKET-3335 Fix an inline comment for the inline enclosure test


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9b3cb1a8
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9b3cb1a8
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9b3cb1a8

Branch: refs/heads/master
Commit: 9b3cb1a8a2c5d866f2d21062002aeebe31988fb7
Parents: 0e11559
Author: Martin Tzvetanov Grigorov 
Authored: Mon Feb 10 14:51:49 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:14 2014 -0800

--
 .../java/org/apache/wicket/queueing/ComponentQueueingTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9b3cb1a8/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 6a247ff..98d15be 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -537,7 +537,7 @@ public class ComponentQueueingTest extends WicketTestCase
"",
tester.getLastResponseAsString());
 
-   // A is not visible, enclosure does not render
+   // A is not visible, inline enclosure render only itself (the 
placeholder tag)
 
a.setVisible(false);
tester.startPage(p);



[11/31] git commit: WICKET-3335 Add impl of ComponentQueue based on HashMap

2014-02-20 Thread ivaynberg
WICKET-3335 Add impl of ComponentQueue based on HashMap

MiniMap is not hash based so it won't gain CPU performance over ComponentQueue


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e95c7129
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e95c7129
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e95c7129

Branch: refs/heads/master
Commit: e95c7129950ed1fb53341ddf0da41e20ad185adb
Parents: a51ed31
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 17:04:08 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../java/org/apache/wicket/ComponentQueue2.java | 102 +++
 .../java/org/apache/wicket/MarkupContainer.java |   9 +-
 .../ComponentQueueingPerformanceTest.java   |   5 +-
 3 files changed, 108 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e95c7129/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java 
b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
new file mode 100644
index 000..ec5251c
--- /dev/null
+++ b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
@@ -0,0 +1,102 @@
+/*
+ * 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;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Manages the component queue.
+ * 
+ * @author igor
+ */
+class ComponentQueue2
+{
+   private static final int INITIAL = 8;
+
+   private Map queue;
+   private int queueSize = 0;
+
+   void add(Component... components)
+   {
+   for (Component component : components)
+   {
+   add(component);
+   }
+   }
+
+   void add(Component component)
+   {
+   Args.notNull(component, "component");
+
+   if (queue == null)
+   {
+   queue = new HashMap<>(INITIAL, 1);
+   }
+
+   Component old = queue.put(component.getId(), component);
+   if (old != null)
+   {
+   throw new WicketRuntimeException("A component with id: 
" + component.getId()
+   + " has already been queued");
+   }
+   queueSize++;
+   }
+
+   Component remove(String id)
+   {
+   if (queue != null)
+   {
+   Component removed = queue.remove(id);
+   if (removed != null)
+   {
+   queueSize--;
+   if (isEmpty())
+   {
+   queue = null;
+   }
+   return removed;
+   }
+   }
+   return null;
+   }
+
+   public boolean isEmpty()
+   {
+   return queueSize == 0;
+   }
+
+   public Component get(String id)
+   {
+   if (queue != null)
+   {
+   return queue.get(id);
+   }
+   return null;
+   }
+
+   @Override
+   public String toString()
+   {
+   return "ComponentQueue{" +
+   "queueSize=" + queueSize +
+   ", queue=" + queue +
+   '}';
+   }
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/e95c7129/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index c62433d..5005f29 100644
--- a/wicket-core/src/main/jav

[28/31] git commit: Fix org.apache.wicket.markup.html.tags.InputTagNotClosedTest

2014-02-20 Thread ivaynberg
Fix org.apache.wicket.markup.html.tags.InputTagNotClosedTest


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/456e74f9
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/456e74f9
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/456e74f9

Branch: refs/heads/master
Commit: 456e74f9c253a55a49cc9f16f1edfbb9d1ed6ee2
Parents: 28a1637
Author: Martin Tzvetanov Grigorov 
Authored: Tue Feb 18 14:48:49 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:16 2014 -0800

--
 wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/456e74f9/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index c5d6add..7c69ae1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2115,7 +2115,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable

[18/31] git commit: Java 7 diamonds

2014-02-20 Thread ivaynberg
Java 7 diamonds


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/5013763e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/5013763e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/5013763e

Branch: refs/heads/master
Commit: 5013763e4935522af2e52074cfc206acebb1b2e3
Parents: aa95974
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:05:13 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 wicket-core/src/test/java/org/apache/wicket/queueing/Path.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/5013763e/wicket-core/src/test/java/org/apache/wicket/queueing/Path.java
--
diff --git a/wicket-core/src/test/java/org/apache/wicket/queueing/Path.java 
b/wicket-core/src/test/java/org/apache/wicket/queueing/Path.java
index 5582260..7e0aa9a 100644
--- a/wicket-core/src/test/java/org/apache/wicket/queueing/Path.java
+++ b/wicket-core/src/test/java/org/apache/wicket/queueing/Path.java
@@ -29,7 +29,7 @@ class Path implements Iterable
 
public Path()
{
-   segments = new ArrayList();
+   segments = new ArrayList<>();
}
 
public Path(Component... components)



[17/31] git commit: WICKET-3335 Convert 'dequeuing' boolean to a request flag

2014-02-20 Thread ivaynberg
WICKET-3335 Convert 'dequeuing' boolean to a request flag


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/612f6fb4
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/612f6fb4
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/612f6fb4

Branch: refs/heads/master
Commit: 612f6fb41322fa97547d02cfb4fdd4f20ba6892c
Parents: ffd7e27
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:14:13 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../src/main/java/org/apache/wicket/Component.java |  1 +
 .../main/java/org/apache/wicket/MarkupContainer.java   | 13 +
 2 files changed, 6 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/612f6fb4/wicket-core/src/main/java/org/apache/wicket/Component.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index e1b256f..9014f0e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -446,6 +446,7 @@ public abstract class Component
private static final short RFLAG_CONFIGURED = 0x10;
private static final short RFLAG_BEFORE_RENDER_SUPER_CALL_VERIFIED = 
0x20;
private static final short RFLAG_INITIALIZE_SUPER_CALL_VERIFIED = 0x40;
+   protected static final short RFLAG_CONTAINER_DEQUEING = 0x80;
 
/**
 * Flags that only keep their value during the request. Useful for 
cache markers, etc. At the

http://git-wip-us.apache.org/repos/asf/wicket/blob/612f6fb4/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index e50418f..05e087d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -943,7 +943,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable

[15/31] git commit: WICKET-3335 extract panels' and borders' markup in files

2014-02-20 Thread ivaynberg
WICKET-3335 extract panels' and borders' markup in files

MarkupContainer#getAssociatedMarkup() returns wrong markup when using 
StringResourceStream


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/58f67000
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/58f67000
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/58f67000

Branch: refs/heads/master
Commit: 58f67000a96f82b8b6ebd8b980df95bc052122ba
Parents: 5dfa926
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 16:20:32 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../java/org/apache/wicket/MarkupContainer.java |  2 +-
 .../wicket/markup/html/border/Border.java   |  2 +-
 .../wicket/queueing/ComponentQueueingTest.java  | 31 +---
 .../queueing/nestedborders/InnerBorder.html | 10 +++
 .../queueing/nestedborders/InnerBorder.java | 14 +
 .../queueing/nestedborders/OuterBorder.html | 11 +++
 .../queueing/nestedborders/OuterBorder.java | 14 +
 .../queueing/nestedpanels/InnerPanel.html   | 13 
 .../queueing/nestedpanels/InnerPanel.java   | 14 +
 .../queueing/nestedpanels/OuterPanel.html   | 14 +
 .../queueing/nestedpanels/OuterPanel.java   | 14 +
 11 files changed, 120 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/58f67000/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 05e087d..c62433d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2148,7 +2148,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/58f67000/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index b3e1296..3c5b0d7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -398,7 +398,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
/**
 * The container to be associated with the  tag
 */
-   public class BorderBodyContainer extends WebMarkupContainer implements 
IQueueRegion
+   public class BorderBodyContainer extends WebMarkupContainer
{
private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/58f67000/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
index 0687177..751462e 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java
@@ -35,6 +35,10 @@ import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.Model;
+import org.apache.wicket.queueing.nestedborders.InnerBorder;
+import org.apache.wicket.queueing.nestedborders.OuterBorder;
+import org.apache.wicket.queueing.nestedpanels.InnerPanel;
+import org.apache.wicket.queueing.nestedpanels.OuterPanel;
 import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.resource.StringResourceStream;
 import org.junit.Assert;
@@ -263,21 +267,15 @@ public class ComponentQueueingTest extends WicketTestCase
/**
 * test with inner panels
 */
-   @Ignore
@Test
public void dequeueWithNestedPanels()
{
MarkupContainer r = new R(), s = new S();
 
-   TestPanel innerPanel = new TestPanel("inner");
-   innerPanel.setPanelMarkup(""
-   + "");
+   Panel innerPanel = new InnerPanel("inner");
innerPanel.queue(s);
 
-   TestPanel outerPanel = new TestPanel("outer");
-   
outerPanel.setPanelMarkup(""
-  

[31/31] git commit: WICKET-3335 test fixes

2014-02-20 Thread ivaynberg
WICKET-3335 test fixes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/723d7d3c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/723d7d3c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/723d7d3c

Branch: refs/heads/master
Commit: 723d7d3c9ebe8336897d75d3754685384f017b3a
Parents: abb316c
Author: Igor Vaynberg 
Authored: Thu Feb 20 23:09:43 2014 -0800
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:17 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  | 44 +-
 .../java/org/apache/wicket/MarkupContainer.java | 48 
 .../wicket/markup/html/border/Border.java   | 12 +++--
 .../markup/repeater/AbstractRepeater.java   |  4 +-
 .../markupFragments/MarkupFragmentTest.java |  2 +
 5 files changed, 85 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/723d7d3c/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index 99c102d..a5bb925 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -1,9 +1,26 @@
+/*
+ * 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;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.IMarkupFragment;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.util.collections.ArrayListStack;
+import org.apache.wicket.util.lang.Args;
 
 /**
  * Context for component dequeueing. Keeps track of markup position and 
container stack.
@@ -71,7 +88,7 @@ public final class DequeueContext
}
 
/**
-* Peeks markup tag that would be retrieved by call to {@link #popTag()}
+* Peeks markup tag that would be retrieved by call to {@link 
#takeTag()}
 * 
 * @return
 */
@@ -85,27 +102,30 @@ public final class DequeueContext
 * 
 * @return
 */
-   public ComponentTag popTag()
+   public ComponentTag takeTag()
{
-   ComponentTag taken = next;
-   tags.push(taken);
-   next = nextTag();
+   ComponentTag taken=next;
+   if (taken.isOpen() && !taken.hasNoCloseTag())
+   {
+   tags.push(taken);
+   }
+   else if (tags.size() > 0 && taken.closes(tags.peek()))
+   {
+   tags.pop();
+   }
+   next=nextTag();
return taken;
}

/**
-* Skips to the closing tag of the tag retrieved from last call to 
{@link #popTag()}
+* Skips to the closing tag of the tag retrieved from last call to 
{@link #takeTag()}
 */
public void skipToCloseTag()
{
-   if (tags.peek().isOpen())
-   {
while (!next.closes(tags.peek()))
{
next = nextTag();
}
-   tags.pop();
-   }
}

private ComponentTag nextTag()
@@ -117,7 +137,7 @@ public final class DequeueContext
{
ComponentTag tag = (ComponentTag)element;
ComponentTag open = tag.isClose() ? 
tag.getOpenTag() : tag;
-   if (canDequeueTag(open))
+   if (open != null && canDequeueTag(open))
{
index++;
return tag;
@@ -129,6 +149,8 @@ public final class DequeueContext

private boolean canDequeueTag(ComponentTag open)
{
+   Args.notNull(open,

[16/31] git commit: WICKET-3335 Fix TODOs

2014-02-20 Thread ivaynberg
WICKET-3335 Fix TODOs


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ffd7e274
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ffd7e274
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ffd7e274

Branch: refs/heads/master
Commit: ffd7e27401d851337e1c08324c94a6f9611ded59
Parents: 5013763
Author: Martin Tzvetanov Grigorov 
Authored: Fri Feb 14 15:09:59 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:37:15 2014 -0800

--
 .../main/java/org/apache/wicket/MarkupContainer.java | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ffd7e274/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 4344cbf..e50418f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -941,8 +941,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable

[09/11] git commit: Upgrade org.apache.felix:maven-bundle-plugin to 2.4.0

2014-02-20 Thread ivaynberg
Upgrade org.apache.felix:maven-bundle-plugin to 2.4.0


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/294f1eb5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/294f1eb5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/294f1eb5

Branch: refs/heads/sandbox/component-queueing-2
Commit: 294f1eb5719a6e2c0dd0a5aecb389dd6c8aa4fc3
Parents: 3f9265b
Author: Martin Tzvetanov Grigorov 
Authored: Wed Feb 19 14:50:12 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/294f1eb5/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 80c0a39..a2f6a77 100644
--- a/pom.xml
+++ b/pom.xml
@@ -851,7 +851,7 @@

org.apache.felix

maven-bundle-plugin
-   2.3.7
+   2.4.0


bundle-manifest



[07/11] git commit: Upgrade ASM from 4.1 to 4.2

2014-02-20 Thread ivaynberg
Upgrade ASM from 4.1 to 4.2


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3f9265bb
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3f9265bb
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3f9265bb

Branch: refs/heads/sandbox/component-queueing-2
Commit: 3f9265bb41a7c31c15c9ef5b171caf61d0496ec6
Parents: 25474d5
Author: Martin Tzvetanov Grigorov 
Authored: Wed Feb 19 14:48:47 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3f9265bb/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 178fd6b..80c0a39 100644
--- a/pom.xml
+++ b/pom.xml
@@ -500,7 +500,7 @@

org.ow2.asm
asm-util
-   4.1
+   4.2


javax.inject



[11/11] git commit: WICKET-1069 RFE: DataTable && colgroup

2014-02-20 Thread ivaynberg
WICKET-1069 RFE: DataTable && colgroup


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3d261456
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3d261456
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3d261456

Branch: refs/heads/sandbox/component-queueing-2
Commit: 3d261456f31d8064c75525a9981c52e68d76a22c
Parents: 7a4823c
Author: Martin Tzvetanov Grigorov 
Authored: Thu Feb 20 15:20:35 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 .../wicket/examples/repeater/DataTablePage.html |  12 ++-
 .../wicket/examples/repeater/DataTablePage.java |  15 +++
 .../examples/repeater/RepeaterApplication.java  |   2 +
 .../html/repeater/data/table/ColGroup.html  |  23 +
 .../html/repeater/data/table/ColGroup.java  | 102 +++
 .../html/repeater/data/table/DataTable.html |   1 +
 .../html/repeater/data/table/DataTable.java |  11 +-
 7 files changed, 163 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3d261456/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.html
--
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.html
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.html
index 8eb4b70..842cecb 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.html
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.html
@@ -25,6 +25,14 @@ This is a demo of the DataTable (DataView wrapper). Provided 
features:
 
 
 
-[table]
+[table]
+
+
+
+
+
+This is a table that uses 
org.apache.wicket.extensions.markup.html.repeater.data.table.ColGroup
+to style the columns:
+[table]
 
-
\ No newline at end of file
+

http://git-wip-us.apache.org/repos/asf/wicket/blob/3d261456/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.java
--
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.java
index 8640299..46b067d 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/DataTablePage.java
@@ -19,8 +19,10 @@ package org.apache.wicket.examples.repeater;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.wicket.AttributeModifier;
 import 
org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import 
org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ColGroup;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
 import 
org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
@@ -86,5 +88,18 @@ public class DataTablePage extends BasePage
dataTable.addBottomToolbar(new 
ExportToolbar(dataTable).addDataExporter(new CSVDataExporter()));
 
add(dataTable);
+
+   DataTable tableWithColGroup = new 
DataTable<>("tableWithColGroup", columns,
+   new SortableContactDataProvider(), 8);
+   add(tableWithColGroup);
+
+   ColGroup colgroup = tableWithColGroup.getColGroup();
+   colgroup.add(AttributeModifier.append("style", "border: solid 
1px green;"));
+   colgroup.addCol(colgroup.new 
Col(AttributeModifier.append("style", "background-color: lightblue;")));
+   colgroup.addCol(colgroup.new 
Col(AttributeModifier.append("style", "background-color: lightgreen")));
+   colgroup.addCol(colgroup.new 
Col(AttributeModifier.append("style", "background-color: pink")));
+   colgroup.addCol(colgroup.new 
Col(AttributeModifier.append("style", "background-color: yellow")));
+   colgroup.addCol(colgroup.new 
Col(AttributeModifier.append("span", "2"),
+   AttributeModifier.append("style", 
"background-color: #CC6633")));
}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/3d261456/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/RepeaterApplication.java
--
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/RepeaterApplication.java
 
b/wicket-examples/src

[08/11] git commit: Don't lookup twice the active request handler.

2014-02-20 Thread ivaynberg
Don't lookup twice the active request handler.

Add '' around the logged data for easier reading


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/51e5b57b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/51e5b57b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/51e5b57b

Branch: refs/heads/sandbox/component-queueing-2
Commit: 51e5b57b5592f43d25fa38e53270bfe950680056
Parents: 79e4031
Author: Martin Tzvetanov Grigorov 
Authored: Wed Feb 19 12:21:13 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 .../java/org/apache/wicket/cdi/AutoConversationManager.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/51e5b57b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
--
diff --git 
a/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
 
b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
index 5b88365..4aedb48 100644
--- 
a/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
+++ 
b/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
@@ -60,8 +60,9 @@ public class AutoConversationManager implements 
IComponentOnBeforeRenderListener
if (component instanceof Page)
{
Page page = (Page)component;
-   autoEndIfNecessary(page, 
RequestCycle.get().getActiveRequestHandler());
-   autoBeginIfNecessary(page, 
RequestCycle.get().getActiveRequestHandler());
+   IRequestHandler activeRequestHandler = 
page.getRequestCycle().getActiveRequestHandler();
+   autoEndIfNecessary(page, activeRequestHandler);
+   autoBeginIfNecessary(page, activeRequestHandler);
}
}
 
@@ -78,7 +79,7 @@ public class AutoConversationManager implements 
IComponentOnBeforeRenderListener
conversation.begin();
autoConversation.setAutomatic(true);
 
-   logger.debug("Auto-began conversation {} for page {}", 
conversation.getId(), page);
+   logger.debug("Auto-began conversation '{}' for page '{}'", 
conversation.getId(), page);
}
 
protected void autoEndIfNecessary(Page page, IRequestHandler handler)
@@ -98,7 +99,7 @@ public class AutoConversationManager implements 
IComponentOnBeforeRenderListener
conversation.end();
ConversationPropagator.removeConversationIdFromPage(page);
 
-   logger.debug("Auto-ended conversation {} for page {}", cid, 
page);
+   logger.debug("Auto-ended conversation '{}' for page '{}'", cid, 
page);
}
 
protected boolean hasConversationalComponent(Page page)



[05/11] git commit: WICKET-5512 Allow using child selector for JS event bindings

2014-02-20 Thread ivaynberg
WICKET-5512 Allow using child selector for JS event bindings


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/25474d52
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/25474d52
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/25474d52

Branch: refs/heads/sandbox/component-queueing-2
Commit: 25474d5226dfa057999bb566dfcd61318d468232
Parents: 51e5b57
Author: Martin Tzvetanov Grigorov 
Authored: Wed Feb 19 14:33:56 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 .../ajax/AbstractDefaultAjaxBehavior.java   |  7 +
 .../ajax/attributes/AjaxAttributeName.java  |  7 -
 .../ajax/attributes/AjaxRequestAttributes.java  | 28 
 .../wicket/ajax/res/js/wicket-ajax-jquery.js|  2 +-
 .../wicket/ajax/res/js/wicket-event-jquery.js   |  7 +++--
 .../ajax/attributes/AjaxAttributeNameTest.java  |  2 +-
 6 files changed, 48 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/25474d52/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
index 1da7366..1d0caf3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
@@ -227,6 +227,13 @@ public abstract class AbstractDefaultAjaxBehavior extends 
AbstractAjaxBehavior
submittingComponentId);
}
 
+   CharSequence childSelector = 
attributes.getChildSelector();
+   if (Strings.isEmpty(childSelector) == false)
+   {
+   
attributesJson.put(AjaxAttributeName.CHILD_SELECTOR.jsonName(),
+   childSelector);
+   }
+
String indicatorId = findIndicatorId();
if (Strings.isEmpty(indicatorId) == false)
{

http://git-wip-us.apache.org/repos/asf/wicket/blob/25474d52/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
index e0ce088..0429ec3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
@@ -218,7 +218,12 @@ public enum AjaxAttributeName {
/**
 * @see AbstractDefaultAjaxBehavior#getCallbackUrl();
 */
-   URL("u");
+   URL("u"),
+
+   /**
+* @see 
org.apache.wicket.ajax.attributes.AjaxRequestAttributes#childSelector
+*/
+   CHILD_SELECTOR("sel");
 
private final String jsonName;
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/25474d52/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
index 9eff742..fea733d 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
@@ -133,6 +133,34 @@ public final class AjaxRequestAttributes
private ThrottlingSettings throttlingSettings;
 
/**
+* A selector string to filter the descendants of the selected
+* elements that trigger the event. If the selector is null or empty,
+* the event is always triggered when it reaches the selected HTML 
element.
+*
+* @see http://api.jquery.com/on/";>jQuery#on's selector
+*/
+   private CharSequence childSelector;
+
+   /**
+* @see #childSelector
+* @return The selector string that filters the descendants
+*/
+   public CharSequence getChildSelector()
+   {
+   return childSelector;
+   }
+
+   /**
+* @see #childSelector
+* @param childSelector
+*The selector string that filters the descendants
+*/
+   public void setChildSelector(Char

[01/11] WICKET-4795 Wicket unit tests rely on hashmap iteration order

2014-02-20 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/sandbox/component-queueing-2 1fd9d57c0 -> e3328f141


http://git-wip-us.apache.org/repos/asf/wicket/blob/79e40312/wicket-core/src/main/java/org/apache/wicket/ajax/json/XML.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/json/XML.java 
b/wicket-core/src/main/java/org/apache/wicket/ajax/json/XML.java
index b8705d6..0767e34 100755
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/json/XML.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/json/XML.java
@@ -31,11 +31,11 @@ import java.util.Iterator;
  * This provides static methods to convert an XML text into a JSONObject,
  * and to covert a JSONObject into an XML text.
  * @author JSON.org
- * @version 2011-02-11
+ * @version 2013-11-12
  */
 public class XML {
 
-/** The Character '&'. */
+/** The Character '&'. */
 public static final Character AMP   = new Character('&');
 
 /** The Character '''. */
@@ -50,7 +50,7 @@ public class XML {
 /** The Character '>'. */
 public static final Character GT= new Character('>');
 
-/** The Character '<'. */
+/** The Character '<'. */
 public static final Character LT= new Character('<');
 
 /** The Character '?'. */
@@ -99,21 +99,22 @@ public class XML {
 }
 return sb.toString();
 }
-
+
 /**
- * Throw an exception if the string contains whitespace. 
+ * Throw an exception if the string contains whitespace.
  * Whitespace is not allowed in tagNames and attributes.
  * @param string
  * @throws JSONException
  */
-public static void noSpace(String string) throws JSONException {
+public static void noSpace(String string) throws JSONException
+{
 int i, length = string.length();
 if (length == 0) {
 throw new JSONException("Empty string.");
 }
 for (i = 0; i < length; i += 1) {
 if (Character.isWhitespace(string.charAt(i))) {
-throw new JSONException("'" + string + 
+throw new JSONException("'" + string +
 "' contains a space character.");
 }
 }
@@ -196,7 +197,7 @@ public class XML {
 token = x.nextToken();
 if (name == null) {
 throw x.syntaxError("Mismatched close tag " + token);
-}
+}
 if (!token.equals(name)) {
 throw x.syntaxError("Mismatched " + name + " and " + token);
 }
@@ -229,7 +230,7 @@ public class XML {
 if (!(token instanceof String)) {
 throw x.syntaxError("Missing value");
 }
-jsonobject.accumulate(string, 
+jsonobject.accumulate(string,
 XML.stringToValue((String)token));
 token = null;
 } else {
@@ -262,7 +263,7 @@ public class XML {
 } else if (token instanceof String) {
 string = (String)token;
 if (string.length() > 0) {
-jsonobject.accumulate("content", 
+jsonobject.accumulate("content",
 XML.stringToValue(string));
 }
 
@@ -274,7 +275,7 @@ public class XML {
 context.accumulate(tagName, "");
 } else if (jsonobject.length() == 1 &&
jsonobject.opt("content") != null) {
-context.accumulate(tagName, 
+context.accumulate(tagName,
 jsonobject.opt("content"));
 } else {
 context.accumulate(tagName, jsonobject);
@@ -295,15 +296,12 @@ public class XML {
  * Try to convert a string into a number, boolean, or null. If the string
  * can't be converted, return the string. This is much less ambitious than
  * JSONObject.stringToValue, especially because it does not attempt to
- * convert plus forms, octal forms, hex forms, or E forms lacking decimal 
+ * convert plus forms, octal forms, hex forms, or E forms lacking decimal
  * points.
  * @param string A String.
  * @return A simple JSON value.
  */
 public static Object stringToValue(String string) {
-if ("".equals(string)) {
-return string;
-}
 if ("true".equalsIgnoreCase(string)) {
 return Boolean.TRUE;
 }
@@ -313,41 +311,31 @@ public class XML {
 if ("null".equalsIgnoreCase(string)) {
 return JSONObject.NULL;
 }
-if ("0".equals(stri

[06/11] git commit: Change the initial capacity of the arraylist for stringResourceLoaders to 6.

2014-02-20 Thread ivaynberg
Change the initial capacity of the arraylist for stringResourceLoaders to 6.

Wicket adds 5 in ResourceSettings' constructor. Leave 1 for the user 
application needs.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a4196262
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a4196262
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a4196262

Branch: refs/heads/sandbox/component-queueing-2
Commit: a419626216c8e4e3c3dbc17a7cb7515d48103934
Parents: 294f1eb
Author: Martin Tzvetanov Grigorov 
Authored: Wed Feb 19 15:01:03 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 .../src/main/java/org/apache/wicket/settings/ResourceSettings.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a4196262/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java 
b/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
index 3b6b440..be2b272 100644
--- a/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
+++ b/wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java
@@ -140,7 +140,7 @@ public class ResourceSettings implements 
IPropertiesFactoryContext
private IFileCleaner fileCleaner;
 
/** Chain of string resource loaders to use */
-   private final List stringResourceLoaders = 
Generics.newArrayList(4);
+   private final List stringResourceLoaders = 
Generics.newArrayList(6);
 
/** Flags used to determine how to behave if resources are not found */
private boolean throwExceptionOnMissingResource = true;



[10/11] git commit: WICKET-831 Return response status 404 when a mapper cannot decode a request url

2014-02-20 Thread ivaynberg
WICKET-831 Return response status 404 when a mapper cannot decode a request url


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e3328f14
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e3328f14
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e3328f14

Branch: refs/heads/sandbox/component-queueing-2
Commit: e3328f1410d251e55e7a7a81dc181923a3a3a739
Parents: 3d26145
Author: Martin Tzvetanov Grigorov 
Authored: Thu Feb 20 17:46:31 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 .../wicket/core/request/mapper/ResourceMapper.java   | 15 +--
 .../apache/wicket/request/mapper/AbstractMapper.java |  2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e3328f14/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/ResourceMapper.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/ResourceMapper.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/ResourceMapper.java
index 3455ec5..718ede2 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/ResourceMapper.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/ResourceMapper.java
@@ -18,12 +18,15 @@ package org.apache.wicket.core.request.mapper;
 
 import java.util.List;
 
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.wicket.Application;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestMapper;
 import org.apache.wicket.request.Request;
 import org.apache.wicket.request.Url;
 import 
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler;
+import org.apache.wicket.request.http.flow.AbortWithHttpErrorCodeException;
 import org.apache.wicket.request.mapper.AbstractMapper;
 import org.apache.wicket.request.mapper.parameter.IPageParametersEncoder;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
@@ -229,8 +232,16 @@ public class ResourceMapper extends AbstractMapper 
implements IRequestMapper

if 
(Strings.isEmpty(cacheUrl.getFileName()))
{
-   throw new 
IllegalStateException("caching strategy returned empty name for " +
-   resource);
+   if (Application.exists() && 
Application.get().usesDeploymentConfig())
+   {
+   throw new 
AbortWithHttpErrorCodeException(HttpServletResponse.SC_NOT_FOUND,
+   "caching 
strategy returned empty name for " + resource);
+   }
+   else
+   {
+   throw new 
IllegalStateException(
+   
"caching strategy returned empty name for " + resource);
+   }
}
segments.set(lastSegmentAt, 
cacheUrl.getFileName());
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/e3328f14/wicket-request/src/main/java/org/apache/wicket/request/mapper/AbstractMapper.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/AbstractMapper.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/AbstractMapper.java
index 5af0fb0..1857818 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/AbstractMapper.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/AbstractMapper.java
@@ -227,4 +227,4 @@ public abstract class AbstractMapper implements 
IRequestMapper
return res;
}
 
-}
\ No newline at end of file
+}



[04/11] git commit: Upgrade dependencies

2014-02-20 Thread ivaynberg
Upgrade dependencies

Spring from 4.0.1 to 4.0.2
SLF4J from 1.7.5 to 1.7.6


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7a4823cb
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7a4823cb
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7a4823cb

Branch: refs/heads/sandbox/component-queueing-2
Commit: 7a4823cb8d339f59e83fe902f1a461c8ba88e00a
Parents: a419626
Author: Martin Tzvetanov Grigorov 
Authored: Thu Feb 20 12:07:43 2014 +0200
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:24:05 2014 -0800

--
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7a4823cb/pom.xml
--
diff --git a/pom.xml b/pom.xml
index a2f6a77..1fa30dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,12 +33,12 @@
0.6.4.201312101107
8.1.14.v20131031
9.0.7.v20131107
-   4.0.1.RELEASE
+   4.0.2.RELEASE
3.0.1
2.9.1
2.12.2
1.9.5
-   1.7.5
+   1.7.6
1.3





git commit: WICKET-3335 test fixes

2014-02-20 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/sandbox/component-queueing-2 63d15c5c3 -> 1fd9d57c0


WICKET-3335 test fixes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1fd9d57c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1fd9d57c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1fd9d57c

Branch: refs/heads/sandbox/component-queueing-2
Commit: 1fd9d57c0954f393e7cf6b6391d2f69c2815674d
Parents: 63d15c5
Author: Igor Vaynberg 
Authored: Thu Feb 20 23:09:43 2014 -0800
Committer: Igor Vaynberg 
Committed: Thu Feb 20 23:18:25 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  | 44 +-
 .../java/org/apache/wicket/MarkupContainer.java | 48 
 .../wicket/markup/html/border/Border.java   | 12 +++--
 .../markup/repeater/AbstractRepeater.java   |  4 +-
 .../markupFragments/MarkupFragmentTest.java |  2 +
 5 files changed, 85 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1fd9d57c/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index 99c102d..a5bb925 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -1,9 +1,26 @@
+/*
+ * 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;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.IMarkupFragment;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.util.collections.ArrayListStack;
+import org.apache.wicket.util.lang.Args;
 
 /**
  * Context for component dequeueing. Keeps track of markup position and 
container stack.
@@ -71,7 +88,7 @@ public final class DequeueContext
}
 
/**
-* Peeks markup tag that would be retrieved by call to {@link #popTag()}
+* Peeks markup tag that would be retrieved by call to {@link 
#takeTag()}
 * 
 * @return
 */
@@ -85,27 +102,30 @@ public final class DequeueContext
 * 
 * @return
 */
-   public ComponentTag popTag()
+   public ComponentTag takeTag()
{
-   ComponentTag taken = next;
-   tags.push(taken);
-   next = nextTag();
+   ComponentTag taken=next;
+   if (taken.isOpen() && !taken.hasNoCloseTag())
+   {
+   tags.push(taken);
+   }
+   else if (tags.size() > 0 && taken.closes(tags.peek()))
+   {
+   tags.pop();
+   }
+   next=nextTag();
return taken;
}

/**
-* Skips to the closing tag of the tag retrieved from last call to 
{@link #popTag()}
+* Skips to the closing tag of the tag retrieved from last call to 
{@link #takeTag()}
 */
public void skipToCloseTag()
{
-   if (tags.peek().isOpen())
-   {
while (!next.closes(tags.peek()))
{
next = nextTag();
}
-   tags.pop();
-   }
}

private ComponentTag nextTag()
@@ -117,7 +137,7 @@ public final class DequeueContext
{
ComponentTag tag = (ComponentTag)element;
ComponentTag open = tag.isClose() ? 
tag.getOpenTag() : tag;
-   if (canDequeueTag(open))
+   if (open != null && canDequeueTag(open))
{
index++;
return tag;
@@ -129,6 +149,8 @@ public final class

git commit: dequeue docs

2014-02-15 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/sandbox/component-queueing-2 384d748c1 -> 3a3e32a59


dequeue docs


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3a3e32a5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3a3e32a5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3a3e32a5

Branch: refs/heads/sandbox/component-queueing-2
Commit: 3a3e32a597aa312f97cc588a66780783cd0eb9ed
Parents: 384d748
Author: Igor Vaynberg 
Authored: Sat Feb 15 21:56:18 2014 -0800
Committer: Igor Vaynberg 
Committed: Sat Feb 15 21:56:18 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  |  68 ++-
 .../java/org/apache/wicket/IQueueRegion.java|  22 ++-
 .../java/org/apache/wicket/MarkupContainer.java | 190 ++-
 .../wicket/markup/html/border/Border.java   |   8 +-
 .../markup/repeater/AbstractRepeater.java   |   4 +
 5 files changed, 188 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3a3e32a5/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index 4e62c3e..c13b0f2 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -2,19 +2,26 @@ package org.apache.wicket;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.IMarkupFragment;
-import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.util.collections.ArrayListStack;
 
-public class DequeueContext
+/**
+ * Context for component dequeueing. Keeps track of markup position and 
container stack.
+ * 
+ * @author igor
+ *
+ */
+public final class DequeueContext
 {
private final IMarkupFragment markup;
private int index;
private ComponentTag next;
private ArrayListStack tags = new ArrayListStack<>();
+
private ArrayListStack containers = new 
ArrayListStack<>();
 
-   public static class Bookmark
+   /** A bookmark for the DequeueContext stack */
+   public static final class Bookmark
{
private final int index;
private final ComponentTag next;
@@ -45,21 +52,39 @@ public class DequeueContext
next=nextTag();
}

+   /**
+* Saves the state of the context into a bookmark which can later be 
used to restore it.
+*/
public Bookmark save()
{
return new Bookmark(this);
}
 
+   /**
+* Restores the state of the context from the bookmark
+* 
+* @param bookmark
+*/
public void restore(Bookmark bookmark)
{
bookmark.restore(this);
}
 
+   /**
+* Peeks markup tag that would be retrieved by call to {@link #popTag()}
+* 
+* @return
+*/
public ComponentTag peekTag()
{
return next;
}

+   /**
+* Retrieves the next markup tag
+* 
+* @return
+*/
public ComponentTag popTag()
{
ComponentTag taken=next;
@@ -68,6 +93,9 @@ public class DequeueContext
return taken;
}

+   /**
+* Skips to the closing tag of the tag retrieved from last call to 
{@link #popTag()}
+*/
public void skipToCloseTag()
{
if (tags.peek().isOpen())
@@ -89,7 +117,7 @@ public class DequeueContext
{
ComponentTag tag = (ComponentTag)element;
ComponentTag open = tag.isClose() ? 
tag.getOpenTag() : tag;
-   if (canDequeue(open))
+   if (canDequeueTag(open))
{
index++;
return tag;
@@ -99,7 +127,7 @@ public class DequeueContext
return null;
}

-   private boolean canDequeue(ComponentTag open)
+   private boolean canDequeueTag(ComponentTag open)
{
if (containers.size() < 1)
{
@@ -108,7 +136,7 @@ public class DequeueContext
}
for (int i = containers.size() - 1; i >= 0; i--)
{
-   if (containers.get(i).supportsDequeueingFrom((open)))
+   if (containers.get(i).canDequeueTag((open)))
{
  

[2/2] git commit: WICKET-3335 nested borders working. everything should be working. needs more cleanup and javadoc

2014-02-15 Thread ivaynberg
WICKET-3335 nested borders working. everything should be working. needs more 
cleanup and javadoc


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/384d748c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/384d748c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/384d748c

Branch: refs/heads/sandbox/component-queueing-2
Commit: 384d748c150031fa584aa44fce2f0a7e05e98531
Parents: 14797ed
Author: Igor Vaynberg 
Authored: Sat Feb 15 00:40:48 2014 -0800
Committer: Igor Vaynberg 
Committed: Sat Feb 15 00:40:48 2014 -0800

--
 .../java/org/apache/wicket/DequeueContext.java  |   5 +-
 .../java/org/apache/wicket/MarkupContainer.java |  11 +-
 .../wicket/markup/html/border/Border.java   | 102 ++-
 .../wicket/queueing/ComponentQueueingTest.java  |  24 ++---
 .../org/apache/wicket/queueing/HasPath.java |   7 +-
 .../queueing/nestedborders/OuterBorder.html |   2 +-
 6 files changed, 128 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/384d748c/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
index 8324161..4e62c3e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -1,13 +1,14 @@
 package org.apache.wicket;
 
 import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.IMarkupFragment;
 import org.apache.wicket.markup.Markup;
 import org.apache.wicket.markup.MarkupElement;
 import org.apache.wicket.util.collections.ArrayListStack;
 
 public class DequeueContext
 {
-   private final Markup markup;
+   private final IMarkupFragment markup;
private int index;
private ComponentTag next;
private ArrayListStack tags = new ArrayListStack<>();
@@ -37,7 +38,7 @@ public class DequeueContext
}
}

-   public DequeueContext(Markup markup, MarkupContainer root)
+   public DequeueContext(IMarkupFragment markup, MarkupContainer root)
{
this.markup = markup;
containers.push(root);

http://git-wip-us.apache.org/repos/asf/wicket/blob/384d748c/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 72f7cc9..e213f35 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2080,7 +2080,7 @@ public abstract class MarkupContainer extends Component 
implements Iterablehttp://git-wip-us.apache.org/repos/asf/wicket/blob/384d748c/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 3c5b0d7..54fa141 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -26,6 +26,7 @@ import org.apache.wicket.markup.MarkupException;
 import org.apache.wicket.markup.MarkupFragment;
 import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.markup.TagUtils;
+import org.apache.wicket.markup.WicketTag;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy;
 import org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy;
@@ -162,7 +163,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
super(id, model);
 
body = new BorderBodyContainer(id + "_" + BODY);
-   addToBorder(body);
+   queueToBorder(body);
}
 
/**
@@ -398,7 +399,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
/**
 * The container to be associated with the  tag
 */
-   public class BorderBodyContainer extends WebMarkupContainer
+   public class BorderBodyContainer extends WebMarkupContainer implements 
IQueueRegion
{
private static final long serialVersionUID = 1L;
 
@@ -535,5 +536,102 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
 
 

[1/2] git commit: WICKET-3335 break up and refactor monolithing dequeuing process into delegatable chunks. all working but borders

2014-02-15 Thread ivaynberg
Repository: wicket
Updated Branches:
  refs/heads/sandbox/component-queueing-2 09c6f7728 -> 384d748c1


WICKET-3335 break up and refactor monolithing dequeuing process into 
delegatable chunks. all working but borders


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/14797eda
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/14797eda
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/14797eda

Branch: refs/heads/sandbox/component-queueing-2
Commit: 14797edae44b320e28bab53cb3b6ac7ac9a0a2a3
Parents: 09c6f77
Author: Igor Vaynberg 
Authored: Fri Feb 14 21:38:34 2014 -0800
Committer: Igor Vaynberg 
Committed: Fri Feb 14 21:38:34 2014 -0800

--
 .../java/org/apache/wicket/ComponentQueue2.java |   2 +
 .../java/org/apache/wicket/DequeueContext.java  | 152 +++
 .../java/org/apache/wicket/MarkupContainer.java | 254 +--
 .../markup/repeater/AbstractRepeater.java   |  21 ++
 4 files changed, 240 insertions(+), 189 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/14797eda/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java 
b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
index ec5251c..2ce3e8f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue2.java
@@ -25,6 +25,8 @@ import org.apache.wicket.util.lang.Args;
  * Manages the component queue.
  * 
  * @author igor
+ * 
+ * @deprecated uses too much memory compared to ComponentQueue
  */
 class ComponentQueue2
 {

http://git-wip-us.apache.org/repos/asf/wicket/blob/14797eda/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
new file mode 100644
index 000..8324161
--- /dev/null
+++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java
@@ -0,0 +1,152 @@
+package org.apache.wicket;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.Markup;
+import org.apache.wicket.markup.MarkupElement;
+import org.apache.wicket.util.collections.ArrayListStack;
+
+public class DequeueContext
+{
+   private final Markup markup;
+   private int index;
+   private ComponentTag next;
+   private ArrayListStack tags = new ArrayListStack<>();
+   private ArrayListStack containers = new 
ArrayListStack<>();
+
+   public static class Bookmark
+   {
+   private final int index;
+   private final ComponentTag next;
+   private final ArrayListStack tags;
+   private final ArrayListStack containers;
+
+   private Bookmark(DequeueContext parser)
+   {
+   this.index = parser.index;
+   this.next = parser.next;
+   this.tags = new ArrayListStack<>(parser.tags);
+   this.containers = new 
ArrayListStack<>(parser.containers);
+   }
+
+   private void restore(DequeueContext parser)
+   {
+   parser.index = index;
+   parser.next = next;
+   parser.tags = new ArrayListStack(tags);
+   parser.containers = new 
ArrayListStack(containers);
+   }
+   }
+   
+   public DequeueContext(Markup markup, MarkupContainer root)
+   {
+   this.markup = markup;
+   containers.push(root);
+   next=nextTag();
+   }
+   
+   public Bookmark save()
+   {
+   return new Bookmark(this);
+   }
+
+   public void restore(Bookmark bookmark)
+   {
+   bookmark.restore(this);
+   }
+
+   public ComponentTag peekTag()
+   {
+   return next;
+   }
+   
+   public ComponentTag popTag()
+   {
+   ComponentTag taken=next;
+   tags.push(taken);
+   next=nextTag();
+   return taken;
+   }
+   
+   public void skipToCloseTag()
+   {
+   if (tags.peek().isOpen())
+   {
+   while (!next.closes(tags.peek()))
+   {
+   next = nextTag();
+   }
+   tags.pop();
+   }
+   }
+   
+   private ComponentTag nextTag()
+   {
+   for (; index < markup.size(); index++)
+ 

git commit: WICKET-3335 added todo

2014-02-10 Thread ivaynberg
Updated Branches:
  refs/heads/sandbox/component-queueing-2 02923940a -> 61a5aec39


WICKET-3335 added todo


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/61a5aec3
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/61a5aec3
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/61a5aec3

Branch: refs/heads/sandbox/component-queueing-2
Commit: 61a5aec39f0c72318a816107f7dde1a2b1851091
Parents: 0292394
Author: Igor Vaynberg 
Authored: Mon Feb 10 00:42:12 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Feb 10 00:42:12 2014 -0800

--
 wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/61a5aec3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index b537eca..2db19b2 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -2053,6 +2053,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable

git commit: WICKET-5462 fix npe in ajax form component label repainting

2014-01-06 Thread ivaynberg
Updated Branches:
  refs/heads/master a3a5a40fc -> af05b3d68


WICKET-5462 fix npe in ajax form component label repainting


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/af05b3d6
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/af05b3d6
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/af05b3d6

Branch: refs/heads/master
Commit: af05b3d68ca8b8021db8e205d39557782eb68a7b
Parents: a3a5a40
Author: Igor Vaynberg 
Authored: Mon Jan 6 10:26:46 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Jan 6 10:27:22 2014 -0800

--
 .../src/main/java/org/apache/wicket/markup/html/form/Form.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/af05b3d6/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index 94f93a5..7eeb1e1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -774,10 +774,10 @@ public class Form extends WebMarkupContainer 
implements IFormSubmitListener,
callOnError(submitter);
}
 
-
-   if (((WebRequest)getRequest()).isAjax())
+   // update auto labels if we are inside an ajax request
+   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
+   if (target != null)
{
-   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
visitChildren(FormComponent.class, new 
IVisitor, Void>()
{
@Override



[1/2] git commit: Revert "AAU-5462 fix npe in ajax form component label repainting" incorrect jira number

2014-01-06 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 512a573e1 -> 9bd0e07b3


Revert "AAU-5462 fix npe in ajax form component label repainting" incorrect 
jira number

This reverts commit 512a573e15753e905e1aafbf9b451d0460e6ba2f.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2f52df61
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2f52df61
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2f52df61

Branch: refs/heads/wicket-6.x
Commit: 2f52df61f45f747a6e42d51b73c2f02aa49f6b66
Parents: 512a573
Author: Igor Vaynberg 
Authored: Mon Jan 6 10:26:17 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Jan 6 10:26:17 2014 -0800

--
 .../src/main/java/org/apache/wicket/markup/html/form/Form.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2f52df61/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index 918edec..a9ea6a6 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -778,10 +778,10 @@ public class Form extends WebMarkupContainer 
implements IFormSubmitListener,
callOnError(submitter);
}
 
-   // update auto labels if we are inside an ajax request
-   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
-   if (target != null)
+
+   if (((WebRequest)getRequest()).isAjax())
{
+   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
visitChildren(FormComponent.class, new 
IVisitor, Void>()
{
@Override



[2/2] git commit: WICKET-5462 fix npe in ajax form component label repainting

2014-01-06 Thread ivaynberg
WICKET-5462 fix npe in ajax form component label repainting


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9bd0e07b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9bd0e07b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9bd0e07b

Branch: refs/heads/wicket-6.x
Commit: 9bd0e07b3da4e8ed4405d3d625fab7034721e3c7
Parents: 2f52df6
Author: Igor Vaynberg 
Authored: Mon Jan 6 10:26:46 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Jan 6 10:26:46 2014 -0800

--
 .../src/main/java/org/apache/wicket/markup/html/form/Form.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9bd0e07b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index a9ea6a6..918edec 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -778,10 +778,10 @@ public class Form extends WebMarkupContainer 
implements IFormSubmitListener,
callOnError(submitter);
}
 
-
-   if (((WebRequest)getRequest()).isAjax())
+   // update auto labels if we are inside an ajax request
+   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
+   if (target != null)
{
-   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
visitChildren(FormComponent.class, new 
IVisitor, Void>()
{
@Override



git commit: AAU-5462 fix npe in ajax form component label repainting

2014-01-06 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 44fd2e941 -> 512a573e1


AAU-5462 fix npe in ajax form component label repainting


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/512a573e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/512a573e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/512a573e

Branch: refs/heads/wicket-6.x
Commit: 512a573e15753e905e1aafbf9b451d0460e6ba2f
Parents: 44fd2e9
Author: Igor Vaynberg 
Authored: Mon Jan 6 10:25:19 2014 -0800
Committer: Igor Vaynberg 
Committed: Mon Jan 6 10:25:19 2014 -0800

--
 .../src/main/java/org/apache/wicket/markup/html/form/Form.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/512a573e/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index a9ea6a6..918edec 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -778,10 +778,10 @@ public class Form extends WebMarkupContainer 
implements IFormSubmitListener,
callOnError(submitter);
}
 
-
-   if (((WebRequest)getRequest()).isAjax())
+   // update auto labels if we are inside an ajax request
+   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
+   if (target != null)
{
-   final AjaxRequestTarget target = 
getRequestCycle().find(AjaxRequestTarget.class);
visitChildren(FormComponent.class, new 
IVisitor, Void>()
{
@Override



git commit: Revert "WICKET-5224 Revert "WICKET-4948 fix vertical centering of modals in safari""

2013-12-10 Thread ivaynberg
Updated Branches:
  refs/heads/master 333b4cd2c -> 61ebe2dbd


Revert "WICKET-5224 Revert "WICKET-4948 fix vertical centering of modals in 
safari""

This reverts commit 0cecd7fdfa449240f39aaa991c5f6c3046bc3c53.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/61ebe2db
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/61ebe2db
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/61ebe2db

Branch: refs/heads/master
Commit: 61ebe2dbd55ff2ff5ac6f73909708021bb1acf4d
Parents: 333b4cd
Author: Igor Vaynberg 
Authored: Tue Dec 10 09:03:59 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Dec 10 09:03:59 2013 -0800

--
 .../wicket/extensions/ajax/markup/html/modal/res/modal.js  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/61ebe2db/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 7b9684c..0dd86b0 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -119,7 +119,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -137,7 +137,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko()) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -479,7 +479,7 @@
var scTop = 0;
var scLeft = 0;
 
-   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
+   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() 
|| Wicket.Browser.isSafari()) {
scLeft = Wicket.Window.getScrollX();
scTop = Wicket.Window.getScrollY();
}



git commit: Revert "Revert "WICKET-4948 fix vertical centering of modals in safari" safari seems to work fine now. WICKET-5224"

2013-12-10 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 536f3334e -> 577129d98


Revert "Revert "WICKET-4948 fix vertical centering of modals in safari" safari 
seems to work fine now. WICKET-5224"

This reverts commit 8fda26e515f83540ead654d997a5ffd8844ee839.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/577129d9
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/577129d9
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/577129d9

Branch: refs/heads/wicket-6.x
Commit: 577129d983369de2b2344709a0adf8302a8c3844
Parents: 536f333
Author: Igor Vaynberg 
Authored: Tue Dec 10 08:51:33 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Dec 10 08:51:33 2013 -0800

--
 .../wicket/extensions/ajax/markup/html/modal/res/modal.js  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/577129d9/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 1d147c1..538b783 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -119,7 +119,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -137,7 +137,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko()) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -483,7 +483,7 @@
var scTop = 0;
var scLeft = 0;
 
-   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
+   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() 
|| Wicket.Browser.isSafari()) {
scLeft = Wicket.Window.getScrollX();
scTop = Wicket.Window.getScrollY();
}



git commit: tweak for WICKET-5411

2013-11-26 Thread ivaynberg
Updated Branches:
  refs/heads/master 62a1a94f8 -> 1d8b419e3


tweak for WICKET-5411


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1d8b419e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1d8b419e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1d8b419e

Branch: refs/heads/master
Commit: 1d8b419e36de8385378e4d8c58b19ca523527509
Parents: 62a1a94
Author: Igor Vaynberg 
Authored: Tue Nov 26 08:16:39 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Nov 26 08:17:01 2013 -0800

--
 .../apache/wicket/markup/html/form/AutoFormLabelPickupTest.java  | 4 ++--
 .../apache/wicket/markup/html/form/AutoLabelWithContentTest.java | 4 ++--
 .../wicket/markup/html/form/AutoLabelWithinEnclosureTest.java| 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1d8b419e/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
index b47f570..caa592b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
@@ -65,14 +65,14 @@ public class AutoFormLabelPickupTest extends WicketTestCase
public void labelIsPrintedFromModel() throws Exception
{
tester.startPage(new PrintLabelPage(Model.of("label from 
model")));
-   tester.assertContains("\\|label from model\\|");
+   tester.assertContains("\\|label from model\\|");
}
 
@Test
public void labelIsPrintedFromProperties() throws Exception
{
tester.startPage(new PrintLabelPage(Model.of((String)null)));
-   tester.assertContains("\\|label from properties\\|");
+   tester.assertContains("\\|label from properties\\|");
}
 
@Test

http://git-wip-us.apache.org/repos/asf/wicket/blob/1d8b419e/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
index 303fa83..1f66dcc 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
@@ -45,7 +45,7 @@ public class AutoLabelWithContentTest extends WicketTestCase
public void labelWithMessage() throws Exception
{
tester.startPage(LabelWithMessagePage.class);
-   tester.assertContains("my test 
text");
+   tester.assertContains("my test 
text");
}
 
public static class LabelWithNestedComponentsPage extends WebPage
@@ -62,6 +62,6 @@ public class AutoLabelWithContentTest extends WicketTestCase
public void labelWithNestedComponent()
{
tester.startPage(LabelWithNestedComponentsPage.class);
-   tester.assertContains("");
+   tester.assertContains("");
}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/1d8b419e/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
index 5429900..ed4c5d9 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
@@ -46,7 +46,7 @@ public class AutoLabelWithinEnclosureTest extends 
WicketTestCase
{
tester.startPage(new LabelWithinEnclosurePage(true));
tester.dumpPage();
-   tester.assertContains("blabla");
+   tester.assertContains("blabla");
}
 
@Test



git commit: tweak for WICKET-5411

2013-11-26 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 8808dd8f2 -> 6c37c6604


tweak for WICKET-5411


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/6c37c660
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/6c37c660
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/6c37c660

Branch: refs/heads/wicket-6.x
Commit: 6c37c6604b6358b6a9d836770445744ed2b51293
Parents: 8808dd8
Author: Igor Vaynberg 
Authored: Tue Nov 26 08:16:39 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Nov 26 08:16:39 2013 -0800

--
 .../apache/wicket/markup/html/form/AutoFormLabelPickupTest.java  | 4 ++--
 .../apache/wicket/markup/html/form/AutoLabelWithContentTest.java | 4 ++--
 .../wicket/markup/html/form/AutoLabelWithinEnclosureTest.java| 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/6c37c660/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
index b47f570..caa592b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
@@ -65,14 +65,14 @@ public class AutoFormLabelPickupTest extends WicketTestCase
public void labelIsPrintedFromModel() throws Exception
{
tester.startPage(new PrintLabelPage(Model.of("label from 
model")));
-   tester.assertContains("\\|label from model\\|");
+   tester.assertContains("\\|label from model\\|");
}
 
@Test
public void labelIsPrintedFromProperties() throws Exception
{
tester.startPage(new PrintLabelPage(Model.of((String)null)));
-   tester.assertContains("\\|label from properties\\|");
+   tester.assertContains("\\|label from properties\\|");
}
 
@Test

http://git-wip-us.apache.org/repos/asf/wicket/blob/6c37c660/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
index 303fa83..1f66dcc 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithContentTest.java
@@ -45,7 +45,7 @@ public class AutoLabelWithContentTest extends WicketTestCase
public void labelWithMessage() throws Exception
{
tester.startPage(LabelWithMessagePage.class);
-   tester.assertContains("my test 
text");
+   tester.assertContains("my test 
text");
}
 
public static class LabelWithNestedComponentsPage extends WebPage
@@ -62,6 +62,6 @@ public class AutoLabelWithContentTest extends WicketTestCase
public void labelWithNestedComponent()
{
tester.startPage(LabelWithNestedComponentsPage.class);
-   tester.assertContains("");
+   tester.assertContains("");
}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/6c37c660/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
index 5429900..ed4c5d9 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoLabelWithinEnclosureTest.java
@@ -46,7 +46,7 @@ public class AutoLabelWithinEnclosureTest extends 
WicketTestCase
{
tester.startPage(new LabelWithinEnclosurePage(true));
tester.dumpPage();
-   tester.assertContains("blabla");
+   tester.assertContains("blabla");
}
 
@Test



git commit: tweak for WICKET-5411

2013-11-26 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 4a5d1220e -> 8808dd8f2


tweak for WICKET-5411


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8808dd8f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8808dd8f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8808dd8f

Branch: refs/heads/wicket-6.x
Commit: 8808dd8f20bfed844ba9ea8c6ab57f24cd2c53c9
Parents: 4a5d122
Author: Igor Vaynberg 
Authored: Tue Nov 26 08:03:31 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Nov 26 08:03:39 2013 -0800

--
 .../org/apache/wicket/markup/html/form/AutoLabelResolver.java| 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/8808dd8f/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index bab2b9e..ecbe9c2 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -292,6 +292,9 @@ public class AutoLabelResolver implements IComponentResolver
{
super(id);
component = fc;
+   
+   setMarkupId(getLabelIdFor(component));
+   setOutputMarkupId(true);
}
 
@Override
@@ -299,7 +302,6 @@ public class AutoLabelResolver implements IComponentResolver
{
super.onComponentTag(tag);
tag.put("for", component.getMarkupId());
-   tag.put("id", getLabelIdFor(component));
 
if (component instanceof FormComponent)
{



git commit: tweak for WICKET-5411

2013-11-26 Thread ivaynberg
Updated Branches:
  refs/heads/master 4a02776fe -> 62a1a94f8


tweak for WICKET-5411


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/62a1a94f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/62a1a94f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/62a1a94f

Branch: refs/heads/master
Commit: 62a1a94f854eb2e2ecba06092b77ee2668529ff3
Parents: 4a02776
Author: Igor Vaynberg 
Authored: Tue Nov 26 08:03:31 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Nov 26 08:04:00 2013 -0800

--
 .../org/apache/wicket/markup/html/form/AutoLabelResolver.java| 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/62a1a94f/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index 481d025..eb31871 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -292,6 +292,9 @@ public class AutoLabelResolver implements IComponentResolver
{
super(id);
component = fc;
+   
+   setMarkupId(getLabelIdFor(component));
+   setOutputMarkupId(true);
}
 
@Override
@@ -299,7 +302,6 @@ public class AutoLabelResolver implements IComponentResolver
{
super.onComponentTag(tag);
tag.put("for", component.getMarkupId());
-   tag.put("id", getLabelIdFor(component));
 
if (component instanceof FormComponent)
{



[3/3] git commit: WICKET-5418 properly handle groups in NonNull constraint

2013-11-15 Thread ivaynberg
WICKET-5418 properly handle groups in NonNull constraint


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e350f19e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e350f19e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e350f19e

Branch: refs/heads/master
Commit: e350f19ef60835c527e87579eb4eb035bcc8994c
Parents: cfd506f
Author: Igor Vaynberg 
Authored: Fri Nov 15 15:41:43 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 15:42:54 2013 -0800

--
 .../wicket-bean-validation/pom.xml  |   6 +
 .../bean/validation/PropertyValidator.java  |  72 ++--
 .../validation/SessionLocaleInterpolator.java   |   8 +-
 .../wicket/bean/validation/SizeTagModifier.java |   4 +-
 .../PropertyValidatorRequiredTest.java  | 185 +++
 5 files changed, 255 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e350f19e/wicket-experimental/wicket-bean-validation/pom.xml
--
diff --git a/wicket-experimental/wicket-bean-validation/pom.xml 
b/wicket-experimental/wicket-bean-validation/pom.xml
index ae13d9f..9322886 100644
--- a/wicket-experimental/wicket-bean-validation/pom.xml
+++ b/wicket-experimental/wicket-bean-validation/pom.xml
@@ -25,5 +25,11 @@
org.apache.wicket
wicket-core

+   
+   org.hibernate
+   hibernate-validator
+   4.3.1.Final
+   test
+   

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/e350f19e/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index 032a818..e8e6376 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -1,6 +1,10 @@
 package org.apache.wicket.bean.validation;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -62,8 +66,8 @@ public class PropertyValidator extends Behavior implements 
IValidator
private final IModel[]> groups_;
 
/**
-* A flag that indicates whether {@linkplain 
#setComponentRequiredFlag()}
-* has been called for this behavior.
+* A flag that indicates whether {@linkplain 
#setComponentRequiredFlag()} has been called for
+* this behavior.
 */
private boolean requiredFlagSet;
 
@@ -132,8 +136,10 @@ public class PropertyValidator extends Behavior 
implements IValidator
" can only be added to FormComponents");
}
 
-   // TODO add a validation key that appends the type so we can 
have different messages for
-   // @Size on String vs Collection - done but need to add a key 
for each superclass/interface
+   // TODO add a validation key that appends the type so we can 
have
+   // different messages for
+   // @Size on String vs Collection - done but need to add a key 
for each
+   // superclass/interface
 
this.component = (FormComponent)component;
}
@@ -144,10 +150,15 @@ public class PropertyValidator extends Behavior 
implements IValidator
super.onConfigure(component);
if (requiredFlagSet == false)
{
-   // "Required" flag is calculated upon component's model 
property, so we must ensure,
-   // that model object is accessible (i.e. component is 
already added in a page).
+   // "Required" flag is calculated upon component's model 
property, so
+   // we must ensure,
+   // that model object is accessible (i.e. component is 
already added
+   // in a page).
requiredFlagSet = true;
-   setComponentRequiredFlag();
+   if (isRequired())
+   {
+   this.component.setRequired(true);
+   }
}
}
 
@@ 

[2/3] git commit: Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull constraint"

2013-11-15 Thread ivaynberg
Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull 
constraint"

This reverts commit 49922cdd5ccba3b97c59106d3aea769b8468962e.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/cfd506ff
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/cfd506ff
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/cfd506ff

Branch: refs/heads/master
Commit: cfd506ff7521cd9b1c28f1346ec85ecb9797e1f9
Parents: e35a93b
Author: Igor Vaynberg 
Authored: Fri Nov 15 15:31:19 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 15:42:47 2013 -0800

--
 .../wicket-bean-validation/pom.xml  |   6 -
 .../bean/validation/PropertyValidator.java  | 212 +--
 .../PropertyValidatorRequiredTest.java  | 196 -
 3 files changed, 96 insertions(+), 318 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/cfd506ff/wicket-experimental/wicket-bean-validation/pom.xml
--
diff --git a/wicket-experimental/wicket-bean-validation/pom.xml 
b/wicket-experimental/wicket-bean-validation/pom.xml
index 9322886..ae13d9f 100644
--- a/wicket-experimental/wicket-bean-validation/pom.xml
+++ b/wicket-experimental/wicket-bean-validation/pom.xml
@@ -25,11 +25,5 @@
org.apache.wicket
wicket-core

-   
-   org.hibernate
-   hibernate-validator
-   4.3.1.Final
-   test
-   

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/cfd506ff/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index 93bd4c4..032a818 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -1,10 +1,6 @@
 package org.apache.wicket.bean.validation;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -22,43 +18,40 @@ import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
 
 /**
- * Validator that delegates to the bean validation framework. The integration
- * has to be first configured using {@link BeanValidationConfiguration}.
+ * Validator that delegates to the bean validation framework. The integration 
has to be first
+ * configured using {@link BeanValidationConfiguration}.
  * 
  * 
- * The validator must be provided a {@link Property}, unless one can be 
resolved
- * from the component implicitly. By default the configuration contains the
- * {@link DefaultPropertyResolver} so {@link PropertyModel}s are supported out
- * of the box - when attached to a component with a property model the property
- * does not need to be specified explicitly.
+ * The validator must be provided a {@link Property}, unless one can be 
resolved from the component
+ * implicitly. By default the configuration contains the {@link 
DefaultPropertyResolver} so
+ * {@link PropertyModel}s are supported out of the box - when attached to a 
component with a
+ * property model the property does not need to be specified explicitly.
  * 
  * 
  * 
- * The validator will set the required flag on the form component it is 
attached
- * to based on the presence of the @NotNull annotation. Notice, the required
- * flag will only be set to {@code true}, components with the required flag
- * already set to {@code true} will not have the flag set to {@code false} by
- * this validator.
+ * The validator will set the required flag on the form component it is 
attached to based on the
+ * presence of the @NotNull annotation. Notice, the required flag will only be 
set to {@code true},
+ * components with the required flag already set to {@code true} will not have 
the flag set to
+ * {@code false} by this validator.
  * 
  * 
  * 
- * The validator will allow {@link ITagModifier}s configured in
- * {@link BeanValidationConfiguration} to mutate the markup tag of the 
component
- * it is attached to.
+ * The validator will allow {@link ITagModifier}s configured in {@link 
BeanValidationConfiguration}
+ * to mutate the marku

[1/3] git commit: Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull constraint"

2013-11-15 Thread ivaynberg
Updated Branches:
  refs/heads/master 3fb956713 -> e350f19ef


Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull 
constraint"

This reverts commit 7bd677ff843fdfece3963e303faaf901aa5ec04b.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e35a93b9
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e35a93b9
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e35a93b9

Branch: refs/heads/master
Commit: e35a93b9950b570daf1f3b21c86f7c657a5f8c71
Parents: 3fb9567
Author: Igor Vaynberg 
Authored: Fri Nov 15 15:30:57 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 15:42:35 2013 -0800

--
 .../wicket/bean/validation/PropertyValidatorRequiredTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e35a93b9/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
index 450fa6b..e5ee0cc 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
 
 public class PropertyValidatorRequiredTest {
@Rule
-   public WicketTesterScope scope = new WicketTesterScope() {
+   public static WicketTesterScope scope = new WicketTesterScope() {
protected WicketTester create() {
return new WicketTester(new TestApplication());
};



[2/3] git commit: Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull constraint"

2013-11-15 Thread ivaynberg
Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull 
constraint"

This reverts commit 49922cdd5ccba3b97c59106d3aea769b8468962e.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/77065e75
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/77065e75
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/77065e75

Branch: refs/heads/wicket-6.x
Commit: 77065e7556a189d5804ed422c13e3ae644988512
Parents: bb416f1
Author: Igor Vaynberg 
Authored: Fri Nov 15 15:31:19 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 15:31:19 2013 -0800

--
 .../wicket-bean-validation/pom.xml  |   6 -
 .../bean/validation/PropertyValidator.java  | 212 +--
 .../PropertyValidatorRequiredTest.java  | 196 -
 3 files changed, 96 insertions(+), 318 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/77065e75/wicket-experimental/wicket-bean-validation/pom.xml
--
diff --git a/wicket-experimental/wicket-bean-validation/pom.xml 
b/wicket-experimental/wicket-bean-validation/pom.xml
index 460e7fc..9f3895c 100644
--- a/wicket-experimental/wicket-bean-validation/pom.xml
+++ b/wicket-experimental/wicket-bean-validation/pom.xml
@@ -25,11 +25,5 @@
org.apache.wicket
wicket-core

-   
-   org.hibernate
-   hibernate-validator
-   4.3.1.Final
-   test
-   

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/77065e75/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index 93bd4c4..032a818 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -1,10 +1,6 @@
 package org.apache.wicket.bean.validation;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -22,43 +18,40 @@ import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
 
 /**
- * Validator that delegates to the bean validation framework. The integration
- * has to be first configured using {@link BeanValidationConfiguration}.
+ * Validator that delegates to the bean validation framework. The integration 
has to be first
+ * configured using {@link BeanValidationConfiguration}.
  * 
  * 
- * The validator must be provided a {@link Property}, unless one can be 
resolved
- * from the component implicitly. By default the configuration contains the
- * {@link DefaultPropertyResolver} so {@link PropertyModel}s are supported out
- * of the box - when attached to a component with a property model the property
- * does not need to be specified explicitly.
+ * The validator must be provided a {@link Property}, unless one can be 
resolved from the component
+ * implicitly. By default the configuration contains the {@link 
DefaultPropertyResolver} so
+ * {@link PropertyModel}s are supported out of the box - when attached to a 
component with a
+ * property model the property does not need to be specified explicitly.
  * 
  * 
  * 
- * The validator will set the required flag on the form component it is 
attached
- * to based on the presence of the @NotNull annotation. Notice, the required
- * flag will only be set to {@code true}, components with the required flag
- * already set to {@code true} will not have the flag set to {@code false} by
- * this validator.
+ * The validator will set the required flag on the form component it is 
attached to based on the
+ * presence of the @NotNull annotation. Notice, the required flag will only be 
set to {@code true},
+ * components with the required flag already set to {@code true} will not have 
the flag set to
+ * {@code false} by this validator.
  * 
  * 
  * 
- * The validator will allow {@link ITagModifier}s configured in
- * {@link BeanValidationConfiguration} to mutate the markup tag of the 
component
- * it is attached to.
+ * The validator will allow {@link ITagModifier}s configured in {@link 
BeanValidationConfiguration}
+ * to mutate the m

[1/3] git commit: Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull constraint"

2013-11-15 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 7bd677ff8 -> 9eb670b5a


Revert due to bad formatting "WICKET-5418 properly handle groups in NonNull 
constraint"

This reverts commit 7bd677ff843fdfece3963e303faaf901aa5ec04b.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/bb416f1a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/bb416f1a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/bb416f1a

Branch: refs/heads/wicket-6.x
Commit: bb416f1a05db1bb7fd9c2b113be8a6dd126dc1a2
Parents: 7bd677f
Author: Igor Vaynberg 
Authored: Fri Nov 15 15:30:57 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 15:30:57 2013 -0800

--
 .../wicket/bean/validation/PropertyValidatorRequiredTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/bb416f1a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
index 450fa6b..e5ee0cc 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
 
 public class PropertyValidatorRequiredTest {
@Rule
-   public WicketTesterScope scope = new WicketTesterScope() {
+   public static WicketTesterScope scope = new WicketTesterScope() {
protected WicketTester create() {
return new WicketTester(new TestApplication());
};



[3/3] git commit: WICKET-5418 properly handle groups in NonNull constraint

2013-11-15 Thread ivaynberg
WICKET-5418 properly handle groups in NonNull constraint


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9eb670b5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9eb670b5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9eb670b5

Branch: refs/heads/wicket-6.x
Commit: 9eb670b5ad0d04e0a942db660b89befc0935f6ea
Parents: 77065e7
Author: Igor Vaynberg 
Authored: Fri Nov 15 15:41:43 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 15:41:43 2013 -0800

--
 .../wicket-bean-validation/pom.xml  |   6 +
 .../bean/validation/PropertyValidator.java  |  72 ++--
 .../validation/SessionLocaleInterpolator.java   |   8 +-
 .../wicket/bean/validation/SizeTagModifier.java |   4 +-
 .../PropertyValidatorRequiredTest.java  | 185 +++
 5 files changed, 255 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9eb670b5/wicket-experimental/wicket-bean-validation/pom.xml
--
diff --git a/wicket-experimental/wicket-bean-validation/pom.xml 
b/wicket-experimental/wicket-bean-validation/pom.xml
index 9f3895c..460e7fc 100644
--- a/wicket-experimental/wicket-bean-validation/pom.xml
+++ b/wicket-experimental/wicket-bean-validation/pom.xml
@@ -25,5 +25,11 @@
org.apache.wicket
wicket-core

+   
+   org.hibernate
+   hibernate-validator
+   4.3.1.Final
+   test
+   

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/9eb670b5/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index 032a818..e8e6376 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -1,6 +1,10 @@
 package org.apache.wicket.bean.validation;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -62,8 +66,8 @@ public class PropertyValidator extends Behavior implements 
IValidator
private final IModel[]> groups_;
 
/**
-* A flag that indicates whether {@linkplain 
#setComponentRequiredFlag()}
-* has been called for this behavior.
+* A flag that indicates whether {@linkplain 
#setComponentRequiredFlag()} has been called for
+* this behavior.
 */
private boolean requiredFlagSet;
 
@@ -132,8 +136,10 @@ public class PropertyValidator extends Behavior 
implements IValidator
" can only be added to FormComponents");
}
 
-   // TODO add a validation key that appends the type so we can 
have different messages for
-   // @Size on String vs Collection - done but need to add a key 
for each superclass/interface
+   // TODO add a validation key that appends the type so we can 
have
+   // different messages for
+   // @Size on String vs Collection - done but need to add a key 
for each
+   // superclass/interface
 
this.component = (FormComponent)component;
}
@@ -144,10 +150,15 @@ public class PropertyValidator extends Behavior 
implements IValidator
super.onConfigure(component);
if (requiredFlagSet == false)
{
-   // "Required" flag is calculated upon component's model 
property, so we must ensure,
-   // that model object is accessible (i.e. component is 
already added in a page).
+   // "Required" flag is calculated upon component's model 
property, so
+   // we must ensure,
+   // that model object is accessible (i.e. component is 
already added
+   // in a page).
requiredFlagSet = true;
-   setComponentRequiredFlag();
+   if (isRequired())
+   {
+   this.component.setRequired(true);
+   }
}
}
 

git commit: WICKET-5418 properly handle groups in NonNull constraint

2013-11-15 Thread ivaynberg
Updated Branches:
  refs/heads/master 53fe8d59d -> 3fb956713


WICKET-5418 properly handle groups in NonNull constraint


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3fb95671
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3fb95671
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3fb95671

Branch: refs/heads/master
Commit: 3fb956713b0bf664d3e8809f0e31e33ce9a6ca3c
Parents: 53fe8d5
Author: Igor Vaynberg 
Authored: Fri Nov 15 12:38:17 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 12:42:40 2013 -0800

--
 .../wicket/bean/validation/PropertyValidatorRequiredTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3fb95671/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
index e5ee0cc..450fa6b 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
 
 public class PropertyValidatorRequiredTest {
@Rule
-   public static WicketTesterScope scope = new WicketTesterScope() {
+   public WicketTesterScope scope = new WicketTesterScope() {
protected WicketTester create() {
return new WicketTester(new TestApplication());
};



git commit: WICKET-5418 properly handle groups in NonNull constraint

2013-11-15 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 49922cdd5 -> 7bd677ff8


WICKET-5418 properly handle groups in NonNull constraint


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7bd677ff
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7bd677ff
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7bd677ff

Branch: refs/heads/wicket-6.x
Commit: 7bd677ff843fdfece3963e303faaf901aa5ec04b
Parents: 49922cd
Author: Igor Vaynberg 
Authored: Fri Nov 15 12:38:17 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 12:38:17 2013 -0800

--
 .../wicket/bean/validation/PropertyValidatorRequiredTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7bd677ff/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
index e5ee0cc..450fa6b 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
@@ -21,7 +21,7 @@ import org.junit.Test;
 
 public class PropertyValidatorRequiredTest {
@Rule
-   public static WicketTesterScope scope = new WicketTesterScope() {
+   public WicketTesterScope scope = new WicketTesterScope() {
protected WicketTester create() {
return new WicketTester(new TestApplication());
};



git commit: WICKET-5418 properly handle groups in NonNull constraint

2013-11-15 Thread ivaynberg
Updated Branches:
  refs/heads/master 87fa630f2 -> 53fe8d59d


WICKET-5418 properly handle groups in NonNull constraint


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/53fe8d59
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/53fe8d59
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/53fe8d59

Branch: refs/heads/master
Commit: 53fe8d59d0bdbf676377c559245ac3f829562eb9
Parents: 87fa630
Author: Igor Vaynberg 
Authored: Fri Nov 15 12:30:22 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 12:31:03 2013 -0800

--
 .../wicket-bean-validation/pom.xml  |   6 +
 .../bean/validation/PropertyValidator.java  | 212 ++-
 .../PropertyValidatorRequiredTest.java  | 196 +
 3 files changed, 318 insertions(+), 96 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/53fe8d59/wicket-experimental/wicket-bean-validation/pom.xml
--
diff --git a/wicket-experimental/wicket-bean-validation/pom.xml 
b/wicket-experimental/wicket-bean-validation/pom.xml
index ae13d9f..9322886 100644
--- a/wicket-experimental/wicket-bean-validation/pom.xml
+++ b/wicket-experimental/wicket-bean-validation/pom.xml
@@ -25,5 +25,11 @@
org.apache.wicket
wicket-core

+   
+   org.hibernate
+   hibernate-validator
+   4.3.1.Final
+   test
+   

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/53fe8d59/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index 032a818..93bd4c4 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -1,6 +1,10 @@
 package org.apache.wicket.bean.validation;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -18,40 +22,43 @@ import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
 
 /**
- * Validator that delegates to the bean validation framework. The integration 
has to be first
- * configured using {@link BeanValidationConfiguration}.
+ * Validator that delegates to the bean validation framework. The integration
+ * has to be first configured using {@link BeanValidationConfiguration}.
  * 
  * 
- * The validator must be provided a {@link Property}, unless one can be 
resolved from the component
- * implicitly. By default the configuration contains the {@link 
DefaultPropertyResolver} so
- * {@link PropertyModel}s are supported out of the box - when attached to a 
component with a
- * property model the property does not need to be specified explicitly.
+ * The validator must be provided a {@link Property}, unless one can be 
resolved
+ * from the component implicitly. By default the configuration contains the
+ * {@link DefaultPropertyResolver} so {@link PropertyModel}s are supported out
+ * of the box - when attached to a component with a property model the property
+ * does not need to be specified explicitly.
  * 
  * 
  * 
- * The validator will set the required flag on the form component it is 
attached to based on the
- * presence of the @NotNull annotation. Notice, the required flag will only be 
set to {@code true},
- * components with the required flag already set to {@code true} will not have 
the flag set to
- * {@code false} by this validator.
+ * The validator will set the required flag on the form component it is 
attached
+ * to based on the presence of the @NotNull annotation. Notice, the required
+ * flag will only be set to {@code true}, components with the required flag
+ * already set to {@code true} will not have the flag set to {@code false} by
+ * this validator.
  * 
  * 
  * 
- * The validator will allow {@link ITagModifier}s configured in {@link 
BeanValidationConfiguration}
- * to mutate the markup tag of the component it is attached to.
+ * The validator will allow {@link ITagModifier}s configured in
+ * {@link BeanValidationConfiguration} to mutate the markup tag of the 
component
+ * it is att

git commit: WICKET-5418 properly handle groups in NonNull constraint

2013-11-15 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 4bb19a48f -> 49922cdd5


WICKET-5418 properly handle groups in NonNull constraint


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/49922cdd
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/49922cdd
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/49922cdd

Branch: refs/heads/wicket-6.x
Commit: 49922cdd5ccba3b97c59106d3aea769b8468962e
Parents: 4bb19a4
Author: Igor Vaynberg 
Authored: Fri Nov 15 12:30:22 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 15 12:30:34 2013 -0800

--
 .../wicket-bean-validation/pom.xml  |   6 +
 .../bean/validation/PropertyValidator.java  | 212 ++-
 .../PropertyValidatorRequiredTest.java  | 196 +
 3 files changed, 318 insertions(+), 96 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/49922cdd/wicket-experimental/wicket-bean-validation/pom.xml
--
diff --git a/wicket-experimental/wicket-bean-validation/pom.xml 
b/wicket-experimental/wicket-bean-validation/pom.xml
index 9f3895c..460e7fc 100644
--- a/wicket-experimental/wicket-bean-validation/pom.xml
+++ b/wicket-experimental/wicket-bean-validation/pom.xml
@@ -25,5 +25,11 @@
org.apache.wicket
wicket-core

+   
+   org.hibernate
+   hibernate-validator
+   4.3.1.Final
+   test
+   

 

http://git-wip-us.apache.org/repos/asf/wicket/blob/49922cdd/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index 032a818..93bd4c4 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -1,6 +1,10 @@
 package org.apache.wicket.bean.validation;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -18,40 +22,43 @@ import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
 
 /**
- * Validator that delegates to the bean validation framework. The integration 
has to be first
- * configured using {@link BeanValidationConfiguration}.
+ * Validator that delegates to the bean validation framework. The integration
+ * has to be first configured using {@link BeanValidationConfiguration}.
  * 
  * 
- * The validator must be provided a {@link Property}, unless one can be 
resolved from the component
- * implicitly. By default the configuration contains the {@link 
DefaultPropertyResolver} so
- * {@link PropertyModel}s are supported out of the box - when attached to a 
component with a
- * property model the property does not need to be specified explicitly.
+ * The validator must be provided a {@link Property}, unless one can be 
resolved
+ * from the component implicitly. By default the configuration contains the
+ * {@link DefaultPropertyResolver} so {@link PropertyModel}s are supported out
+ * of the box - when attached to a component with a property model the property
+ * does not need to be specified explicitly.
  * 
  * 
  * 
- * The validator will set the required flag on the form component it is 
attached to based on the
- * presence of the @NotNull annotation. Notice, the required flag will only be 
set to {@code true},
- * components with the required flag already set to {@code true} will not have 
the flag set to
- * {@code false} by this validator.
+ * The validator will set the required flag on the form component it is 
attached
+ * to based on the presence of the @NotNull annotation. Notice, the required
+ * flag will only be set to {@code true}, components with the required flag
+ * already set to {@code true} will not have the flag set to {@code false} by
+ * this validator.
  * 
  * 
  * 
- * The validator will allow {@link ITagModifier}s configured in {@link 
BeanValidationConfiguration}
- * to mutate the markup tag of the component it is attached to.
+ * The validator will allow {@link ITagModifier}s configured in
+ * {@link BeanValidationConfiguration} to mutate the markup tag of the 
component
+ * i

git commit: WICKET-5411 fix css keys

2013-11-12 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 7c25bf2b3 -> f168587a9


WICKET-5411 fix css keys


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f168587a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f168587a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f168587a

Branch: refs/heads/wicket-6.x
Commit: f168587a92309cb8e822f43c05238abd883a04a0
Parents: 7c25bf2
Author: Igor Vaynberg 
Authored: Tue Nov 12 10:31:49 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Nov 12 10:34:15 2013 -0800

--
 .../org/apache/wicket/markup/html/form/AutoLabelResolver.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f168587a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index 8906249..bab2b9e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -72,9 +72,9 @@ public class AutoLabelResolver implements IComponentResolver
 
static final String WICKET_FOR = ":for";
 
-   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
-   public static final String CSS_DISABLED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
-   public static final String CSS_ERROR_KEY = 
CssUtils.key(AutoLabel.class, "requried");
+   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabel.class, "required");
+   public static final String CSS_DISABLED_KEY = 
CssUtils.key(AutoLabel.class, "disabled");
+   public static final String CSS_ERROR_KEY = 
CssUtils.key(AutoLabel.class, "error");
private static final String CSS_DISABLED_DEFAULT = "disabled";
private static final String CSS_REQUIRED_DEFAULT = "required";
private static final String CSS_ERROR_DEFAULT = "error";



git commit: WICKET-5411 fix css keys

2013-11-12 Thread ivaynberg
Updated Branches:
  refs/heads/master 813c022d7 -> 71c4b71bc


WICKET-5411 fix css keys


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/71c4b71b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/71c4b71b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/71c4b71b

Branch: refs/heads/master
Commit: 71c4b71bcb93991e8675e1016557d6d908b096ac
Parents: 813c022
Author: Igor Vaynberg 
Authored: Tue Nov 12 10:31:49 2013 -0800
Committer: Igor Vaynberg 
Committed: Tue Nov 12 10:31:49 2013 -0800

--
 .../org/apache/wicket/markup/html/form/AutoLabelResolver.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/71c4b71b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index e7ea89e..481d025 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -72,9 +72,9 @@ public class AutoLabelResolver implements IComponentResolver
 
static final String WICKET_FOR = ":for";
 
-   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
-   public static final String CSS_DISABLED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
-   public static final String CSS_ERROR_KEY = 
CssUtils.key(AutoLabel.class, "requried");
+   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabel.class, "required");
+   public static final String CSS_DISABLED_KEY = 
CssUtils.key(AutoLabel.class, "disabled");
+   public static final String CSS_ERROR_KEY = 
CssUtils.key(AutoLabel.class, "error");
private static final String CSS_DISABLED_DEFAULT = "disabled";
private static final String CSS_REQUIRED_DEFAULT = "required";
private static final String CSS_ERROR_DEFAULT = "error";



git commit: WICKET-5411 auto label auto update during ajax

2013-11-08 Thread ivaynberg
Updated Branches:
  refs/heads/master ad06b208b -> 048489860


WICKET-5411 auto label auto update during ajax


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/04848986
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/04848986
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/04848986

Branch: refs/heads/master
Commit: 0484898603fb5cb726aa11caa6c7346a67faa5ed
Parents: ad06b20
Author: Igor Vaynberg 
Authored: Fri Nov 8 22:48:22 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 8 23:10:54 2013 -0800

--
 .../form/AjaxFormComponentUpdatingBehavior.java |   2 +-
 .../markup/html/form/AutoLabelResolver.java | 131 +--
 .../apache/wicket/markup/html/form/Form.java|  24 +++-
 .../wicket/markup/html/form/FormComponent.java  |  29 +++-
 .../wicket/protocol/http/WebApplication.java|  36 +++--
 .../html/form/AutoFormLabelPickupTest.java  |   4 +-
 .../html/form/AutoLabelWithContentTest.java |   4 +-
 .../html/form/AutoLabelWithinEnclosureTest.java |   2 +-
 8 files changed, 194 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/04848986/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
index 2d6cf0e..934604b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
@@ -161,8 +161,8 @@ public abstract class AjaxFormComponentUpdatingBehavior 
extends AjaxEventBehavio
catch (RuntimeException e)
{
onError(target, e);
-
}
+   formComponent.updateAutoLabels(target);
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/04848986/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index 723bb83..cc0f1cc 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -16,9 +16,13 @@
  */
 package org.apache.wicket.markup.html.form;
 
+import java.io.Serializable;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.MetaDataKey;
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.core.util.string.CssUtils;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupStream;
@@ -37,11 +41,14 @@ import org.slf4j.LoggerFactory;
  * Outputs the {@code for} attribute with the value equivalent to the 
markup id of the
  * referenced form component
  * Appends {@code required} css class to the {@code } tag if the 
referenced form
- * component is required
+ * component is required. Name of the css class can be overwritten by having a 
i18n property defined
+ * for key AutoLabel.CSS.required
  * Appends {@code error} css class to the {@code } tag if the 
referenced form component
- * has failed validation
+ * has failed validation. Name of the css class can be overwritten by having a 
i18n property defined
+ * for key AutoLabel.CSS.error
  * Appends {@code disabled} css class to the {@code } tag if the 
referenced form
- * component has is not enabled in hierarchy
+ * component has is not enabled in hierarchy. Name of the css class can be 
overwritten by having a i18n property defined
+ * for key AutoLabel.CSS.disabled
  * 
  * 
  * 
@@ -63,13 +70,15 @@ public class AutoLabelResolver implements IComponentResolver
 
private static final Logger logger = 
LoggerFactory.getLogger(AutoLabelResolver.class);
 
-   public static final String REQUIRED_CSS_CLASS_KEY = 
CssUtils.key(AutoLabel.class, "required");
-
-   public static final String INVALID_CSS_CLASS_KEY = 
CssUtils.key(AutoLabel.class, "invalid");
+   static final String WICKET_FOR = ":for";
 
-   public static final String DISABLED_CSS_CLASS_KEY = 
CssUtils.key(AutoLabel.class, "disabled");
+   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
+   public static final String CSS_DISABLED_KEY = 

git commit: WICKET-5411 auto label - realign css property names to 7.0 and fix tests

2013-11-08 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x a73209bea -> 92a5bdbdb


WICKET-5411 auto label - realign css property names to 7.0 and fix tests


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/92a5bdbd
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/92a5bdbd
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/92a5bdbd

Branch: refs/heads/wicket-6.x
Commit: 92a5bdbdb7aaa7e6e0c0bd8aab42a33d174a3e81
Parents: a73209b
Author: Igor Vaynberg 
Authored: Fri Nov 8 23:04:35 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 8 23:04:35 2013 -0800

--
 .../wicket/markup/html/form/AutoLabelResolver.java  | 12 ++--
 .../markup/html/form/AutoFormLabelPickupTest.java   |  4 ++--
 .../markup/html/form/AutoLabelWithContentTest.java  |  4 ++--
 .../markup/html/form/AutoLabelWithinEnclosureTest.java  |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/92a5bdbd/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index 7892fa7..5811d2e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -42,13 +42,13 @@ import org.slf4j.LoggerFactory;
  * referenced form component
  * Appends {@code required} css class to the {@code } tag if the 
referenced form
  * component is required. Name of the css class can be overwritten by having a 
i18n property defined
- * for key AutoLabelResolver.CSS.required
+ * for key AutoLabel.CSS.required
  * Appends {@code error} css class to the {@code } tag if the 
referenced form component
  * has failed validation. Name of the css class can be overwritten by having a 
i18n property defined
- * for key AutoLabelResolver.CSS.error
+ * for key AutoLabel.CSS.error
  * Appends {@code disabled} css class to the {@code } tag if the 
referenced form
  * component has is not enabled in hierarchy. Name of the css class can be 
overwritten by having a i18n property defined
- * for key AutoLabelResolver.CSS.disabled
+ * for key AutoLabel.CSS.disabled
  * 
  * 
  * 
@@ -72,9 +72,9 @@ public class AutoLabelResolver implements IComponentResolver
 
static final String WICKET_FOR = ":for";
 
-   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabelResolver.class, "requried");
-   public static final String CSS_DISABLED_KEY = 
CssUtils.key(AutoLabelResolver.class, "requried");
-   public static final String CSS_ERROR_KEY = 
CssUtils.key(AutoLabelResolver.class, "requried");
+   public static final String CSS_REQUIRED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
+   public static final String CSS_DISABLED_KEY = 
CssUtils.key(AutoLabel.class, "requried");
+   public static final String CSS_ERROR_KEY = 
CssUtils.key(AutoLabel.class, "requried");
private static final String CSS_DISABLED_DEFAULT = "disabled";
private static final String CSS_REQUIRED_DEFAULT = "required";
private static final String CSS_ERROR_DEFAULT = "error";

http://git-wip-us.apache.org/repos/asf/wicket/blob/92a5bdbd/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
index beb3b32..b47f570 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/AutoFormLabelPickupTest.java
@@ -65,14 +65,14 @@ public class AutoFormLabelPickupTest extends WicketTestCase
public void labelIsPrintedFromModel() throws Exception
{
tester.startPage(new PrintLabelPage(Model.of("label from 
model")));
-   tester.assertContains("\\|label from model\\|");
+   tester.assertContains("\\|label from model\\|");
}
 
@Test
public void labelIsPrintedFromProperties() throws Exception
{
tester.startPage(new PrintLabelPage(Model.of((String)null)));
-   tester.assertContains("\\|label from properties\\|");
+   tester.assertContains("\\|label from properties\\|");
}
 
@Test

http://git-wip-us.apache.org/repos/asf/wicket/blob/92a5bdbd/wicket-c

git commit: WICKET-5411 auto label auto update during ajax

2013-11-08 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 4e9a83fdc -> a73209bea


WICKET-5411 auto label auto update during ajax


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a73209be
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a73209be
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a73209be

Branch: refs/heads/wicket-6.x
Commit: a73209beab8814a06f2e085384ad87bdf1fda212
Parents: 4e9a83f
Author: Igor Vaynberg 
Authored: Fri Nov 8 22:48:22 2013 -0800
Committer: Igor Vaynberg 
Committed: Fri Nov 8 22:48:22 2013 -0800

--
 .../form/AjaxFormComponentUpdatingBehavior.java |   2 +-
 .../wicket/core/util/string/CssUtils.java   |  14 ++
 .../markup/html/form/AutoLabelResolver.java | 130 ++-
 .../apache/wicket/markup/html/form/Form.java|  24 +++-
 .../wicket/markup/html/form/FormComponent.java  |  34 -
 .../wicket/protocol/http/WebApplication.java|  36 +++--
 6 files changed, 212 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a73209be/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
index 7eab478..bd8267c 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
@@ -160,8 +160,8 @@ public abstract class AjaxFormComponentUpdatingBehavior 
extends AjaxEventBehavio
catch (RuntimeException e)
{
onError(target, e);
-
}
+   formComponent.updateAutoLabels(target);
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/a73209be/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
index a4944a3..7de8669 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
@@ -103,4 +103,18 @@ public final class CssUtils
}
response.write(" />");
}
+   
+   /**
+* Get a standardized key for a CSS class.
+* 
+* @param scope
+*scope of CSS class
+* @param facet
+*facet of CSS class
+* @return CSS key
+*/
+   public static String key(Class scope, String facet)
+   {
+   return scope.getSimpleName() + ".CSS." + facet;
+   }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/a73209be/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
index 562e6ed..7892fa7 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java
@@ -16,9 +16,14 @@
  */
 package org.apache.wicket.markup.html.form;
 
+import java.io.Serializable;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.MetaDataKey;
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.core.util.string.CssUtils;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.markup.html.TransparentWebMarkupContainer;
@@ -36,11 +41,14 @@ import org.slf4j.LoggerFactory;
  * Outputs the {@code for} attribute with the value equivalent to the 
markup id of the
  * referenced form component
  * Appends {@code required} css class to the {@code } tag if the 
referenced form
- * component is required
+ * component is required. Name of the css class can be overwritten by having a 
i18n property defined
+ * for key AutoLabelResolver.CSS.required
  * Appends {@code error} css class to the {@code } tag if the 
referenced form component
- * has failed validation
+ * has failed validation. Name of the css class can be overwritten by having a 
i

git commit: WICKET-5224 Revert "WICKET-4948 fix vertical centering of modals in safari" seems to work fine now

2013-07-26 Thread ivaynberg
Updated Branches:
  refs/heads/master 977f1e246 -> 0cecd7fdf


WICKET-5224 Revert "WICKET-4948 fix vertical centering of modals in safari"
seems to work fine now

This reverts commit 3bd454b10271aeabdb6be7e2559eafce92e4ac1e.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0cecd7fd
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0cecd7fd
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0cecd7fd

Branch: refs/heads/master
Commit: 0cecd7fdfa449240f39aaa991c5f6c3046bc3c53
Parents: 977f1e2
Author: Igor Vaynberg 
Authored: Fri Jul 26 22:08:49 2013 -0700
Committer: Igor Vaynberg 
Committed: Fri Jul 26 22:08:49 2013 -0700

--
 .../wicket/extensions/ajax/markup/html/modal/res/modal.js  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0cecd7fd/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 13fb6d0..b2b3878 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -119,7 +119,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -137,7 +137,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -479,7 +479,7 @@
var scTop = 0;
var scLeft = 0;
 
-   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() 
|| Wicket.Browser.isSafari()) {
+   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
scLeft = Wicket.Window.getScrollX();
scTop = Wicket.Window.getScrollY();
}



git commit: Revert "WICKET-4948 fix vertical centering of modals in safari" safari seems to work fine now. WICKET-5224

2013-07-26 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x 8a42a36a1 -> 8fda26e51


Revert "WICKET-4948 fix vertical centering of modals in safari" safari seems to 
work fine now. WICKET-5224

This reverts commit 3bd454b10271aeabdb6be7e2559eafce92e4ac1e.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8fda26e5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8fda26e5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8fda26e5

Branch: refs/heads/wicket-6.x
Commit: 8fda26e515f83540ead654d997a5ffd8844ee839
Parents: 8a42a36
Author: Igor Vaynberg 
Authored: Fri Jul 26 22:07:23 2013 -0700
Committer: Igor Vaynberg 
Committed: Fri Jul 26 22:08:00 2013 -0700

--
 .../wicket/extensions/ajax/markup/html/modal/res/modal.js  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/8fda26e5/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 52279d7..69e3160 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -119,7 +119,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -137,7 +137,7 @@
 
var dx = 0;
var dy = 0;
-   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+   if (Wicket.Browser.isIE() || 
Wicket.Browser.isGecko()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -483,7 +483,7 @@
var scTop = 0;
var scLeft = 0;
 
-   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() 
|| Wicket.Browser.isSafari()) {
+   if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
scLeft = Wicket.Window.getScrollX();
scTop = Wicket.Window.getScrollY();
}



git commit: added setter for validator provider to configuration

2013-07-19 Thread ivaynberg
Updated Branches:
  refs/heads/master 11c2d1fbb -> 442932d4e


added setter for validator provider to configuration


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/442932d4
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/442932d4
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/442932d4

Branch: refs/heads/master
Commit: 442932d4e4c5cc27940bc2ef956cb24c1ba54df0
Parents: 11c2d1f
Author: Igor Vaynberg 
Authored: Fri Jul 19 08:13:35 2013 -0700
Committer: Igor Vaynberg 
Committed: Fri Jul 19 08:15:41 2013 -0700

--
 .../bean/validation/BeanValidationConfiguration.java   | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/442932d4/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
index be0752c..a3f0bb2 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
@@ -98,6 +98,19 @@ public class BeanValidationConfiguration implements 
BeanValidationContext
}
 
/**
+* Sets the provider used to retrieve {@link Validator} instances
+* 
+* @param validatorProvider
+*/
+   public void setValidatorProvider(IProvider validatorProvider)
+   {
+   Args.notNull(validatorProvider, "validatorProvider");
+
+   this.validatorProvider = validatorProvider;
+   }
+
+
+   /**
 * Binds this configuration to the application instance
 * 
 * @param application



git commit: added setter for validator provider to configuration

2013-07-19 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x f270102ff -> 6600a9fd7


added setter for validator provider to configuration


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/6600a9fd
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/6600a9fd
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/6600a9fd

Branch: refs/heads/wicket-6.x
Commit: 6600a9fd729fff4f4b6a5f1b35bbe2adbab9d57e
Parents: f270102
Author: Igor Vaynberg 
Authored: Fri Jul 19 08:13:35 2013 -0700
Committer: Igor Vaynberg 
Committed: Fri Jul 19 08:13:47 2013 -0700

--
 .../bean/validation/BeanValidationConfiguration.java   | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/6600a9fd/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
index 8de367c..ee9c407 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/BeanValidationConfiguration.java
@@ -98,6 +98,19 @@ public class BeanValidationConfiguration implements 
BeanValidationContext
}
 
/**
+* Sets the provider used to retrieve {@link Validator} instances
+* 
+* @param validatorProvider
+*/
+   public void setValidatorProvider(IProvider validatorProvider)
+   {
+   Args.notNull(validatorProvider, "validatorProvider");
+
+   this.validatorProvider = validatorProvider;
+   }
+
+
+   /**
 * Binds this configuration to the application instance
 * 
 * @param application



git commit: fix archetype version in master

2013-07-12 Thread ivaynberg
Updated Branches:
  refs/heads/master d4bbaf2c8 -> 0ec6c8ebe


fix archetype version in master


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0ec6c8eb
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0ec6c8eb
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0ec6c8eb

Branch: refs/heads/master
Commit: 0ec6c8ebe6c8aa1c483112549a82fbb65d725aab
Parents: d4bbaf2
Author: Igor Vaynberg 
Authored: Fri Jul 12 12:03:48 2013 -0700
Committer: Igor Vaynberg 
Committed: Fri Jul 12 12:03:56 2013 -0700

--
 .../quickstart/src/main/resources/archetype-resources/pom.xml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0ec6c8eb/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
--
diff --git 
a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml 
b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index b53742e..594c990 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -42,7 +42,7 @@



-   6.8.0-SNAPSHOT
+   7.0.0-SNAPSHOT
8.1.11.v20130520
1.7.5

UTF-8



svn commit: r1500856 - /wicket/common/site/trunk/_config.yml

2013-07-08 Thread ivaynberg
Author: ivaynberg
Date: Mon Jul  8 17:39:07 2013
New Revision: 1500856

URL: http://svn.apache.org/r1500856
Log:
fix 7.0 archetype version

Modified:
wicket/common/site/trunk/_config.yml

Modified: wicket/common/site/trunk/_config.yml
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_config.yml?rev=1500856&r1=1500855&r2=1500856&view=diff
==
--- wicket/common/site/trunk/_config.yml (original)
+++ wicket/common/site/trunk/_config.yml Mon Jul  8 17:39:07 2013
@@ -17,4 +17,4 @@ wicket:
   version_15: 1.5.10
   version_14: 1.4.22
   released:   2013-05-17
-  versions:   [6.9.0, 1.5.10, 1.4.22, 1.5-SNAPSHOT, 6.10.0-SNAPSHOT, 
7.0-SNAPSHOT]
+  versions:   [6.9.0, 1.5.10, 1.4.22, 1.5-SNAPSHOT, 6.10.0-SNAPSHOT, 
7.0.0-SNAPSHOT]




git commit: make ModelIteratorAdapter a bit friendlier

2013-05-09 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-6.x a8873e5b0 -> 78ae24ea6


make ModelIteratorAdapter a bit friendlier


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/78ae24ea
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/78ae24ea
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/78ae24ea

Branch: refs/heads/wicket-6.x
Commit: 78ae24ea64972ed17aa01050aa14ca99af4c8a58
Parents: a8873e5
Author: Igor Vaynberg 
Authored: Thu May 9 16:57:15 2013 -0700
Committer: Igor Vaynberg 
Committed: Thu May 9 16:57:46 2013 -0700

--
 .../markup/repeater/util/ModelIteratorAdapter.java |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/78ae24ea/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
index 0c9531c..6c255a8 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
@@ -20,6 +20,7 @@ import java.util.Iterator;
 
 import org.apache.wicket.markup.repeater.RefreshingView;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.lang.Args;
 
 
 /**
@@ -37,6 +38,19 @@ public abstract class ModelIteratorAdapter implements 
Iterator>
/**
 * Constructor
 * 
+* @param iterable
+*iterable whose iterator will be wrapped
+*/
+   public ModelIteratorAdapter(Iterable iterable)
+   {
+   Args.notNull(iterable, "iterable");
+   this.delegate = iterable.iterator();
+   }
+
+
+   /**
+* Constructor
+* 
 * @param delegate
 *iterator that will be wrapped
 */



git commit: make ModelIteratorAdapter a bit friendlier

2013-05-09 Thread ivaynberg
Updated Branches:
  refs/heads/master bc00a9001 -> f1fdc1c95


make ModelIteratorAdapter a bit friendlier


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f1fdc1c9
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f1fdc1c9
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f1fdc1c9

Branch: refs/heads/master
Commit: f1fdc1c95ca76ffc1d74148a93e4b35bb3eeb90c
Parents: bc00a90
Author: Igor Vaynberg 
Authored: Thu May 9 16:57:15 2013 -0700
Committer: Igor Vaynberg 
Committed: Thu May 9 16:57:27 2013 -0700

--
 .../markup/repeater/util/ModelIteratorAdapter.java |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f1fdc1c9/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
index 0c9531c..6c255a8 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/util/ModelIteratorAdapter.java
@@ -20,6 +20,7 @@ import java.util.Iterator;
 
 import org.apache.wicket.markup.repeater.RefreshingView;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.lang.Args;
 
 
 /**
@@ -37,6 +38,19 @@ public abstract class ModelIteratorAdapter implements 
Iterator>
/**
 * Constructor
 * 
+* @param iterable
+*iterable whose iterator will be wrapped
+*/
+   public ModelIteratorAdapter(Iterable iterable)
+   {
+   Args.notNull(iterable, "iterable");
+   this.delegate = iterable.iterator();
+   }
+
+
+   /**
+* Constructor
+* 
 * @param delegate
 *iterator that will be wrapped
 */



git commit: WICKET-5138

2013-04-08 Thread ivaynberg
Updated Branches:
  refs/heads/master f98cc63e1 -> e8dab4a01


WICKET-5138


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e8dab4a0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e8dab4a0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e8dab4a0

Branch: refs/heads/master
Commit: e8dab4a0112d2cf84b381fe37cbb48b6c0bcf310
Parents: f98cc63
Author: Igor Vaynberg 
Authored: Mon Apr 8 10:35:07 2013 -0700
Committer: Igor Vaynberg 
Committed: Mon Apr 8 10:35:07 2013 -0700

--
 .../apache/wicket/protocol/http/WicketFilter.java  |   28 +++--
 .../wicket/protocol/http/WicketFilterTest.java |   82 ++-
 2 files changed, 94 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e8dab4a0/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
index eb73ee7..be577f3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
@@ -96,8 +96,8 @@ public class WicketFilter implements Filter
private boolean isServlet = false;
 
/**
-* default constructor, usually invoked through the servlet 
-* container by the web.xml configuration
+* default constructor, usually invoked through the servlet container 
by the web.xml
+* configuration
 */
public WicketFilter()
{
@@ -106,11 +106,11 @@ public class WicketFilter implements Filter
/**
 * constructor supporting programmatic setup of the filter
 * 
-*  this can be useful for programmatically creating and appending the 
-*  wicket filter to the servlet context using servlet 3 features.
+* this can be useful for programmatically creating and appending the 
wicket filter to the
+* servlet context using servlet 3 features.
 * 
 * @param application
-*   web application
+*web application
 */
public WicketFilter(WebApplication application)
{
@@ -174,7 +174,7 @@ public class WicketFilter implements Filter
return false;
}
 
-   if ("OPTIONS".equals(httpServletRequest.getMethod()))
+   if 
("OPTIONS".equalsIgnoreCase(httpServletRequest.getMethod()))
{
// handle the OPTIONS request outside of normal 
request processing.
// wicket pages normally only support GET and 
POST methods, but resources and
@@ -198,7 +198,8 @@ public class WicketFilter implements Filter
httpServletResponse);
 
RequestCycle requestCycle = 
application.createRequestCycle(webRequest, webResponse);
-   res = processRequestCycle(requestCycle, 
webResponse, httpServletRequest, httpServletResponse, chain);
+   res = processRequestCycle(requestCycle, 
webResponse, httpServletRequest,
+   httpServletResponse, chain);
}
else
{
@@ -238,7 +239,7 @@ public class WicketFilter implements Filter
 
/**
 * Process the request cycle
-*
+* 
 * @param requestCycle
 * @param webResponse
 * @param httpServletRequest
@@ -249,8 +250,9 @@ public class WicketFilter implements Filter
 * @throws ServletException
 */
protected boolean processRequestCycle(RequestCycle requestCycle, 
WebResponse webResponse,
-   HttpServletRequest httpServletRequest, HttpServletResponse 
httpServletResponse,
-   final FilterChain chain) throws IOException, ServletException {
+   HttpServletRequest httpServletRequest, HttpServletResponse 
httpServletResponse,
+   final FilterChain chain) throws IOException, ServletException
+   {
// Assume we are able to handle the request
boolean res = true;
 
@@ -518,6 +520,7 @@ public class WicketFilter implements Filter
 
/**
 * Provide a standard getter for filterPath.
+* 
 * @return The configured filterPath.
 */
protected String getFilterPath()
@@ -651,7 +654,8 @@ public class WicketFilter implements Filter
if (this.filterPath != null)
{
   

git commit: WICKET-5138

2013-04-08 Thread ivaynberg
Updated Branches:
  refs/heads/master 4b7367ef2 -> f98cc63e1


WICKET-5138


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f98cc63e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f98cc63e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f98cc63e

Branch: refs/heads/master
Commit: f98cc63e108e23bf281e1350846b0f8da7d7f8bb
Parents: 4b7367e
Author: Igor Vaynberg 
Authored: Mon Apr 8 10:23:16 2013 -0700
Committer: Igor Vaynberg 
Committed: Mon Apr 8 10:23:23 2013 -0700

--
 .../apache/wicket/protocol/http/WicketFilter.java  |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f98cc63e/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
index 291bb30..eb73ee7 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
@@ -174,6 +174,19 @@ public class WicketFilter implements Filter
return false;
}
 
+   if ("OPTIONS".equals(httpServletRequest.getMethod()))
+   {
+   // handle the OPTIONS request outside of normal 
request processing.
+   // wicket pages normally only support GET and 
POST methods, but resources and
+   // special pages acting like REST clients can 
also support other methods, so
+   // we include them all.
+   
httpServletResponse.setStatus(HttpServletResponse.SC_OK);
+   httpServletResponse.setHeader("Allow",
+   
"GET,POST,OPTIONS,PUT,HEAD,PATCH,DELETE,TRACE");
+   httpServletResponse.setHeader("Content-Length", 
"0");
+   return true;
+   }
+
String redirectURL = 
checkIfRedirectRequired(httpServletRequest);
if (redirectURL == null)
{



git commit: ignore license header in beans.xml

2013-04-01 Thread ivaynberg
Updated Branches:
  refs/heads/master d461b729e -> 0aabf6694


ignore license header in beans.xml


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0aabf669
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0aabf669
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0aabf669

Branch: refs/heads/master
Commit: 0aabf6694d113e6645f699f291555d850a1a986e
Parents: d461b72
Author: Igor Vaynberg 
Authored: Mon Apr 1 13:41:57 2013 -0700
Committer: Igor Vaynberg 
Committed: Mon Apr 1 13:41:57 2013 -0700

--
 .../apache/wicket/cdi/ApacheLicenceHeaderTest.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0aabf669/wicket-cdi/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
--
diff --git 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
index eeb2c21..92efb73 100644
--- 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
+++ 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
@@ -34,7 +34,7 @@ public class ApacheLicenceHeaderTest extends 
ApacheLicenseHeaderTestCase
public ApacheLicenceHeaderTest()
{
xmlIgnore.add(".settings");
-
+   xmlIgnore.add("src/main/resources/META-INF/beans.xml");
xmlPrologIgnore = Arrays.asList("src");
}
 }



  1   2   3   4   5   6   7   8   9   10   >