git commit: Reformat /pom.xml after bf118fbf67ab4d8f39aba57ddca746390eb07b8a

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master f7fd90f6f -> 30c728a98


Reformat /pom.xml after bf118fbf67ab4d8f39aba57ddca746390eb07b8a


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

Branch: refs/heads/master
Commit: 30c728a98b3b858478edaf703f00abe2eaa7e2d2
Parents: f7fd90f
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 09:03:33 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 09:03:33 2014 +0200

--
 pom.xml | 304 +--
 1 file changed, 152 insertions(+), 152 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/30c728a9/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 765080a..e3f40f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,8 +85,8 @@

scm:git:http://git-wip-us.apache.org/repos/asf/wicket.git

scm:git:https://git-wip-us.apache.org/repos/asf/wicket.git

http://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git
-HEAD
-
+   HEAD
+   

wicket
wicket-core
@@ -111,59 +111,59 @@
wicket-native-websocket
wicket-bean-validation
wicket-cdi-1.1
-
-
-UTF-8
-1.7
-0.7.1.201405082137
-8.1.16.v20140903
-9.0.7.v20131107
-4.1.0.RELEASE
-3.0.1
-2.9.1
-2.17
-1.9.5
-1.7.7
-1.3
-
+   
+   
+   
UTF-8
+   1.7
+   0.7.1.201405082137
+   8.1.16.v20140903
+   9.0.7.v20131107
+   4.1.0.RELEASE
+   3.0.1
+   2.9.1
+   2.17
+   1.9.5
+   1.7.7
+   1.3
+   


-   
-   com.google.code.findbugs
-   jsr305
-   3.0.0
-   provided
-   
-   
-   javax.el
-   javax.el-api
-   3.0.1-b04
-   provided
-   
+   
+   com.google.code.findbugs
+   jsr305
+   3.0.0
+   provided
+   
+   
+   javax.el
+   javax.el-api
+   3.0.1-b04
+   provided
+   

javax.servlet
javax.servlet-api
${servlet-api.version}
provided

-   
-   javax.servlet.jsp
-   javax.servlet.jsp-api
-   provided
-   2.3.2-b01
-   
-   
-   javax.validation
-   validation-api
-   1.1.0.Final
+   
+   javax.servlet.jsp
+   javax.servlet.jsp-api
+   provided
+   2.3.2-b01
+   
+   
+   javax.validation
+   validation-api
+   1.1.0.Final
+   provided
+   
+   
+   javax.websocket
+   javax.websocket-api
+   1.0
provided
-   
-   
-   javax.websocket
-   javax.websocket-api
-   1.0
-provided
-   
+   

mx4j
mx4j
@@ -182,44 +182,44 @@
cglib
3.1

-
+   

-   org.ow2.asm
-   asm
+   org.ow2.asm
+   

[jira] [Commented] (WICKET-5649) Create Eclipse lifecycle mapping for clirr-maven-plugin.

2014-09-22 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14142965#comment-14142965
 ] 

Martin Grigorov commented on WICKET-5649:
-

[~dashorst] improved it with 
http://git-wip-us.apache.org/repos/asf/wicket/commit/b3f08626
He is an Eclipse user, has tested it and he says it works :-)

Please don't hesitate to report if there are more problems!

> Create Eclipse lifecycle mapping for clirr-maven-plugin.
> 
>
> Key: WICKET-5649
> URL: https://issues.apache.org/jira/browse/WICKET-5649
> Project: Wicket
>  Issue Type: Task
>  Components: wicket
>Reporter: Garret Wilson
>Assignee: Martin Grigorov
>Priority: Minor
> Fix For: 7.0.0-M3
>
> Attachments: fix-WICKET-5649.patch
>
>
> On the 7.x development stream on {{master}}, the parent POM includes the 
> [Clirr Maven Plugin|http://mojo.codehaus.org/clirr-maven-plugin/], although 
> it is "Disabled until 7.0" according to the comments.
> There is no Eclipse 4.4 plugin on the marketplace for handling 
> {{clirr-maven-plugin}}, so unless the plugin is explicitly set to be ignored 
> or executed, Eclipse will find build errors in the project.
> The simplest approach for the time being would be to add an Eclipse lifecycle 
> mapping to the parent POM, indicating that Eclipse should ignore the plugin 
> (as it is disabled anyway, even in a normal Maven build outside of Eclipse).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


svn commit: r1626678 - in /wicket/common/site/trunk: _posts/2014-09-15-cve-2014-3526.md _posts/2014-09-22-cve-2014-3526.md _site/2014/09/15/wicket-1.5.12-released.html _site/2014/09/22/ _site/2014/09/

2014-09-22 Thread mgrigorov
Author: mgrigorov
Date: Mon Sep 22 07:27:26 2014
New Revision: 1626678

URL: http://svn.apache.org/r1626678
Log:
Add announcement for CVE 2014-3526


Added:
wicket/common/site/trunk/_posts/2014-09-22-cve-2014-3526.md
  - copied unchanged from r1626677, 
wicket/common/site/trunk/_posts/2014-09-15-cve-2014-3526.md
wicket/common/site/trunk/_site/2014/09/22/
wicket/common/site/trunk/_site/2014/09/22/cve-2014-3526.html
Removed:
wicket/common/site/trunk/_posts/2014-09-15-cve-2014-3526.md
Modified:
wicket/common/site/trunk/_site/2014/09/15/wicket-1.5.12-released.html
wicket/common/site/trunk/_site/atom.xml
wicket/common/site/trunk/_site/index.html

Modified: wicket/common/site/trunk/_site/2014/09/15/wicket-1.5.12-released.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/2014/09/15/wicket-1.5.12-released.html?rev=1626678&r1=1626677&r2=1626678&view=diff
==
--- wicket/common/site/trunk/_site/2014/09/15/wicket-1.5.12-released.html 
(original)
+++ wicket/common/site/trunk/_site/2014/09/15/wicket-1.5.12-released.html Mon 
Sep 22 07:27:26 2014
@@ -95,7 +95,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5


http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4

Added: wicket/common/site/trunk/_site/2014/09/22/cve-2014-3526.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/2014/09/22/cve-2014-3526.html?rev=1626678&view=auto
==
--- wicket/common/site/trunk/_site/2014/09/22/cve-2014-3526.html (added)
+++ wicket/common/site/trunk/_site/2014/09/22/cve-2014-3526.html Mon Sep 22 
07:27:26 2014
@@ -0,0 +1,225 @@
+
+
+
+Apache Wicket - CVE-2014-3526 - Apache Wicket Information 
disclosure vulnerability
+
+   
+
+
+
+   
+   
+
+
+
+
+Apache 
Wicket
+   
+   Meet Wicket
+   
+   
+   Home
+   
+   
+   Introduction
+   
+   
+   Features
+   
+   
+   Buzz
+   
+   
+   Vision
+   
+   
+   Blogs
+   
+   
+   
+   Get Started
+   
+   
+   
+   Download Wicket
+   
+   
+   Quickstart
+   
+   
+   http://www.jweekend.com/dev/LegUp"; 
rel="nofollow">More archetypes
+   
+   
+   Get help
+   
+   
+   Mailing Lists
+   
+   
+   
+   Learn
+   
+   
+   
+   User 
Guide
+   
+   
+   Examples
+   
+   
+   http://www.wicket-library.com/wicket-examples/compref/";>Components
+   
+   
+   Projects
+   
+   
+   https://cwiki.apache.org/confluence/display/WICKET";>Wiki
+   
+   
+   https://cwiki.apache.org/confluence/display/WICKET/Reference+library";>Reference
 guide
+   
+   
+   Books
+   
+   
+   IDEs
+   
+   
+   
+   Releases
+   
+   
+   
+   http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17
+   
+   
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   
+   
+   http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4
+   
+   
+   http://www.apache.org/dyn/closer.cgi/wicket/1.3.7";>Wicket 1.3
+   
+   
+   http://wicket.sf.net/wicket-1.2"; 
class="external-link" rel="nofollow">Wicket 1.2
+   
+   
+   http://wicket.sf.net/wicket-1.1"; 
class="external-link" rel="nofollow">Wicket 1.1
+   
+   
+   http://wicket.sf.net/wicket-1.0"; 
class="external-link" rel="nofollow">Wicket 1.0
+   
+   
+   
+   API Docs
+   
+   
+   
+   

[jira] [Commented] (WICKET-5704) IllegalArgument exception with wicket:child in ajaxrequest

2014-09-22 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14142996#comment-14142996
 ] 

Martin Grigorov commented on WICKET-5704:
-

Thanks for the report!
A quickstart would help a lot!
It seems the initialization of org.apache.wicket.markup.MarkupFragment#size is 
wrong for some reason.

> IllegalArgument exception with wicket:child in ajaxrequest
> --
>
> Key: WICKET-5704
> URL: https://issues.apache.org/jira/browse/WICKET-5704
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.16.0, 6.17.0
>Reporter: Ted Roeloffzen
>
> We have a page in our application with a DataView.
> In this DataView we have an anonymous inner class of a component which has a 
> wicket:child-tag.
> When there is ajaxrequest, in our case because we want to go to the next page 
> in our dataview, an exception is thrown.
> java.lang.IllegalArgumentException: Argument 'streamOffset' must have a value 
> within [0,0], but was 1
> at org.apache.wicket.util.lang.Args.withinRange(Args.java:120)
> at 
> org.apache.wicket.markup.AbstractMarkupFragment.find(AbstractMarkupFragment.java:43)
> at 
> org.apache.wicket.markup.MarkupFragment.find(MarkupFragment.java:150)
> at 
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.getMarkup(DefaultMarkupSourcingStrategy.java:94)
> at 
> org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451)
> at 
> org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy$1.component(AbstractMarkupSourcingStrategy.java:72)
> at 
> org.apache.wicket.markup.html.panel.AbstractMarkupSourcingStrategy$1.component(AbstractMarkupSourcingStrategy.java:66)
> I have the feeling that is caused by the fix in the following jira-issue
> https://issues.apache.org/jira/browse/WICKET-5580
> When we remove the wicket:child-tag completely, there is no problem.
> When we change the anonymous inner class, to a nested class and give it an 
> html-file with wicket:extend-tags without anything between them, it also 
> works.
> I believe that the fix for WICKET-5580, failed to take in account subclasses 
> of components that don't need to add markup and therefor don't have their own 
> HTML-file.
> I hope I can get around to making a quickstart testcase for this in the next 
> couple of days



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5692.
-
Resolution: Incomplete

Please provide a patch and we will reopen the ticket.
I cannot see the whole picture from your description.

Additionally org.apache.wicket.model.AbstractPropertyModel#propertyExpression() 
has 'protected' visibility. I believe this issue is not a good enough reason to 
make it 'public'.

> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Priority: Minor
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143000#comment-14143000
 ] 

Martin Grigorov edited comment on WICKET-5692 at 9/22/14 8:01 AM:
--

Please provide a patch and we will reopen the ticket.
I cannot see the whole picture from your description.


was (Author: mgrigorov):
Please provide a patch and we will reopen the ticket.
I cannot see the whole picture from your description.

Additionally org.apache.wicket.model.AbstractPropertyModel#propertyExpression() 
has 'protected' visibility. I believe this issue is not a good enough reason to 
make it 'public'.

> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Priority: Minor
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/5] git commit: Minor non-functional improvements

2014-09-22 Thread mgrigorov
Minor non-functional improvements

Remove useless "@see parent" javadoc
Simplify String concatenation
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/0ce7be03
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0ce7be03
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0ce7be03

Branch: refs/heads/master
Commit: 0ce7be0382c9c8113afb2827e633e23fdfad1eb3
Parents: 79c0118
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 10:01:48 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:01:48 2014 +0200

--
 .../java/org/apache/wicket/model/PropertyModel.java  | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0ce7be03/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java 
b/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
index 01d3d18..37a42b6 100644
--- a/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/model/PropertyModel.java
@@ -103,20 +103,12 @@ public class PropertyModel extends 
AbstractPropertyModel
this.expression = expression;
}
 
-   /**
-* @see java.lang.Object#toString()
-*/
@Override
public String toString()
{
-   StringBuilder sb = new StringBuilder(super.toString());
-   sb.append(":expression=[").append(expression).append("]");
-   return sb.toString();
+   return super.toString() + ":expression=[" + expression + ']';
}
 
-   /**
-* @see AbstractPropertyModel#propertyExpression()
-*/
@Override
protected String propertyExpression()
{
@@ -127,6 +119,7 @@ public class PropertyModel extends 
AbstractPropertyModel
 * Type-infering factory method
 * 
 * @param 
+*the of the resolved object from the property
 * @param parent
 *object that contains the property
 * @param property
@@ -135,6 +128,6 @@ public class PropertyModel extends 
AbstractPropertyModel
 */
public static  PropertyModel of(Object parent, String property)
{
-   return new PropertyModel(parent, property);
+   return new PropertyModel<>(parent, property);
}
-}
\ No newline at end of file
+}



[3/5] git commit: Fix javadoc link

2014-09-22 Thread mgrigorov
Fix javadoc link


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

Branch: refs/heads/master
Commit: a3de74a9c7b2df211d3c3064b23d00385af3d5e3
Parents: 0ce7be0
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 10:05:21 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:22:23 2014 +0200

--
 .../org/apache/wicket/application/AbstractClassResolver.java | 4 ++--
 .../java/org/apache/wicket/application/DefaultClassResolver.java | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a3de74a9/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
index e2a4997..248cd8c 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
@@ -33,7 +33,7 @@ import 
org.apache.wicket.util.collections.UrlExternalFormComparator;
  * An abstract implementation of a {@link IClassResolver} which uses a {@link 
ClassLoader} for
  * resolving classes.
  * 
- * @see org.apache.wicket.settings.IApplicationSettings#getClassResolver()
+ * @see org.apache.wicket.settings.ApplicationSettings#getClassResolver()
  * 
  * @author Juergen Donnerstag
  * @author Jonathan Locke
@@ -160,4 +160,4 @@ public abstract class AbstractClassResolver implements 
IClassResolver
}
}
}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/a3de74a9/wicket-core/src/main/java/org/apache/wicket/application/DefaultClassResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/DefaultClassResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/DefaultClassResolver.java
index eb9fe7d..9dafe2a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/application/DefaultClassResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/DefaultClassResolver.java
@@ -19,7 +19,7 @@ package org.apache.wicket.application;
 /**
  * Resolves a class by using the classloader that loaded this class.
  * 
- * @see org.apache.wicket.settings.IApplicationSettings#getClassResolver()
+ * @see org.apache.wicket.settings.ApplicationSettings#getClassResolver()
  * 
  * @author Juergen Donnerstag
  * @author Jonathan Locke



[5/5] git commit: Simplify by using "switch (String)"

2014-09-22 Thread mgrigorov
Simplify by using "switch (String)"


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

Branch: refs/heads/master
Commit: ad1b70e2fae5a8eb808dbb0fd27caf48ea0710be
Parents: 279cf5c
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 10:10:51 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:22:23 2014 +0200

--
 .../application/AbstractClassResolver.java  | 78 +---
 1 file changed, 36 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ad1b70e2/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
index 2cbc34b..de8a9b3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
@@ -67,51 +67,45 @@ public abstract class AbstractClassResolver implements 
IClassResolver
}
if (clazz == null)
{
-   if (className.equals("byte"))
+   switch (className)
{
-   clazz = byte.class;
-   }
-   else if (className.equals("short"))
-   {
-   clazz = short.class;
-   }
-   else if (className.equals("int"))
-   {
-   clazz = int.class;
-   }
-   else if (className.equals("long"))
-   {
-   clazz = long.class;
-   }
-   else if (className.equals("float"))
-   {
-   clazz = float.class;
-   }
-   else if (className.equals("double"))
-   {
-   clazz = double.class;
-   }
-   else if (className.equals("boolean"))
-   {
-   clazz = boolean.class;
-   }
-   else if (className.equals("char"))
-   {
-   clazz = char.class;
-   }
-   else
-   {
-   // synchronize on the only class member to load 
only one class at a time and
-   // prevent LinkageError. See above for more info
-   synchronized (classes)
-   {
-   clazz = Class.forName(className, false, 
getClassLoader());
-   if (clazz == null)
+   case "byte":
+   clazz = byte.class;
+   break;
+   case "short":
+   clazz = short.class;
+   break;
+   case "int":
+   clazz = int.class;
+   break;
+   case "long":
+   clazz = long.class;
+   break;
+   case "float":
+   clazz = float.class;
+   break;
+   case "double":
+   clazz = double.class;
+   break;
+   case "boolean":
+   clazz = boolean.class;
+   break;
+   case "char":
+   clazz = char.class;
+   break;
+   default:
+   // synchronize on the only class member 
to load only one class at a time and
+   // prevent LinkageError. See above for 
more info
+   synchronized (classes)
 

[1/5] git commit: Fix outdated javadoc for PropertyValidator#requiredFlagSet member field

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master 30c728a98 -> ad1b70e2f


Fix outdated javadoc for PropertyValidator#requiredFlagSet member field


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

Branch: refs/heads/master
Commit: 79c0118b141530bb362e3cb848d79c2f86957604
Parents: 30c728a
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 09:51:24 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 09:51:24 2014 +0200

--
 .../java/org/apache/wicket/bean/validation/PropertyValidator.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/79c0118b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index a2486c7..ea1976a 100644
--- 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -67,8 +67,7 @@ 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 indicating whether the component has been configured at least 
once.
 */
private boolean requiredFlagSet;
 



[4/5] git commit: Java 7 diamonds

2014-09-22 Thread mgrigorov
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/279cf5ce
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/279cf5ce
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/279cf5ce

Branch: refs/heads/master
Commit: 279cf5cee1d284b041f34783fd3d31649919d46d
Parents: a3de74a
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 10:09:34 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:22:23 2014 +0200

--
 .../org/apache/wicket/application/AbstractClassResolver.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/279cf5ce/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
index 248cd8c..2cbc34b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/application/AbstractClassResolver.java
@@ -51,7 +51,7 @@ public abstract class AbstractClassResolver implements 
IClassResolver
 * 
 * This problem has gone since we synchronize the access.
 */
-   private final ConcurrentMap>> classes = 
new ConcurrentHashMap>>();
+   private final ConcurrentMap>> classes = 
new ConcurrentHashMap<>();
 
@Override
public final Class resolveClass(final String className) throws 
ClassNotFoundException
@@ -120,7 +120,7 @@ public abstract class AbstractClassResolver implements 
IClassResolver
@Override
public Iterator getResources(final String name)
{
-   Set resultSet = new TreeSet(new 
UrlExternalFormComparator());
+   Set resultSet = new TreeSet<>(new 
UrlExternalFormComparator());
 
try
{



[jira] [Assigned] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reassigned WICKET-5698:
---

Assignee: Martin Grigorov

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


git commit: WICKET-5698 WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master ad1b70e2f -> f45ce896d


WICKET-5698 WebApplication#unmount() unmounts the whole compound mapper if some 
of its inner ones matches


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

Branch: refs/heads/master
Commit: f45ce896d02aeda3c09d56bc4ceac425929973a1
Parents: ad1b70e
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 10:38:14 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:38:14 2014 +0200

--
 .../request/mapper/CompoundRequestMapper.java   |  7 +++-
 .../mapper/CompoundRequestMapperTest.java   | 35 ++--
 2 files changed, 38 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f45ce896/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
index bbd6277..94635b3 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
@@ -251,7 +251,12 @@ public class CompoundRequestMapper implements 
ICompoundRequestMapper
 
for (IRequestMapper mapper : this)
{
-   if (mapper.mapRequest(request) != null)
+   if (mapper instanceof ICompoundRequestMapper)
+   {
+   ICompoundRequestMapper inner = 
(ICompoundRequestMapper) mapper;
+   inner.unmount(path);
+   }
+   else if (mapper.mapRequest(request) != null)
{
remove(mapper);
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/f45ce896/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
--
diff --git 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
index a169dfc..93a281e 100644
--- 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
+++ 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
@@ -35,9 +35,6 @@ public class CompoundRequestMapperTest extends Assert
private static final String MOUNT_PATH_2 = "mount/path/2";
private static final String MOUNT_PATH_1 = "mount/path/1";
 
-   /**
-* 
-*/
@Test
public void unmount()
{
@@ -62,6 +59,38 @@ public class CompoundRequestMapperTest extends Assert

compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_3))) instanceof 
EmptyRequestHandler);
}
 
+   /**
+* https://issues.apache.org/jira/browse/WICKET-5698
+*/
+   @Test
+   public void unmountNested()
+   {
+   CompoundRequestMapper compound = new CompoundRequestMapper();
+
+   CompoundRequestMapper nestedCompound = new 
CompoundRequestMapper();
+   compound.add(nestedCompound);
+
+   nestedCompound.add(new MountMapper(MOUNT_PATH_1, new 
EmptyRequestHandler()));
+   nestedCompound.add(new MountMapper(MOUNT_PATH_2, new 
EmptyRequestHandler()));
+   nestedCompound.add(new MountMapper(MOUNT_PATH_3, new 
EmptyRequestHandler()));
+
+   assertEquals(1, compound.size());
+   assertEquals(3, nestedCompound.size());
+
+   compound.unmount(MOUNT_PATH_2);
+   assertEquals(1, compound.size());
+   assertEquals(2, nestedCompound.size());
+
+   assertTrue(
+   "Mount path 1 should match",
+   
compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_1))) instanceof 
EmptyRequestHandler);
+   assertNull("Mount path 2 should not match",
+   
compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_2;
+   assertTrue(
+   "Mount path 3 should match",
+   
compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_3))) ins

[jira] [Commented] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143021#comment-14143021
 ] 

ASF subversion and git services commented on WICKET-5698:
-

Commit f45ce896d02aeda3c09d56bc4ceac425929973a1 in wicket's branch 
refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=f45ce89 ]

WICKET-5698 WebApplication#unmount() unmounts the whole compound mapper if some 
of its inner ones matches


> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5698.
-
   Resolution: Fixed
Fix Version/s: 7.0.0-M4
   6.18.0

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


git commit: WICKET-5698 WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 482c595f5 -> 6b906d53a


WICKET-5698 WebApplication#unmount() unmounts the whole compound mapper if some 
of its inner ones matches

(cherry picked from commit f45ce896d02aeda3c09d56bc4ceac425929973a1)


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

Branch: refs/heads/wicket-6.x
Commit: 6b906d53a917257454cc5f10c5b1d91b321ce8ed
Parents: 482c595
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 10:38:14 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:41:33 2014 +0200

--
 .../request/mapper/CompoundRequestMapper.java   |  7 +++-
 .../mapper/CompoundRequestMapperTest.java   | 35 ++--
 2 files changed, 38 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/6b906d53/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
index 13785e3..c950279 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java
@@ -251,7 +251,12 @@ public class CompoundRequestMapper implements 
ICompoundRequestMapper
 
for (IRequestMapper mapper : this)
{
-   if (mapper.mapRequest(request) != null)
+   if (mapper instanceof ICompoundRequestMapper)
+   {
+   ICompoundRequestMapper inner = 
(ICompoundRequestMapper) mapper;
+   inner.unmount(path);
+   }
+   else if (mapper.mapRequest(request) != null)
{
remove(mapper);
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/6b906d53/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
--
diff --git 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
index 0277d01..e449362 100644
--- 
a/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
+++ 
b/wicket-request/src/test/java/org/apache/wicket/request/mapper/CompoundRequestMapperTest.java
@@ -33,9 +33,6 @@ public class CompoundRequestMapperTest extends Assert
private static final String MOUNT_PATH_2 = "mount/path/2";
private static final String MOUNT_PATH_1 = "mount/path/1";
 
-   /**
-* 
-*/
@Test
public void unmount()
{
@@ -61,6 +58,38 @@ public class CompoundRequestMapperTest extends Assert
}
 
/**
+* https://issues.apache.org/jira/browse/WICKET-5698
+*/
+   @Test
+   public void unmountNested()
+   {
+   CompoundRequestMapper compound = new CompoundRequestMapper();
+
+   CompoundRequestMapper nestedCompound = new 
CompoundRequestMapper();
+   compound.add(nestedCompound);
+
+   nestedCompound.add(new MountMapper(MOUNT_PATH_1, new 
EmptyRequestHandler()));
+   nestedCompound.add(new MountMapper(MOUNT_PATH_2, new 
EmptyRequestHandler()));
+   nestedCompound.add(new MountMapper(MOUNT_PATH_3, new 
EmptyRequestHandler()));
+
+   assertEquals(1, compound.size());
+   assertEquals(3, nestedCompound.size());
+
+   compound.unmount(MOUNT_PATH_2);
+   assertEquals(1, compound.size());
+   assertEquals(2, nestedCompound.size());
+
+   assertTrue(
+   "Mount path 1 should match",
+   
compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_1))) instanceof 
EmptyRequestHandler);
+   assertNull("Mount path 2 should not match",
+   
compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_2;
+   assertTrue(
+   "Mount path 3 should match",
+   
compound.mapRequest(compound.createRequest(Url.parse(MOUNT_PATH_3))) instanceof 
EmptyRequestHandler);
+   }
+
+  

[jira] [Commented] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143022#comment-14143022
 ] 

ASF subversion and git services commented on WICKET-5698:
-

Commit 6b906d53a917257454cc5f10c5b1d91b321ce8ed in wicket's branch 
refs/heads/wicket-6.x from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=6b906d5 ]

WICKET-5698 WebApplication#unmount() unmounts the whole compound mapper if some 
of its inner ones matches

(cherry picked from commit f45ce896d02aeda3c09d56bc4ceac425929973a1)


> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/2] git commit: WICKET-5350 remove wildcards from #ofList() and others

2014-09-22 Thread mgrigorov
WICKET-5350 remove wildcards from #ofList() and others

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

Branch: refs/heads/master
Commit: ee41e39a5695bef0f6fc3c31b38e5f78de21d018
Parents: f45ce89
Author: svenmeier 
Authored: Sat Jul 26 23:41:37 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:46:33 2014 +0200

--
 .../java/org/apache/wicket/model/Model.java | 18 +++---
 .../model/util/WildcardCollectionModel.java | 57 --
 .../wicket/model/util/WildcardListModel.java| 62 
 .../wicket/model/util/WildcardSetModel.java | 57 --
 4 files changed, 9 insertions(+), 185 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ee41e39a/wicket-core/src/main/java/org/apache/wicket/model/Model.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/model/Model.java 
b/wicket-core/src/main/java/org/apache/wicket/model/Model.java
index 8cdadac..4838d4b 100644
--- a/wicket-core/src/main/java/org/apache/wicket/model/Model.java
+++ b/wicket-core/src/main/java/org/apache/wicket/model/Model.java
@@ -24,10 +24,10 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.model.util.CollectionModel;
+import org.apache.wicket.model.util.ListModel;
 import org.apache.wicket.model.util.MapModel;
-import org.apache.wicket.model.util.WildcardCollectionModel;
-import org.apache.wicket.model.util.WildcardListModel;
-import org.apache.wicket.model.util.WildcardSetModel;
+import org.apache.wicket.model.util.SetModel;
 import org.apache.wicket.util.lang.Objects;
 
 
@@ -78,9 +78,9 @@ public class Model implements 
IModel
 *The List, which may or may not be Serializable
 * @return A Model object wrapping the List
 */
-   public static  IModel> ofList(final List list)
+   public static  IModel> ofList(final List list)
{
-   return new WildcardListModel<>(list);
+   return new ListModel<>(list);
}
 
/**
@@ -110,9 +110,9 @@ public class Model implements 
IModel
 *The Set, which may or may not be Serializable
 * @return A Model object wrapping the Set
 */
-   public static  IModel> ofSet(final Set 
set)
+   public static  IModel> ofSet(final Set set)
{
-   return new WildcardSetModel<>(set);
+   return new SetModel<>(set);
}
 
/**
@@ -125,9 +125,9 @@ public class Model implements 
IModel
 *The Collection, which may or may not be Serializable
 * @return A Model object wrapping the Set
 */
-   public static  IModel> of(final Collection collection)
+   public static  IModel> ofCollection(final 
Collection collection)
{
-   return new WildcardCollectionModel<>(collection);
+   return new CollectionModel<>(collection);
}
 
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/ee41e39a/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java
 
b/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java
deleted file mode 100644
index 8a8d138..000
--- 
a/wicket-core/src/main/java/org/apache/wicket/model/util/WildcardCollectionModel.java
+++ /dev/null
@@ -1,57 +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.model.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-
-/**
- * Based on Model but for any collections of serializable objects.
- * 
- * @author Timo Rantalaiho
-

[1/2] git commit: WICKET-5350 adjust components' wildcards

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master f45ce896d -> c9ac08c8c


WICKET-5350 adjust components' wildcards

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

Branch: refs/heads/master
Commit: c9ac08c8c143a0160d11c34dedf38b7b93beb417
Parents: ee41e39
Author: svenmeier 
Authored: Sat Jul 26 23:44:00 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 10:46:33 2014 +0200

--
 .../wicket/markup/html/form/AbstractChoice.java | 16 
 .../apache/wicket/markup/html/form/CheckGroup.java  |  2 +-
 .../markup/html/form/upload/FileUploadField.java|  5 +++--
 .../apache/wicket/markup/html/list/ListView.java| 10 +-
 .../wicket/markup/html/list/PageableListView.java   |  4 ++--
 .../wicket/markup/html/list/PropertyListView.java   |  4 ++--
 .../markup/repeater/AbstractPageableView.java   |  2 +-
 .../wicket/markup/repeater/RefreshingView.java  |  3 ++-
 .../markup/repeater/data/ListDataProvider.java  |  2 +-
 .../markup/html/form/ListMultipleChoiceTest.java|  4 ++--
 .../wicket/extensions/yui/calendar/DatesPage1.java  |  2 +-
 .../wicket/examples/ajax/builtin/ChoicePage.java|  4 ++--
 .../examples/compref/CheckBoxSelectorPage.java  |  2 +-
 .../apache/wicket/examples/compref/SelectPage.java  |  8 
 .../org/apache/wicket/examples/dates/DatesPage.java |  2 +-
 .../ajax/markup/html/AjaxEditableChoiceLabel.java   |  6 +++---
 .../markup/html/form/palette/Palette.java   | 11 +--
 .../form/palette/component/AbstractOptions.java |  2 +-
 .../html/form/palette/component/Recorder.java   |  6 +++---
 .../markup/html/form/select/SelectOption.java   |  2 +-
 .../markup/html/form/select/SelectOptions.java  | 14 +++---
 .../repeater/data/table/filter/ChoiceFilter.java| 10 ++
 .../table/filter/ChoiceFilteredPropertyColumn.java  |  8 
 .../html/repeater/data/table/DataTableTest.java |  5 +++--
 24 files changed, 69 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c9ac08c8/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
index e29c7fb..ee566db 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
@@ -22,7 +22,7 @@ import java.util.List;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.util.WildcardListModel;
+import org.apache.wicket.model.util.ListModel;
 import org.apache.wicket.util.convert.IConverter;
 import org.apache.wicket.util.string.AppendingStringBuffer;
 import org.apache.wicket.util.string.Strings;
@@ -90,7 +90,7 @@ public abstract class AbstractChoice extends 
FormComponent
 */
public AbstractChoice(final String id)
{
-   this(id, new WildcardListModel<>(new ArrayList()), new 
ChoiceRenderer());
+   this(id, new ListModel<>(new ArrayList()), new 
ChoiceRenderer());
}
 
/**
@@ -103,7 +103,7 @@ public abstract class AbstractChoice extends 
FormComponent
 */
public AbstractChoice(final String id, final List choices)
{
-   this(id, new WildcardListModel<>(choices), new 
ChoiceRenderer());
+   this(id, new ListModel<>(choices), new ChoiceRenderer());
}
 
/**
@@ -119,7 +119,7 @@ public abstract class AbstractChoice extends 
FormComponent
public AbstractChoice(final String id, final List choices,
final IChoiceRenderer renderer)
{
-   this(id, new WildcardListModel<>(choices), renderer);
+   this(id, new ListModel<>(choices), renderer);
}
 
/**
@@ -134,7 +134,7 @@ public abstract class AbstractChoice extends 
FormComponent
 */
public AbstractChoice(final String id, IModel model, final List choices)
{
-   this(id, model, new WildcardListModel<>(choices), new 
ChoiceRenderer());
+   this(id, model, new ListModel<>(choices), new 
ChoiceRenderer());
}
 
/**
@@ -152,7 +152,7 @@ public abstract class AbstractChoice extends 
FormComponent
public AbstractChoice(final String id, IModel model, final List choices,

[jira] [Commented] (WICKET-5350) Enhancement for AbstractChoice and WildcardListModel API

2014-09-22 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143030#comment-14143030
 ] 

ASF subversion and git services commented on WICKET-5350:
-

Commit ee41e39a5695bef0f6fc3c31b38e5f78de21d018 in wicket's branch 
refs/heads/master from svenmeier
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=ee41e39 ]

WICKET-5350 remove wildcards from #ofList() and others

> Enhancement for AbstractChoice and WildcardListModel API
> 
>
> Key: WICKET-5350
> URL: https://issues.apache.org/jira/browse/WICKET-5350
> Project: Wicket
>  Issue Type: Improvement
>Affects Versions: 6.10.0, 7.0.0-M1
>Reporter: Betlista
>Assignee: Sven Meier
>Priority: Minor
>  Labels: generics
> Fix For: 7.0.0-M4
>
>
> According to Efective Java book 
> (http://devender.files.wordpress.com/2008/05/effectivejava.pdf), item 28:
> "No wildcard type for return value"
> Especially "User should not have to think about wildcards to use your API".
> so
> public List getChoices()
> should be changed to
> public List getChoices()
> and for WildcardListModel
> protected List createSerializableVersionOf(List 
> object)
> should be changed to
> protected List createSerializableVersionOf(List object)
> Probably there is a lot of such things in framework.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-5350) Enhancement for AbstractChoice and WildcardListModel API

2014-09-22 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143033#comment-14143033
 ] 

Martin Grigorov commented on WICKET-5350:
-

Merged branch 'WICKET-5350-wildcards' into master.

> Enhancement for AbstractChoice and WildcardListModel API
> 
>
> Key: WICKET-5350
> URL: https://issues.apache.org/jira/browse/WICKET-5350
> Project: Wicket
>  Issue Type: Improvement
>Affects Versions: 6.10.0, 7.0.0-M1
>Reporter: Betlista
>Assignee: Sven Meier
>Priority: Minor
>  Labels: generics
> Fix For: 7.0.0-M4
>
>
> According to Efective Java book 
> (http://devender.files.wordpress.com/2008/05/effectivejava.pdf), item 28:
> "No wildcard type for return value"
> Especially "User should not have to think about wildcards to use your API".
> so
> public List getChoices()
> should be changed to
> public List getChoices()
> and for WildcardListModel
> protected List createSerializableVersionOf(List 
> object)
> should be changed to
> protected List createSerializableVersionOf(List object)
> Probably there is a lot of such things in framework.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-5350) Enhancement for AbstractChoice and WildcardListModel API

2014-09-22 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143031#comment-14143031
 ] 

ASF subversion and git services commented on WICKET-5350:
-

Commit c9ac08c8c143a0160d11c34dedf38b7b93beb417 in wicket's branch 
refs/heads/master from svenmeier
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=c9ac08c ]

WICKET-5350 adjust components' wildcards

> Enhancement for AbstractChoice and WildcardListModel API
> 
>
> Key: WICKET-5350
> URL: https://issues.apache.org/jira/browse/WICKET-5350
> Project: Wicket
>  Issue Type: Improvement
>Affects Versions: 6.10.0, 7.0.0-M1
>Reporter: Betlista
>Assignee: Sven Meier
>Priority: Minor
>  Labels: generics
> Fix For: 7.0.0-M4
>
>
> According to Efective Java book 
> (http://devender.files.wordpress.com/2008/05/effectivejava.pdf), item 28:
> "No wildcard type for return value"
> Especially "User should not have to think about wildcards to use your API".
> so
> public List getChoices()
> should be changed to
> public List getChoices()
> and for WildcardListModel
> protected List createSerializableVersionOf(List 
> object)
> should be changed to
> protected List createSerializableVersionOf(List object)
> Probably there is a lot of such things in framework.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WICKET-5350) Enhancement for AbstractChoice and WildcardListModel API

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5350.
-
   Resolution: Fixed
Fix Version/s: 7.0.0-M4

> Enhancement for AbstractChoice and WildcardListModel API
> 
>
> Key: WICKET-5350
> URL: https://issues.apache.org/jira/browse/WICKET-5350
> Project: Wicket
>  Issue Type: Improvement
>Affects Versions: 6.10.0, 7.0.0-M1
>Reporter: Betlista
>Assignee: Sven Meier
>Priority: Minor
>  Labels: generics
> Fix For: 7.0.0-M4
>
>
> According to Efective Java book 
> (http://devender.files.wordpress.com/2008/05/effectivejava.pdf), item 28:
> "No wildcard type for return value"
> Especially "User should not have to think about wildcards to use your API".
> so
> public List getChoices()
> should be changed to
> public List getChoices()
> and for WildcardListModel
> protected List createSerializableVersionOf(List 
> object)
> should be changed to
> protected List createSerializableVersionOf(List object)
> Probably there is a lot of such things in framework.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Git Push Summary

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/WICKET-5350-wildcards [deleted] a04fc96a7


git commit: Git ignore testing/wicket-js-tests/node/ folder

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master c9ac08c8c -> a5a9ee1bb


Git ignore testing/wicket-js-tests/node/ folder


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

Branch: refs/heads/master
Commit: a5a9ee1bb8ba0c957c5e7f1dc71bdbe5020af2a7
Parents: c9ac08c
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 11:18:25 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 11:18:25 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/a5a9ee1b/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 129bc43..3fb655e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,4 @@ velocity.log
 *~
 node_modules/
 release.properties
-
+testing/wicket-js-tests/node/



[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov updated WICKET-5698:

Attachment: WICKET-5698.patch

Attaching Jesse Long's patch from dev@ mail thread.

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
> Attachments: WICKET-5698.patch
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reopened WICKET-5698:
-

Reopening because compound -> wrapper -> compound -> mapper is not covered.

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
> Attachments: WICKET-5698.patch
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (WICKET-5706) ResourceUtils.getLocaleFromFilename bug

2014-09-22 Thread Tamas Szendrei (JIRA)
Tamas Szendrei created WICKET-5706:
--

 Summary: ResourceUtils.getLocaleFromFilename bug
 Key: WICKET-5706
 URL: https://issues.apache.org/jira/browse/WICKET-5706
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.17.0
Reporter: Tamas Szendrei


When I try to get PathLocale with ResourceUtils, than get wrong values, when 
the files contains '.' in name.

Example: 'jquery.test.js' 
PathLocale.path=jquery, PathLocale.locale = null

or jquery.test_hu.js'.
PathLocale.path=jquery, PathLocale.locale = null

That's why I'd like to use 
jquery.test_hu.js' as resource, the ResourceStreamLocator try to find 
jquery.test_hu_hu_HU.js, jquery.test_hu_hu.js, and after  jquery.test_hu.js.
Because the 
ResourceStreamLocator.locate

PathLocale data = ResourceUtils.getLocaleFromFilename(path);
if ((data != null) && (data.locale != null))
{
path = data.path;
locale = data.locale;
}
doesn't work in this case.

Should change the 
ResourceUtils

public static PathLocale getLocaleFromFilename(String path) {
int pos = path.indexOf('.');

To
int pos = path.lastIndexOf('.');



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


svn commit: r1626864 [2/2] - in /wicket/common/site/trunk: ./ _site/ _site/2009/07/30/ _site/2009/08/21/ _site/2009/10/12/ _site/2009/10/24/ _site/2009/12/13/ _site/2009/12/21/ _site/2010/02/01/ _site

2014-09-22 Thread mgrigorov
Modified: wicket/common/site/trunk/_site/contribute/write.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/contribute/write.html?rev=1626864&r1=1626863&r2=1626864&view=diff
==
--- wicket/common/site/trunk/_site/contribute/write.html (original)
+++ wicket/common/site/trunk/_site/contribute/write.html Mon Sep 22 18:29:51 
2014
@@ -96,7 +96,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5


http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4

Modified: wicket/common/site/trunk/_site/dtds.data/index.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/dtds.data/index.html?rev=1626864&r1=1626863&r2=1626864&view=diff
==
--- wicket/common/site/trunk/_site/dtds.data/index.html (original)
+++ wicket/common/site/trunk/_site/dtds.data/index.html Mon Sep 22 18:29:51 2014
@@ -96,7 +96,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5


http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4

Modified: wicket/common/site/trunk/_site/help/email.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/help/email.html?rev=1626864&r1=1626863&r2=1626864&view=diff
==
--- wicket/common/site/trunk/_site/help/email.html (original)
+++ wicket/common/site/trunk/_site/help/email.html Mon Sep 22 18:29:51 2014
@@ -96,7 +96,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5


http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4

Modified: wicket/common/site/trunk/_site/help/index.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/help/index.html?rev=1626864&r1=1626863&r2=1626864&view=diff
==
--- wicket/common/site/trunk/_site/help/index.html (original)
+++ wicket/common/site/trunk/_site/help/index.html Mon Sep 22 18:29:51 2014
@@ -96,7 +96,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5


http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4

Modified: wicket/common/site/trunk/_site/help/irc.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/help/irc.html?rev=1626864&r1=1626863&r2=1626864&view=diff
==
--- wicket/common/site/trunk/_site/help/irc.html (original)
+++ wicket/common/site/trunk/_site/help/irc.html Mon Sep 22 18:29:51 2014
@@ -96,7 +96,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5


http://www.apache.org/dyn/closer.cgi/wicket/1.4.23";>Wicket 1.4

Modified: wicket/common/site/trunk/_site/help/reportabug.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/help/reportabug.html?rev=1626864&r1=1626863&r2=1626864&view=diff
==
--- wicket/common/site/trunk/_site/help/reportabug.html (original)
+++ wicket/common/site/trunk/_site/help/reportabug.html Mon Sep 22 18:29:51 2014
@@ -96,7 +96,7 @@
http://www.apache.org/dyn/closer.cgi/wicket/6.17.0";>Wicket 6.17


-   http://www.apache.org/dyn/closer.cgi/wicket/1.5.11";>Wicket 1.5
+   http://www.apache.org/dyn/closer.cgi/wicket/1.5.12";>Wicket 1.5


svn commit: r1626864 [1/2] - in /wicket/common/site/trunk: ./ _site/ _site/2009/07/30/ _site/2009/08/21/ _site/2009/10/12/ _site/2009/10/24/ _site/2009/12/13/ _site/2009/12/21/ _site/2010/02/01/ _site

2014-09-22 Thread mgrigorov
Author: mgrigorov
Date: Mon Sep 22 18:29:51 2014
New Revision: 1626864

URL: http://svn.apache.org/r1626864
Log:
Update _config.yml that 1.5.12 is the latest 1.5.x


Modified:
wicket/common/site/trunk/_config.yml
wicket/common/site/trunk/_site/2009/07/30/wicket-1.3.7-released.html

wicket/common/site/trunk/_site/2009/07/30/wicket-1.4-takes-typesafety-to-the-next-level.html
wicket/common/site/trunk/_site/2009/08/21/wicket-1.4.1-released.html
wicket/common/site/trunk/_site/2009/10/12/wicket-1.4.2-released.html
wicket/common/site/trunk/_site/2009/10/24/wicket-1.4.3-released.html
wicket/common/site/trunk/_site/2009/12/13/wicket-1.4.4-released.html
wicket/common/site/trunk/_site/2009/12/21/wicket-1.4.5-released.html
wicket/common/site/trunk/_site/2010/02/01/wicket-1.4.6-released.html
wicket/common/site/trunk/_site/2010/03/05/wicket-1.4.7-released.html
wicket/common/site/trunk/_site/2010/05/03/wicket-1.4.8-released.html
wicket/common/site/trunk/_site/2010/05/24/wicket-1.4.9-released.html
wicket/common/site/trunk/_site/2010/08/04/martin-grigorov-committer.html
wicket/common/site/trunk/_site/2010/08/11/wicket-1.4.10-released.html
wicket/common/site/trunk/_site/2010/08/11/wicket-1.5-M1-released.html
wicket/common/site/trunk/_site/2010/08/24/peter-ertl-committer.html
wicket/common/site/trunk/_site/2010/09/09/wicket-1.4.11-released.html
wicket/common/site/trunk/_site/2010/09/17/wicket.1.4.12-released.html
wicket/common/site/trunk/_site/2010/09/17/wicket.1.5-M2.1-released.html
wicket/common/site/trunk/_site/2010/11/01/wicket-1.4.13-released.html
wicket/common/site/trunk/_site/2010/11/05/wicket-1.5-M3-released.html
wicket/common/site/trunk/_site/2010/11/21/pedro-santos-committer.html
wicket/common/site/trunk/_site/2010/11/29/wicket-1.4.14-released.html
wicket/common/site/trunk/_site/2010/12/24/wicket-1.4.15-released.html
wicket/common/site/trunk/_site/2011/01/22/wicket-1.5-RC1-released.html
wicket/common/site/trunk/_site/2011/02/25/wicket-1.4.16-released.html
wicket/common/site/trunk/_site/2011/02/25/wicket-1.5-rc2-released.html
wicket/common/site/trunk/_site/2011/03/25/wicket-cookbook-published.html
wicket/common/site/trunk/_site/2011/04/02/wicket-1.4.17-released.html
wicket/common/site/trunk/_site/2011/04/02/wicket-1.5-RC3-released.html
wicket/common/site/trunk/_site/2011/05/11/wicket-1.5-RC4.2-released.html
wicket/common/site/trunk/_site/2011/05/17/wicket-cookbook-contest.html
wicket/common/site/trunk/_site/2011/06/25/wicket-1.5-RC5.1-released.html
wicket/common/site/trunk/_site/2011/08/09/wicket-1.4.18-released.html
wicket/common/site/trunk/_site/2011/08/23/cve-2011-2712.html
wicket/common/site/trunk/_site/2011/08/28/1.5-RC7-released.html
wicket/common/site/trunk/_site/2011/09/07/wicket-1.5-released.html
wicket/common/site/trunk/_site/2011/09/29/wicket-1.5.1-released.html
wicket/common/site/trunk/_site/2011/10/17/wicket-1.4.19-released.html
wicket/common/site/trunk/_site/2011/10/24/wicket-1.5.2-released.html
wicket/common/site/trunk/_site/2011/11/14/wicket-1.5.3-released.html
wicket/common/site/trunk/_site/2012/01/23/wicket-1.5.4-released.html
wicket/common/site/trunk/_site/2012/03/12/wicket-1.4.20-released.html
wicket/common/site/trunk/_site/2012/03/12/wicket-1.5.5-released.html
wicket/common/site/trunk/_site/2012/03/22/wicket-cve-2012-0047.html
wicket/common/site/trunk/_site/2012/03/22/wicket-cve-2012-1089.html
wicket/common/site/trunk/_site/2012/03/26/wicket-6.0.0-beta1-released.html
wicket/common/site/trunk/_site/2012/05/07/wicket-1.5.6-released.html
wicket/common/site/trunk/_site/2012/05/29/wicket-6.0.0-beta2-released.html
wicket/common/site/trunk/_site/2012/06/04/wicket-1.5.7-released.html
wicket/common/site/trunk/_site/2012/06/20/wicket-native-websockets.html
wicket/common/site/trunk/_site/2012/07/16/wicket-6.0.0-beta3-released.html
wicket/common/site/trunk/_site/2012/08/24/wicket-1.5.8-released.html
wicket/common/site/trunk/_site/2012/09/05/wicket-1.4.21-released.html
wicket/common/site/trunk/_site/2012/09/05/wicket-6.0.0-released.html
wicket/common/site/trunk/_site/2012/09/06/cve-2012-3373.html
wicket/common/site/trunk/_site/2012/10/04/wicket-6.1.0-released.html
wicket/common/site/trunk/_site/2012/10/08/wicket-6.1.1-released.html
wicket/common/site/trunk/_site/2012/10/23/wicket-6.2.0-released.html
wicket/common/site/trunk/_site/2012/11/09/wicket-1.5.9-released.html
wicket/common/site/trunk/_site/2012/11/16/wicket-6.3.0-released.html
wicket/common/site/trunk/_site/2012/12/14/wicket-6.4.0-released.html
wicket/common/site/trunk/_site/2013/01/23/wicket-6.5.0-released.html
wicket/common/site/trunk/_site/2013/02/15/wicket-6.6.0-released.html
wicket/common/site/trunk/_site/2013/02/26/wicket-1.5.10-released.html
wicket/common/site/trunk/_site/2013/03/03/c

[jira] [Commented] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143718#comment-14143718
 ] 

ASF GitHub Bot commented on WICKET-5692:


GitHub user tkruse opened a pull request:

https://github.com/apache/wicket/pull/77

Wicket 5692: Better error message when property cannot be resolved

See https://issues.apache.org/jira/browse/WICKET-5692

commits can be squashed one review passed.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tkruse/wicket wicket-5692

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/77.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #77


commit 8c0a821addd6d20914485d990ad21acb93081585
Author: Thibault Kruse 
Date:   2014-09-22T20:08:19Z

Reproduce flawed Error message (to demonstrate wicket-5692)

commit 4d1c7046a23c0cf56e89e8f5261d9525e95d09b2
Author: Thibault Kruse 
Date:   2014-09-22T20:10:04Z

WICKET-5692: improved Unresolvable Property Message




> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Priority: Minor
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reopened WICKET-5692:
-

> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Priority: Minor
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


git commit: WICKET-5692: improved Unresolvable Property Message

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master a5a9ee1bb -> 09fc316b7


WICKET-5692: improved Unresolvable Property Message


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

Branch: refs/heads/master
Commit: 09fc316b768968f99c2a80bda1dbaee7a596eb12
Parents: a5a9ee1
Author: Thibault Kruse 
Authored: Mon Sep 22 22:08:19 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 22:48:11 2014 +0200

--
 .../bean/validation/PropertyValidator.java  | 44 +---
 .../PropertyValidatorRequiredTest.java  | 24 +--
 2 files changed, 59 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/09fc316b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index ea1976a..838dbd8 100644
--- 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -18,6 +18,8 @@ import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.IPropertyReflectionAwareModel;
+import org.apache.wicket.model.IWrapModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
@@ -92,18 +94,48 @@ public class PropertyValidator extends Behavior 
implements IValidator
this.groups_ = groups;
}
 
+   /**
+* To support debugging, trying to provide useful information where 
possible
+* @return
+*/
+   private String createUnresolvablePropertyMessage(FormComponent 
component) {
+   String baseMessage = "Could not resolve Bean Property from 
component: " + component
+   + ". (Hints:) Possible causes are a typo in the 
PropertyExpression, a null reference or a model that does not work in 
combination with a "
+   + IPropertyResolver.class.getSimpleName() + ".";
+
+   IModel model = component.getModel();
+   // Code sadly copied over from DefaultPropertyResolver
+   while (true)
+   {
+   if (model == null)
+   {
+   break;
+   }
+   if (model instanceof IPropertyReflectionAwareModel)
+   {
+   break;
+   }
+   if (model instanceof IWrapModel)
+   {
+   model = 
((IWrapModel)model).getWrappedModel();
+   continue;
+   }
+   }
+   if (model != null) {
+   baseMessage += " Model : " + model;
+   }
+   return baseMessage;
+   }
+
private Property getProperty()
{
if (property_ == null)
{
-   property_ = 
BeanValidationConfiguration.get().resolveProperty(component);
+   BeanValidationContext config = 
BeanValidationConfiguration.get();
+   property_ = config.resolveProperty(component);
if (property_ == null)
{
-   throw new IllegalStateException(
-   "Could not resolve Property from 
component: " + component
-   + ". Either specify the 
Property in the constructor or use a model that works in combination with a "
-   + 
IPropertyResolver.class.getSimpleName()
-   + " to resolve the Property 
automatically");
+   throw new 
IllegalStateException(createUnresolvablePropertyMessage(component));
}
}
return property_;

http://git-wip-us.apache.org/repos/asf/wicket/blob/09fc316b/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java

[jira] [Commented] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143789#comment-14143789
 ] 

ASF subversion and git services commented on WICKET-5692:
-

Commit 09fc316b768968f99c2a80bda1dbaee7a596eb12 in wicket's branch 
refs/heads/master from [~tkruse]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=09fc316 ]

WICKET-5692: improved Unresolvable Property Message


> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Priority: Minor
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/2] git commit: Java 6 no-diamonds

2014-09-22 Thread mgrigorov
Java 6 no-diamonds


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

Branch: refs/heads/wicket-6.x
Commit: 49aaea8313fb2079e90579e434e6239e21ee652b
Parents: fe66a38
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 22 22:51:20 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 22:51:20 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/49aaea83/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
--
diff --git 
a/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
 
b/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
index 69186e4..e17c4bb 100644
--- 
a/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
+++ 
b/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/PropertyValidatorRequiredTest.java
@@ -163,7 +163,7 @@ public class PropertyValidatorRequiredTest
"bean.propertyOneTwo")).add(new 
PropertyValidator(GroupThree.class));
 
input21 = new TextField("input21", new 
PropertyModel(this,
-   "bean.subBeanList[0].property")).add(new 
PropertyValidator<>());
+   "bean.subBeanList[0].property")).add(new 
PropertyValidator());
 
form.add(input1, input2, input3, input4, input5, 
input6, input7, input8, input9,
input10, input11, input12, input13, input14, 
input15, input16, input17, input18,



[1/2] git commit: WICKET-5692: improved Unresolvable Property Message

2014-09-22 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 6b906d53a -> 49aaea831


WICKET-5692: improved Unresolvable Property Message

(cherry picked from commit 09fc316b768968f99c2a80bda1dbaee7a596eb12)


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

Branch: refs/heads/wicket-6.x
Commit: fe66a3836f87c7a98eb48a1c7432d4c7160036f3
Parents: 6b906d5
Author: Thibault Kruse 
Authored: Mon Sep 22 22:08:19 2014 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 22 22:49:07 2014 +0200

--
 .../bean/validation/PropertyValidator.java  | 44 +---
 .../PropertyValidatorRequiredTest.java  | 24 +--
 2 files changed, 59 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fe66a383/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
--
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
index a2486c7..17aa38f 100644
--- 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
+++ 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java
@@ -18,6 +18,8 @@ import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.IPropertyReflectionAwareModel;
+import org.apache.wicket.model.IWrapModel;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
@@ -93,18 +95,48 @@ public class PropertyValidator extends Behavior 
implements IValidator
this.groups_ = groups;
}
 
+   /**
+* To support debugging, trying to provide useful information where 
possible
+* @return
+*/
+   private String createUnresolvablePropertyMessage(FormComponent 
component) {
+   String baseMessage = "Could not resolve Bean Property from 
component: " + component
+   + ". (Hints:) Possible causes are a typo in the 
PropertyExpression, a null reference or a model that does not work in 
combination with a "
+   + IPropertyResolver.class.getSimpleName() + ".";
+
+   IModel model = component.getModel();
+   // Code sadly copied over from DefaultPropertyResolver
+   while (true)
+   {
+   if (model == null)
+   {
+   break;
+   }
+   if (model instanceof IPropertyReflectionAwareModel)
+   {
+   break;
+   }
+   if (model instanceof IWrapModel)
+   {
+   model = 
((IWrapModel)model).getWrappedModel();
+   continue;
+   }
+   }
+   if (model != null) {
+   baseMessage += " Model : " + model;
+   }
+   return baseMessage;
+   }
+
private Property getProperty()
{
if (property_ == null)
{
-   property_ = 
BeanValidationConfiguration.get().resolveProperty(component);
+   BeanValidationContext config = 
BeanValidationConfiguration.get();
+   property_ = config.resolveProperty(component);
if (property_ == null)
{
-   throw new IllegalStateException(
-   "Could not resolve Property from 
component: " + component
-   + ". Either specify the 
Property in the constructor or use a model that works in combination with a "
-   + 
IPropertyResolver.class.getSimpleName()
-   + " to resolve the Property 
automatically");
+   throw new 
IllegalStateException(createUnresolvablePropertyMessage(component));
}
}
return property_;

http://git-wip-us.apache.org/repos/asf/wicket/blob/fe66a383/wicket-bean-validation/src/test/java

[jira] [Commented] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143797#comment-14143797
 ] 

ASF subversion and git services commented on WICKET-5692:
-

Commit fe66a3836f87c7a98eb48a1c7432d4c7160036f3 in wicket's branch 
refs/heads/wicket-6.x from [~tkruse]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=fe66a38 ]

WICKET-5692: improved Unresolvable Property Message

(cherry picked from commit 09fc316b768968f99c2a80bda1dbaee7a596eb12)


> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Priority: Minor
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WICKET-5692) Misleading message in PropertyValidator

2014-09-22 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5692.
-
   Resolution: Fixed
Fix Version/s: 7.0.0-M4
   6.18.0
 Assignee: Martin Grigorov

Danke !

> Misleading message in PropertyValidator
> ---
>
> Key: WICKET-5692
> URL: https://issues.apache.org/jira/browse/WICKET-5692
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Thibault Kruse
>Assignee: Martin Grigorov
>Priority: Minor
> Fix For: 6.18.0, 7.0.0-M4
>
>
> in org.apache.wicket.bean.validation.PropertyValidator.java:
> {code}
> if (property_ == null)
>   {
>   throw new IllegalStateException(
>   "Could not resolve Property from 
> component: " +
>   component +
>   ". Either specify the Property 
> in the constructor or use a model that works in combination with a " +
>   
> IPropertyResolver.class.getSimpleName() +
>   " to resolve the Property 
> automatically");
>   }
> {code}
> The error message is misleading, as other causes might lead to a result of 
> null. As PropertyResolvers can be of any type, the message should not assume 
> any given cause, but may hint at common errors.
> In particular in my case when Using a bean Foo having a field bar of Type 
> Bar, and a Model on an instance foo of Foo having null for field bar.
> Instead, it would be nice if the Error Message made an attempt to cast the 
> component model to AbstractPropertyModel and print the propertyExpression, as 
> well as the type of the modelObject, but without failure if the cast is not 
> possible, and reporting the modelObject is null if so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Jesse Long (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesse Long updated WICKET-5698:
---
Attachment: WICKET-5698-2.patch

WICKET-5698-2.patch - A neatened up version of the patch, with tests.

Summary of patch:

Add new interface IWrappedRequestMapper to mark wrapping request mappers.

Implement IWrappedRequestMapper where appropriate.

Remove ICompoundRequestMapper#unmount(), as WebApplication now takes 
responsibility for this.

Remove package private CompoundRequestMapper#size() which was only used in now 
non-existant tests.

Implement mapper tree traversing unmount in WebApplication.

Create WebApplicationTest to test unmounting.

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
> Attachments: WICKET-5698-2.patch, WICKET-5698.patch
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Jesse Long (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesse Long updated WICKET-5698:
---
Attachment: (was: WICKET-5698-2.patch)

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
> Attachments: WICKET-5698.patch
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WICKET-5698) WebApplication#unmount() unmounts the whole compound mapper if some of its inner ones matches

2014-09-22 Thread Jesse Long (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesse Long updated WICKET-5698:
---
Attachment: WICKET-5698-2.patch

Lets do that without ConcurrentModificationExceptions

> WebApplication#unmount() unmounts the whole compound mapper if some of its 
> inner ones matches
> -
>
> Key: WICKET-5698
> URL: https://issues.apache.org/jira/browse/WICKET-5698
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.0.0-M3, 6.17.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
> Fix For: 6.18.0, 7.0.0-M4
>
> Attachments: WICKET-5698-2.patch, WICKET-5698.patch
>
>
> From dev@ mailing lists: http://markmail.org/message/wmdgbrhvrvaeygvr
> WebApplication.unmount() calls getRootRequestMapperAsCompound(), and 
> calls unmount() on that.
> getRootRequestMapperAsCompound() checks if the root request mapper is a 
> compound, if not, wraps it in a compound, sets the compound as root and 
> returns the compound.
> CompoundRequestMapper.unmount() identifies which of the mappers added 
> directly to the compound handle the url, and removes them.
> The problem:
> If the original root mapper was a single wrapper, or layer of wrappers, 
> with the actual mounted mapper wrapped some levels down, then the whole 
> wrapper is removed, not just the specific MountedMapper that is wrapped. 
> This has the effect of removing every single mapper, leaving root mapper 
> as an empty compound.
> I would like to attempt to provide a patch to fix this, but would like 
> guidance on the approach. I have come up with three approaches:
> 1. Introduce interface IWrappedRequestMapper. This will be an interface 
> which has one method: IRequestMapper getWrappedRequestMapper(). We can 
> then have all wrapper mappers implement this and work down the tree to 
> find the correct MountedMapper (wicket 6) to remove.
> 2. Have WebApplication hold a reference to a specific 
> CompoundRequestMapper, and have all mount()/unmount() operations add and 
> remove from this mapper. This compound would need to be added to the 
> default list during init. This makes it complicated to work out how to 
> do things like have CryptoMapper not apply to mounted pages.
> 3. Add method unmount() to IRequestMapper, so that wrappers can 
> delegate. This obviously can only be done in wicket 7, but we're making 
> mounting a problem of every single request mapper, when not even 
> Application cares about mounting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (WICKET-5707) Clicking Ajax submit link called submit method twice

2014-09-22 Thread Yinka Ajayi (JIRA)
Yinka Ajayi created WICKET-5707:
---

 Summary: Clicking Ajax submit link called submit method twice
 Key: WICKET-5707
 URL: https://issues.apache.org/jira/browse/WICKET-5707
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.17.0, 6.16.0
 Environment: Spring 4, hibernate 4, Java 7 for 6.16, Java 8 for 6.17, 
netbeans 8.01, 
Reporter: Yinka Ajayi


When I click Ajax submit link that ought to open a modal window, two modal 
window are opened. This was traced to submit method being called twice.

Check StockAgentPage for test



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WICKET-5707) Clicking Ajax submit link called submit method twice

2014-09-22 Thread Yinka Ajayi (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yinka Ajayi updated WICKET-5707:

Attachment: double-modalwindow-model.zip
double-modalwindow.zip

the quick start pproject

> Clicking Ajax submit link called submit method twice
> 
>
> Key: WICKET-5707
> URL: https://issues.apache.org/jira/browse/WICKET-5707
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.16.0, 6.17.0
> Environment: Spring 4, hibernate 4, Java 7 for 6.16, Java 8 for 6.17, 
> netbeans 8.01, 
>Reporter: Yinka Ajayi
>  Labels: features
> Attachments: double-modalwindow-model.zip, double-modalwindow.zip
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> When I click Ajax submit link that ought to open a modal window, two modal 
> window are opened. This was traced to submit method being called twice.
> Check StockAgentPage for test



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)