[jira] [Commented] (WICKET-6440) SecuredRemoteAddressRequestWrapperFactory doesn't make request secure

2017-09-04 Thread Hendy Irawan (JIRA)

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

Hendy Irawan commented on WICKET-6440:
--

yes you read that same as me.

when == false is removed that becomes:

if the request is not secure and *matches* any of the secured addresses then it 
needs a wrapper.

seems straightforward to me.

> SecuredRemoteAddressRequestWrapperFactory doesn't make request secure
> -
>
> Key: WICKET-6440
> URL: https://issues.apache.org/jira/browse/WICKET-6440
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
>Reporter: Hendy Irawan
>Priority: Minor
>
> I'm using SecuredRemoteAddressRequestWrapperFactory and what I get is:
> {noformat}
> 2017-08-08 09:07:53.460 DEBUG 3851 --- [nio-8080-exec-3] 
> ecuredRemoteAddressRequestWrapperFactory : Incoming request 
> uri=/id/cari-wanita/di/Kota%20Malang,%20Jawa%20Timur,%20Republic%20of%20Indonesia
>  with originalSecure='false', remoteAddr='127.0.0.1' will be seen with 
> newSecure='false'
> {noformat}
> Since remoteAddr is 127.* then it should be treated as secure, per 
> documentation.
> This code in SecuredRemoteAddressRequestWrapperFactory is probably buggy: 
> (i.e. need to remove {{==false}})
> {code:java}
>   @Override
>   public boolean needsWrapper(final HttpServletRequest request)
>   {
>   return !request.isSecure() &&
>   matchesOne(request.getRemoteAddr(), 
> config.securedRemoteAddresses) == false;
>   }
> {code}
> Additionally, newSecure = should be {{xRequest.isSecure()}} :
> {code:java}
>   HttpServletRequest xRequest = super.getWrapper(request);
>   if (log.isDebugEnabled())
>   {
>   log.debug("Incoming request uri=" + 
> request.getRequestURI() + " with originalSecure='" +
>   request.isSecure() + "', remoteAddr='" + 
> request.getRemoteAddr() +
>   "' will be seen with newSecure='" + 
> request.isSecure() + "'");
>   }
> {code}
> Related to WICKET-3015.
> Tag [~jdonnerstag] [~pete]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6440) SecuredRemoteAddressRequestWrapperFactory doesn't make request secure

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6440 SecuredRemoteAddressRequestWrapperFactory doesn't make request 
secure

Use the wrapped request in the logging of the new secure state

(cherry picked from commit 18a1c2f9ea793a6707b30644f14a63a5edafcbc4)


> SecuredRemoteAddressRequestWrapperFactory doesn't make request secure
> -
>
> Key: WICKET-6440
> URL: https://issues.apache.org/jira/browse/WICKET-6440
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
>Reporter: Hendy Irawan
>Priority: Minor
>
> I'm using SecuredRemoteAddressRequestWrapperFactory and what I get is:
> {noformat}
> 2017-08-08 09:07:53.460 DEBUG 3851 --- [nio-8080-exec-3] 
> ecuredRemoteAddressRequestWrapperFactory : Incoming request 
> uri=/id/cari-wanita/di/Kota%20Malang,%20Jawa%20Timur,%20Republic%20of%20Indonesia
>  with originalSecure='false', remoteAddr='127.0.0.1' will be seen with 
> newSecure='false'
> {noformat}
> Since remoteAddr is 127.* then it should be treated as secure, per 
> documentation.
> This code in SecuredRemoteAddressRequestWrapperFactory is probably buggy: 
> (i.e. need to remove {{==false}})
> {code:java}
>   @Override
>   public boolean needsWrapper(final HttpServletRequest request)
>   {
>   return !request.isSecure() &&
>   matchesOne(request.getRemoteAddr(), 
> config.securedRemoteAddresses) == false;
>   }
> {code}
> Additionally, newSecure = should be {{xRequest.isSecure()}} :
> {code:java}
>   HttpServletRequest xRequest = super.getWrapper(request);
>   if (log.isDebugEnabled())
>   {
>   log.debug("Incoming request uri=" + 
> request.getRequestURI() + " with originalSecure='" +
>   request.isSecure() + "', remoteAddr='" + 
> request.getRemoteAddr() +
>   "' will be seen with newSecure='" + 
> request.isSecure() + "'");
>   }
> {code}
> Related to WICKET-3015.
> Tag [~jdonnerstag] [~pete]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6440) SecuredRemoteAddressRequestWrapperFactory doesn't make request secure

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6440 SecuredRemoteAddressRequestWrapperFactory doesn't make request 
secure

Use the wrapped request in the logging of the new secure state


> SecuredRemoteAddressRequestWrapperFactory doesn't make request secure
> -
>
> Key: WICKET-6440
> URL: https://issues.apache.org/jira/browse/WICKET-6440
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
>Reporter: Hendy Irawan
>Priority: Minor
>
> I'm using SecuredRemoteAddressRequestWrapperFactory and what I get is:
> {noformat}
> 2017-08-08 09:07:53.460 DEBUG 3851 --- [nio-8080-exec-3] 
> ecuredRemoteAddressRequestWrapperFactory : Incoming request 
> uri=/id/cari-wanita/di/Kota%20Malang,%20Jawa%20Timur,%20Republic%20of%20Indonesia
>  with originalSecure='false', remoteAddr='127.0.0.1' will be seen with 
> newSecure='false'
> {noformat}
> Since remoteAddr is 127.* then it should be treated as secure, per 
> documentation.
> This code in SecuredRemoteAddressRequestWrapperFactory is probably buggy: 
> (i.e. need to remove {{==false}})
> {code:java}
>   @Override
>   public boolean needsWrapper(final HttpServletRequest request)
>   {
>   return !request.isSecure() &&
>   matchesOne(request.getRemoteAddr(), 
> config.securedRemoteAddresses) == false;
>   }
> {code}
> Additionally, newSecure = should be {{xRequest.isSecure()}} :
> {code:java}
>   HttpServletRequest xRequest = super.getWrapper(request);
>   if (log.isDebugEnabled())
>   {
>   log.debug("Incoming request uri=" + 
> request.getRequestURI() + " with originalSecure='" +
>   request.isSecure() + "', remoteAddr='" + 
> request.getRemoteAddr() +
>   "' will be seen with newSecure='" + 
> request.isSecure() + "'");
>   }
> {code}
> Related to WICKET-3015.
> Tag [~jdonnerstag] [~pete]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: WICKET-6440 SecuredRemoteAddressRequestWrapperFactory doesn't make request secure

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master 0d6278107 -> 48f458091


WICKET-6440 SecuredRemoteAddressRequestWrapperFactory doesn't make request 
secure

Use the wrapped request in the logging of the new secure state

(cherry picked from commit 18a1c2f9ea793a6707b30644f14a63a5edafcbc4)


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

Branch: refs/heads/master
Commit: 48f45809154558c1a6edba35f7211a0fd3f196ac
Parents: 0d62781
Author: Martin Tzvetanov Grigorov 
Authored: Tue Sep 5 00:32:03 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 5 00:33:07 2017 +0300

--
 .../servlet/SecuredRemoteAddressRequestWrapperFactory.java  | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/48f45809/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
index caeaf56..eb1dbae 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
@@ -93,7 +93,6 @@ public class SecuredRemoteAddressRequestWrapperFactory 
extends AbstractRequestWr
 
private final static String SECURED_REMOTE_ADDRESSES_PARAMETER = 
"securedRemoteAddresses";
 
-   /** */
public static class Config
{
/** @see #setSecuredRemoteAdresses(String) */
@@ -147,9 +146,6 @@ public class SecuredRemoteAddressRequestWrapperFactory 
extends AbstractRequestWr
this.config = config;
}
 
-   /**
-* {@inheritDoc}
-*/
@Override
public HttpServletRequest getWrapper(final HttpServletRequest request)
{
@@ -159,15 +155,12 @@ public class SecuredRemoteAddressRequestWrapperFactory 
extends AbstractRequestWr
{
log.debug("Incoming request uri=" + 
request.getRequestURI() + " with originalSecure='" +
request.isSecure() + "', remoteAddr='" + 
request.getRemoteAddr() +
-   "' will be seen with newSecure='" + 
request.isSecure() + "'");
+   "' will be seen with newSecure='" + 
xRequest.isSecure() + "'");
}
 
return xRequest;
}
 
-   /**
-* {@inheritDoc}
-*/
@Override
public boolean needsWrapper(final HttpServletRequest request)
{



wicket git commit: WICKET-6440 SecuredRemoteAddressRequestWrapperFactory doesn't make request secure

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x bbe250984 -> 18a1c2f9e


WICKET-6440 SecuredRemoteAddressRequestWrapperFactory doesn't make request 
secure

Use the wrapped request in the logging of the new secure state


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

Branch: refs/heads/wicket-7.x
Commit: 18a1c2f9ea793a6707b30644f14a63a5edafcbc4
Parents: bbe2509
Author: Martin Tzvetanov Grigorov 
Authored: Tue Sep 5 00:32:03 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 5 00:32:03 2017 +0300

--
 .../servlet/SecuredRemoteAddressRequestWrapperFactory.java  | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/18a1c2f9/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
index caeaf56..eb1dbae 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/SecuredRemoteAddressRequestWrapperFactory.java
@@ -93,7 +93,6 @@ public class SecuredRemoteAddressRequestWrapperFactory 
extends AbstractRequestWr
 
private final static String SECURED_REMOTE_ADDRESSES_PARAMETER = 
"securedRemoteAddresses";
 
-   /** */
public static class Config
{
/** @see #setSecuredRemoteAdresses(String) */
@@ -147,9 +146,6 @@ public class SecuredRemoteAddressRequestWrapperFactory 
extends AbstractRequestWr
this.config = config;
}
 
-   /**
-* {@inheritDoc}
-*/
@Override
public HttpServletRequest getWrapper(final HttpServletRequest request)
{
@@ -159,15 +155,12 @@ public class SecuredRemoteAddressRequestWrapperFactory 
extends AbstractRequestWr
{
log.debug("Incoming request uri=" + 
request.getRequestURI() + " with originalSecure='" +
request.isSecure() + "', remoteAddr='" + 
request.getRemoteAddr() +
-   "' will be seen with newSecure='" + 
request.isSecure() + "'");
+   "' will be seen with newSecure='" + 
xRequest.isSecure() + "'");
}
 
return xRequest;
}
 
-   /**
-* {@inheritDoc}
-*/
@Override
public boolean needsWrapper(final HttpServletRequest request)
{



[jira] [Commented] (WICKET-6440) SecuredRemoteAddressRequestWrapperFactory doesn't make request secure

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6440:
-

Why do you think that `== false` should be removed ?

{code}
return !request.isSecure() &&
matchesOne(request.getRemoteAddr(), 
config.securedRemoteAddresses) == false;
{code}

I read it as: if the request is not secure and doesn't match any of the secured 
addresses then it needs a wrapper.


> SecuredRemoteAddressRequestWrapperFactory doesn't make request secure
> -
>
> Key: WICKET-6440
> URL: https://issues.apache.org/jira/browse/WICKET-6440
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
>Reporter: Hendy Irawan
>Priority: Minor
>
> I'm using SecuredRemoteAddressRequestWrapperFactory and what I get is:
> {noformat}
> 2017-08-08 09:07:53.460 DEBUG 3851 --- [nio-8080-exec-3] 
> ecuredRemoteAddressRequestWrapperFactory : Incoming request 
> uri=/id/cari-wanita/di/Kota%20Malang,%20Jawa%20Timur,%20Republic%20of%20Indonesia
>  with originalSecure='false', remoteAddr='127.0.0.1' will be seen with 
> newSecure='false'
> {noformat}
> Since remoteAddr is 127.* then it should be treated as secure, per 
> documentation.
> This code in SecuredRemoteAddressRequestWrapperFactory is probably buggy: 
> (i.e. need to remove {{==false}})
> {code:java}
>   @Override
>   public boolean needsWrapper(final HttpServletRequest request)
>   {
>   return !request.isSecure() &&
>   matchesOne(request.getRemoteAddr(), 
> config.securedRemoteAddresses) == false;
>   }
> {code}
> Additionally, newSecure = should be {{xRequest.isSecure()}} :
> {code:java}
>   HttpServletRequest xRequest = super.getWrapper(request);
>   if (log.isDebugEnabled())
>   {
>   log.debug("Incoming request uri=" + 
> request.getRequestURI() + " with originalSecure='" +
>   request.isSecure() + "', remoteAddr='" + 
> request.getRemoteAddr() +
>   "' will be seen with newSecure='" + 
> request.isSecure() + "'");
>   }
> {code}
> Related to WICKET-3015.
> Tag [~jdonnerstag] [~pete]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6459) Ajax re-renders of enclosures do not render their children's header contributions

2017-09-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on WICKET-6459:


Github user disblader closed the pull request at:

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


> Ajax re-renders of enclosures do not render their children's header 
> contributions
> -
>
> Key: WICKET-6459
> URL: https://issues.apache.org/jira/browse/WICKET-6459
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6, 7.8.0
>Reporter: Domas Poliakas
>Assignee: Martin Grigorov
>Priority: Minor
> Fix For: 7.9.0, 8.0.0-M8
>
>
> When a component in an enclosure is added to the AjaxRequestTarget, its (and 
> subsequently its children's) header contributions are not rendered. 
> AjaxEnclosureListener replaces any components with enclosures that are in the 
> target with their enclosures. However, in the wicket hierarchy the enclosures 
> appear to be siblings to the components they enclose. What this causes is 
> that when the default ChildFirstHeaderRenderStrategy attempts to render the 
> header contributions for the enclosure, nothing is rendered as the enclosure 
> itself has no children in the hierarchy.
> On one hand, ChildFirstHeaderRenderStrategy seems to be the culprit - it 
> should detect enclosures and act accordingly - but fixing the problem there 
> would cause it to resurface in the future if the default implementation of 
> header render strategy is changed. What would be a correct way fix for this? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (WICKET-6456) Headers not rendered for components inside nested TransparentWebMarkupContainer on ajax update

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6456.
-
Resolution: Not A Problem

> Headers not rendered for components inside nested 
> TransparentWebMarkupContainer on ajax update
> --
>
> Key: WICKET-6456
> URL: https://issues.apache.org/jira/browse/WICKET-6456
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.6.0
>Reporter: Jezza
>
> Due to 
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/TransparentWebMarkupContainer.java#L87,
>  if a TransparentWebMarkupContainer isn't the root of the ajax update, it 
> won't be able to render its children's headers.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


buildbot success in on wicket-branch-7.x

2017-09-04 Thread buildbot
The Buildbot has detected a restored build on builder wicket-branch-7.x while 
building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-branch-7.x/builds/435

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-branch-7.x-commit' triggered this build
Build Source Stamp: [branch wicket-7.x] 28448abd127527fbc9c0b6bf1c72e99231c4c865
Blamelist: Martin Tzvetanov Grigorov 

Build succeeded!

Sincerely,
 -The Buildbot





[jira] [Resolved] (WICKET-6459) Ajax re-renders of enclosures do not render their children's header contributions

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6459.
-
   Resolution: Fixed
 Assignee: Martin Grigorov
Fix Version/s: 8.0.0-M8
   7.9.0

The PR is merged!

I didn't notice earlier that the commit messages do not mention WICKET-6459 and 
that's why they do not appear in this ticket.

Thank you, [~dpoliakas]!

> Ajax re-renders of enclosures do not render their children's header 
> contributions
> -
>
> Key: WICKET-6459
> URL: https://issues.apache.org/jira/browse/WICKET-6459
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6, 7.8.0
>Reporter: Domas Poliakas
>Assignee: Martin Grigorov
>Priority: Minor
> Fix For: 7.9.0, 8.0.0-M8
>
>
> When a component in an enclosure is added to the AjaxRequestTarget, its (and 
> subsequently its children's) header contributions are not rendered. 
> AjaxEnclosureListener replaces any components with enclosures that are in the 
> target with their enclosures. However, in the wicket hierarchy the enclosures 
> appear to be siblings to the components they enclose. What this causes is 
> that when the default ChildFirstHeaderRenderStrategy attempts to render the 
> header contributions for the enclosure, nothing is rendered as the enclosure 
> itself has no children in the hierarchy.
> On one hand, ChildFirstHeaderRenderStrategy seems to be the culprit - it 
> should detect enclosures and act accordingly - but fixing the problem there 
> would cause it to resurface in the future if the default implementation of 
> header render strategy is changed. What would be a correct way fix for this? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[1/2] wicket git commit: Ajax inline enclosure fix.

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master a690aa063 -> 0d6278107


Ajax inline enclosure fix.

(cherry picked from commit f9fa76cf4c46674dd4d4e83d5474e7bc904ec457)


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

Branch: refs/heads/master
Commit: c4a92dfdb63fcb294e446e36454cd9730a7a9b43
Parents: a690aa0
Author: Domas Poliakas 
Authored: Fri Sep 1 17:39:42 2017 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 5 00:09:57 2017 +0300

--
 .../AbstractHeaderRenderStrategy.java   | 28 ++
 .../ChildFirstHeaderRenderStrategyTest.java | 39 ++
 .../markup/renderStrategy/SimplePage3.html  | 16 ++
 .../markup/renderStrategy/SimplePage3.java  | 56 
 4 files changed, 139 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c4a92dfd/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
index aef5d4e..91d5fd1 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
@@ -23,7 +23,10 @@ import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.html.IHeaderContributor;
 import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
 import 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.HeaderStreamState;
+import org.apache.wicket.markup.html.internal.InlineEnclosure;
 import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.util.visit.IVisit;
+import org.apache.wicket.util.visit.IVisitor;
 
 /**
  * An abstract implementation of a header render strategy which is only 
missing the code to traverse
@@ -116,7 +119,32 @@ public abstract class AbstractHeaderRenderStrategy 
implements IHeaderRenderStrat
final HeaderStreamState headerStreamState, final Component 
rootComponent)
{
headerContainer.renderHeaderTagBody(headerStreamState);
+
rootComponent.internalRenderHead(headerContainer);
+
+   // If the root component is an inline enclosure, then we force 
header render of its controller as well; normally
+   // this would not trigger because the controller is a sibling 
of the enclosure
+   if (rootComponent instanceof InlineEnclosure) {
+   InlineEnclosure typedComponent = (InlineEnclosure) 
rootComponent;
+
+   final String childId = typedComponent.getChildId();
+
+   // Visit the siblings of the enclosure to attempt and 
find the controller of the enclosure
+   Component enclosureController = 
typedComponent.getParent().visitChildren(new IVisitor() {
+   @Override
+   public void component(Component object, 
IVisit visit) {
+   if (object.getId().equals(childId)){
+   visit.stop(object);
+   } else {
+   visit.dontGoDeeper();
+   }
+   }
+   });
+
+   if (enclosureController != null){
+   
enclosureController.internalRenderHead(headerContainer);
+   }
+   }
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/c4a92dfd/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
index 516ce6e..e68c812 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
@@ -19,10 +19,16 @@ package org.apache.wicket.markup.renderStrategy;
 import org.apache.wicket.Page;
 

[2/2] wicket git commit: Refactored for better comprehension

2017-09-04 Thread mgrigorov
Refactored for better comprehension

(cherry picked from commit bbe25098439394541f1acf8f15e4b2442b54674a)


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

Branch: refs/heads/master
Commit: 0d62781071b3fbc2d1982419d55ec6bfdc62e626
Parents: c4a92df
Author: Domas Poliakas 
Authored: Mon Sep 4 20:07:40 2017 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 5 00:10:08 2017 +0300

--
 .../AbstractHeaderRenderStrategy.java   | 55 ---
 .../ChildFirstHeaderRenderStrategyTest.java |  5 +-
 .../renderStrategy/EnclosureAjaxRenderPage.html | 16 ++
 .../renderStrategy/EnclosureAjaxRenderPage.java | 56 
 .../markup/renderStrategy/SimplePage3.html  | 16 --
 .../markup/renderStrategy/SimplePage3.java  | 56 
 6 files changed, 110 insertions(+), 94 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0d627810/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
index 91d5fd1..25ab204 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
@@ -18,6 +18,7 @@ package org.apache.wicket.markup.renderStrategy;
 
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.application.HeaderContributorListenerCollection;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.html.IHeaderContributor;
@@ -122,28 +123,44 @@ public abstract class AbstractHeaderRenderStrategy 
implements IHeaderRenderStrat
 
rootComponent.internalRenderHead(headerContainer);
 
-   // If the root component is an inline enclosure, then we force 
header render of its controller as well; normally
-   // this would not trigger because the controller is a sibling 
of the enclosure
if (rootComponent instanceof InlineEnclosure) {
-   InlineEnclosure typedComponent = (InlineEnclosure) 
rootComponent;
-
-   final String childId = typedComponent.getChildId();
-
-   // Visit the siblings of the enclosure to attempt and 
find the controller of the enclosure
-   Component enclosureController = 
typedComponent.getParent().visitChildren(new IVisitor() {
-   @Override
-   public void component(Component object, 
IVisit visit) {
-   if (object.getId().equals(childId)){
-   visit.stop(object);
-   } else {
-   visit.dontGoDeeper();
-   }
-   }
-   });
+   renderInlineEnclosure(headerContainer, 
(InlineEnclosure) rootComponent);
+   }
+   }
+
 
-   if (enclosureController != null){
-   
enclosureController.internalRenderHead(headerContainer);
+   /**
+* Searches for the siblings of the given enclosure for the controller 
of the given enclosure and
+* renders that controller's header contributions.
+*
+* This is done explicitly because when an enclosed component is added 
to the {@link AjaxRequestTarget}
+* and is consequently replaced for render by the enclosure, the 
component's header contributions would not make
+* it to the response as the enclosure is a sibling of the component in 
the hierarchy and only children's header contributions
+* are added to the response.
+*
+* Fixes WICKET-6459
+*
+* @param container the header container to render the header 
contributions of the enclosure's controller
+* @param enclosure the enclosure whose controller's contributions are 
going to be rendered
+*/
+   protected void renderInlineEnclosure(HtmlHeaderContainer container, 
InlineEnclosure enclosure){
+
+   final String childId = enclosure.getChildId();
+
+   // Visi

[2/2] wicket git commit: Ajax inline enclosure fix.

2017-09-04 Thread mgrigorov
Ajax inline enclosure fix.


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

Branch: refs/heads/wicket-7.x
Commit: f9fa76cf4c46674dd4d4e83d5474e7bc904ec457
Parents: 28448ab
Author: Domas Poliakas 
Authored: Fri Sep 1 17:39:42 2017 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 5 00:03:43 2017 +0300

--
 .../AbstractHeaderRenderStrategy.java   | 28 ++
 .../ChildFirstHeaderRenderStrategyTest.java | 39 ++
 .../markup/renderStrategy/SimplePage3.html  | 16 ++
 .../markup/renderStrategy/SimplePage3.java  | 56 
 4 files changed, 139 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f9fa76cf/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
index aef5d4e..91d5fd1 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
@@ -23,7 +23,10 @@ import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.html.IHeaderContributor;
 import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
 import 
org.apache.wicket.markup.html.internal.HtmlHeaderContainer.HeaderStreamState;
+import org.apache.wicket.markup.html.internal.InlineEnclosure;
 import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.util.visit.IVisit;
+import org.apache.wicket.util.visit.IVisitor;
 
 /**
  * An abstract implementation of a header render strategy which is only 
missing the code to traverse
@@ -116,7 +119,32 @@ public abstract class AbstractHeaderRenderStrategy 
implements IHeaderRenderStrat
final HeaderStreamState headerStreamState, final Component 
rootComponent)
{
headerContainer.renderHeaderTagBody(headerStreamState);
+
rootComponent.internalRenderHead(headerContainer);
+
+   // If the root component is an inline enclosure, then we force 
header render of its controller as well; normally
+   // this would not trigger because the controller is a sibling 
of the enclosure
+   if (rootComponent instanceof InlineEnclosure) {
+   InlineEnclosure typedComponent = (InlineEnclosure) 
rootComponent;
+
+   final String childId = typedComponent.getChildId();
+
+   // Visit the siblings of the enclosure to attempt and 
find the controller of the enclosure
+   Component enclosureController = 
typedComponent.getParent().visitChildren(new IVisitor() {
+   @Override
+   public void component(Component object, 
IVisit visit) {
+   if (object.getId().equals(childId)){
+   visit.stop(object);
+   } else {
+   visit.dontGoDeeper();
+   }
+   }
+   });
+
+   if (enclosureController != null){
+   
enclosureController.internalRenderHead(headerContainer);
+   }
+   }
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/f9fa76cf/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
index 516ce6e..e68c812 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
@@ -19,10 +19,16 @@ package org.apache.wicket.markup.renderStrategy;
 import org.apache.wicket.Page;
 import org.apache.wicket.util.tester.WicketTestCase;
 import org.apache.wicket.util.tester.WicketTester;
+import org.junit.Ignore;
 import org.junit

[1/2] wicket git commit: Refactored for better comprehension

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 28448abd1 -> bbe250984


Refactored for better comprehension


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

Branch: refs/heads/wicket-7.x
Commit: bbe25098439394541f1acf8f15e4b2442b54674a
Parents: f9fa76c
Author: Domas Poliakas 
Authored: Mon Sep 4 20:07:40 2017 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Sep 5 00:03:43 2017 +0300

--
 .../AbstractHeaderRenderStrategy.java   | 55 ---
 .../ChildFirstHeaderRenderStrategyTest.java |  5 +-
 .../renderStrategy/EnclosureAjaxRenderPage.html | 16 ++
 .../renderStrategy/EnclosureAjaxRenderPage.java | 56 
 .../markup/renderStrategy/SimplePage3.html  | 16 --
 .../markup/renderStrategy/SimplePage3.java  | 56 
 6 files changed, 110 insertions(+), 94 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/bbe25098/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
index 91d5fd1..25ab204 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/renderStrategy/AbstractHeaderRenderStrategy.java
@@ -18,6 +18,7 @@ package org.apache.wicket.markup.renderStrategy;
 
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.application.HeaderContributorListenerCollection;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.html.IHeaderContributor;
@@ -122,28 +123,44 @@ public abstract class AbstractHeaderRenderStrategy 
implements IHeaderRenderStrat
 
rootComponent.internalRenderHead(headerContainer);
 
-   // If the root component is an inline enclosure, then we force 
header render of its controller as well; normally
-   // this would not trigger because the controller is a sibling 
of the enclosure
if (rootComponent instanceof InlineEnclosure) {
-   InlineEnclosure typedComponent = (InlineEnclosure) 
rootComponent;
-
-   final String childId = typedComponent.getChildId();
-
-   // Visit the siblings of the enclosure to attempt and 
find the controller of the enclosure
-   Component enclosureController = 
typedComponent.getParent().visitChildren(new IVisitor() {
-   @Override
-   public void component(Component object, 
IVisit visit) {
-   if (object.getId().equals(childId)){
-   visit.stop(object);
-   } else {
-   visit.dontGoDeeper();
-   }
-   }
-   });
+   renderInlineEnclosure(headerContainer, 
(InlineEnclosure) rootComponent);
+   }
+   }
+
 
-   if (enclosureController != null){
-   
enclosureController.internalRenderHead(headerContainer);
+   /**
+* Searches for the siblings of the given enclosure for the controller 
of the given enclosure and
+* renders that controller's header contributions.
+*
+* This is done explicitly because when an enclosed component is added 
to the {@link AjaxRequestTarget}
+* and is consequently replaced for render by the enclosure, the 
component's header contributions would not make
+* it to the response as the enclosure is a sibling of the component in 
the hierarchy and only children's header contributions
+* are added to the response.
+*
+* Fixes WICKET-6459
+*
+* @param container the header container to render the header 
contributions of the enclosure's controller
+* @param enclosure the enclosure whose controller's contributions are 
going to be rendered
+*/
+   protected void renderInlineEnclosure(HtmlHeaderContainer container, 
InlineEnclosure enclosure){
+
+   final String childId = enclosure.getChildId();
+
+  

[jira] [Commented] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6454 WicketApplication behind a proxy with restrictive internet access 
can not initialized


> WicketApplication behind a proxy with restrictive internet access can not 
> initialized
> -
>
> Key: WICKET-6454
> URL: https://issues.apache.org/jira/browse/WICKET-6454
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 7.6.0
> Environment: WicketApplication behind a proxy with restrictive 
> internet access
>Reporter: Hans Schneider
>Assignee: Martin Grigorov
> Fix For: 7.9.0
>
>
> I have a Application with a Wicket frontend developed and on my developer 
> workstation with internet access starts the application successul. In a 
> production server with restricte internet access the application can not 
> start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading 
> servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) 
> ~[na:1.7.0_79]
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
> ~[na:1.7.0_79]
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
> ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
>   at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
>   at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
>  ~[na:na]
>   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) 
> ~[na:na]
>   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) 
> ~[na:na]
>   at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
>  ~[na:na]
>   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
> ~[na:1.7.0_79]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67)
>  [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to 
> disable the validation of the XML?
> I have found a link on how the improvement could be implemented in the Class 
> org.apache.wicket.util.file.WebXmlFile and Method
> {code}
> public final Set getFilterPath(final boolean isServlet, final String 
> filterName,
>   final InputStream is) throws ParserConfigurationExc

[jira] [Resolved] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6454.
-
   Resolution: Fixed
Fix Version/s: 7.9.0

The fix won't be ported to 8.x because 2.3 is too old. Everyone should use 3.x 
these days.

> WicketApplication behind a proxy with restrictive internet access can not 
> initialized
> -
>
> Key: WICKET-6454
> URL: https://issues.apache.org/jira/browse/WICKET-6454
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 7.6.0
> Environment: WicketApplication behind a proxy with restrictive 
> internet access
>Reporter: Hans Schneider
>Assignee: Martin Grigorov
> Fix For: 7.9.0
>
>
> I have a Application with a Wicket frontend developed and on my developer 
> workstation with internet access starts the application successul. In a 
> production server with restricte internet access the application can not 
> start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading 
> servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) 
> ~[na:1.7.0_79]
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
> ~[na:1.7.0_79]
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
> ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
>   at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
>   at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
>  ~[na:na]
>   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) 
> ~[na:na]
>   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) 
> ~[na:na]
>   at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
>  ~[na:na]
>   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
> ~[na:1.7.0_79]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67)
>  [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to 
> disable the validation of the XML?
> I have found a link on how the improvement could be implemented in the Class 
> org.apache.wicket.util.file.WebXmlFile and Method
> {code}
> public final Set getFilterPath(final boolean isServlet, final String 
> filterName,
>   final InputStream is) throws ParserConfigurationException, 
> SAXException, IOException
> {code}
> https://stackoverflow.com/questions/4002885/unknown-host-exception-while-parsing-an-xml-file



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: WICKET-6454 WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 13b600c30 -> 28448abd1


WICKET-6454 WicketApplication behind a proxy with restrictive internet access 
can not initialized


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

Branch: refs/heads/wicket-7.x
Commit: 28448abd127527fbc9c0b6bf1c72e99231c4c865
Parents: 13b600c
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 4 23:56:48 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 4 23:56:48 2017 +0300

--
 .../wicket/util/file/dtds/web-app_2_3.dtd   | 1024 ++
 .../wicket/util/xml/CustomEntityResolver.java   |5 +-
 2 files changed, 1027 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/28448abd/wicket-util/src/main/java/org/apache/wicket/util/file/dtds/web-app_2_3.dtd
--
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/file/dtds/web-app_2_3.dtd 
b/wicket-util/src/main/java/org/apache/wicket/util/file/dtds/web-app_2_3.dtd
new file mode 100644
index 000..d65bc72
--- /dev/null
+++ b/wicket-util/src/main/java/org/apache/wicket/util/file/dtds/web-app_2_3.dtd
@@ -0,0 +1,1024 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/wicket/blob/28448abd/wicket-util/src/main/java/org/apache/wicket/util/xml/CustomEntityResolver.java
--
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/xml/CustomEntityResolver.java
 
b/wicket-util/src/main/java/org/apache/wicket/util/xml/CustomEntityResolver.java
index cb6f33d..b99694e 100644
--- 
a/wicket-util/src/main/java/org/apache/wicket/util/xml/CustomEntityResolver.java
+++ 
b/wicket-util/src/main/java/org/apache/wicket/util/xml/CustomEntityResolver.java
@@ -23,6 +23,7 @@ import java.util.Map;
 
 import javax.servlet.Filter;
 
+import org.apache.wicket.util.file.WebXmlFile;
 import org.apache.wicket.util.lang.Args;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
@@ -138,7 +139,7 @@ public class CustomEntityResolver implements EntityResolver
 * 
 * manages locating an entity
 */
-   public static interface EntityLocator
+   public interface EntityLocator
{
/**
 * @return input source
@@ -168,7 +169,7 @@ public class CustomEntityResolver implements EntityResolver
@Override
public InputSource locateInputSource()
{
-   InputStream stream = 
Filter.class.getResourceAsStream("resources/" + name);
+   InputStream stream = 
WebXmlFile.class.getResourceAsStream("dtds/" + name);
 
if (stream == null)
{



[jira] [Commented] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6454:
-

[~hschneider] Since you use Wicket 7.x then you must be using Servlet 3.0 
implementation (sorry but I am too lazy to search which version of the servlet 
spec JBoss 7.1 supports). So you can just update your web.xml to use 3.0 XSD 
instead and you won't have this problem. 

> WicketApplication behind a proxy with restrictive internet access can not 
> initialized
> -
>
> Key: WICKET-6454
> URL: https://issues.apache.org/jira/browse/WICKET-6454
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 7.6.0
> Environment: WicketApplication behind a proxy with restrictive 
> internet access
>Reporter: Hans Schneider
>Assignee: Martin Grigorov
>
> I have a Application with a Wicket frontend developed and on my developer 
> workstation with internet access starts the application successul. In a 
> production server with restricte internet access the application can not 
> start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading 
> servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) 
> ~[na:1.7.0_79]
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
> ~[na:1.7.0_79]
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
> ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
>   at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
>   at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
>  ~[na:na]
>   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) 
> ~[na:na]
>   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) 
> ~[na:na]
>   at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
>  ~[na:na]
>   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
> ~[na:1.7.0_79]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67)
>  [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to 
> disable the validation of the XML?
> I have found a link on how the improvement could be implemented in the Class 
> org.apache.wicket.util.file.WebXmlFile and Method
> {code}
> public final Set getFilterPath(final boolean isServlet, final String 
> filterName,
>   final InputStream is) throws ParserConfigurationException, 
> SAXException, IOException
> {code}
> https://stackove

[jira] [Commented] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6454:
-

Or actually it seems it is possible to copy them.
org/apache/tomcat/tomcat-servlet-api/7.0.55/tomcat-servlet-api-7.0.55.jar!/javax/servlet/resources/web-app_2_3.dtd
org/jboss/spec/javax/servlet/jboss-servlet-api_3.1_spec/1.0.0.Final/jboss-servlet-api_3.1_spec-1.0.0.Final.jar!/javax/servlet/resources/web-app_2_3.dtd
org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar!/javax/servlet/resources/web-app_2_3.dtd

Every OSS Servlet container has them copied.
Java EE is going to be donated to OSS foundation soon so it should be fine to 
add copies in Wicket too.

> WicketApplication behind a proxy with restrictive internet access can not 
> initialized
> -
>
> Key: WICKET-6454
> URL: https://issues.apache.org/jira/browse/WICKET-6454
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 7.6.0
> Environment: WicketApplication behind a proxy with restrictive 
> internet access
>Reporter: Hans Schneider
>Assignee: Martin Grigorov
>
> I have a Application with a Wicket frontend developed and on my developer 
> workstation with internet access starts the application successul. In a 
> production server with restricte internet access the application can not 
> start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading 
> servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) 
> ~[na:1.7.0_79]
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
> ~[na:1.7.0_79]
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
> ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
>   at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
>   at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
>  ~[na:na]
>   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) 
> ~[na:na]
>   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) 
> ~[na:na]
>   at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
>  ~[na:na]
>   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
> ~[na:1.7.0_79]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67)
>  [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to 
> disable the validation of the XML?
> I have found a link on how

[jira] [Commented] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6454:
-

Until servlet-api.jar v2.4 the DTD files were in this jar and 
org.apache.wicket.util.xml.CustomEntityResolver was using them to resolve the 
DTD locally, without internet connection.
Since v 3.0.0 the DTDs (and XSDs) are no more part of the content in the jar 
and because of this this EntityResolver doesn't help much.
Unfortunately due to licencing issues it is not possible to copy those files 
into Wicket jars. 

> WicketApplication behind a proxy with restrictive internet access can not 
> initialized
> -
>
> Key: WICKET-6454
> URL: https://issues.apache.org/jira/browse/WICKET-6454
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 7.6.0
> Environment: WicketApplication behind a proxy with restrictive 
> internet access
>Reporter: Hans Schneider
>Assignee: Martin Grigorov
>
> I have a Application with a Wicket frontend developed and on my developer 
> workstation with internet access starts the application successul. In a 
> production server with restricte internet access the application can not 
> start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading 
> servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) 
> ~[na:1.7.0_79]
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
> ~[na:1.7.0_79]
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
> ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
>   at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
>   at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
>  ~[na:na]
>   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) 
> ~[na:na]
>   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) 
> ~[na:na]
>   at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
>  ~[na:na]
>   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
> ~[na:1.7.0_79]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67)
>  [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to 
> disable the validation of the XML?
> I have found a link on how the improvement could be implemented in the Class 
> org.apache.wicket.util.file.WebXmlFile and Method
> {code}
> public final Set getFilterPath(final boolean isServlet, final String 
> 

wicket git commit: Update Log4j 2 and Mockito to 2.9.0

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master 2295939cc -> a690aa063


Update Log4j 2 and Mockito to 2.9.0


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

Branch: refs/heads/master
Commit: a690aa06321e1286cb093f2792cbd536517bac9d
Parents: 2295939
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 4 22:59:17 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 4 23:24:29 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/a690aa06/pom.xml
--
diff --git a/pom.xml b/pom.xml
index a415b0a..c2b4997 100644
--- a/pom.xml
+++ b/pom.xml
@@ -133,9 +133,9 @@
3.1.0
2.10.4
2.20
-   2.8.47
+   2.9.0
1.7.25
-   2.8.2
+   2.9.0
2.0.0.0
2.6
1.8.10



[jira] [Commented] (WICKET-6452) Problem while multiple opening same page in WICkET 8.0.0-M6

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6452:
-

Hi,

Can you please provide a demo application 
(http://wicket.apache.org/start/quickstart.html) ?
This way it will be easier for us to debug and fix it.
Thank you!

> Problem while multiple opening same page in WICkET 8.0.0-M6
> ---
>
> Key: WICKET-6452
> URL: https://issues.apache.org/jira/browse/WICKET-6452
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6
> Environment: Windows 10 64bit CZ Java(TM) SE Runtime Environment 
> (build 1.8.0_131-b11)
>Reporter: KAHA
> Attachments: ABRA BI - Google Chrome 15.08.2017 13_33_45.mp4, ABRA BI 
> - Google Chrome 15.08.2017 13_33_45_x264.mov
>
>
> As you can see on the video, there is a problem when I multiple open same 
> page. Each one page is rendered again and again and again (you can see it on 
> rapidly increasing page number). There were no problem with same excercise on 
> Wicket 7. 
> I think that problem is in method 
> org.apache.wicket.core.request.handler.PageProvider.getPageInstance(). In 
> Wicket 7 there was 
> if (pageInstance == null)
> {
>   resolvePageInstance(pageId, pageClass, pageParameters, renderCount);
>   if (pageInstance == null)
>   {
>   throw new PageExpiredException("Page with id '" + pageId + "' 
> has expired.");
>   }
> }
> return pageInstance;
> If pageInstance is null, method resolvePageInstance is called and 
> resolvePageInstance first trying to load page stored on disk (stored thanks 
> Serialization) and it will success. If there is no page stored on disk with 
> this pageID, than getPageSource().newPageInstance( ...  is called to create 
> new page instance.
> On other hand on the new wicket 8 same method 
> org.apache.wicket.core.request.handler.PageProvider.getPageInstance() looks 
> like this
> return getProvision().getPage();
> and In Provision class method getPage looks like this
> if (page == null && doesProvideNewPage())
> {
>   page = getPageSource().newPageInstance(pageClass, 
> pageParameters);
> }
> return page;
> if the page is null, method does not try to load page stored on the disk, but 
> imediatly creates a new instance and this is why same page is created many 
> times repeatly.
> But it is only my guess.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-6454:
---

Assignee: Martin Grigorov

> WicketApplication behind a proxy with restrictive internet access can not 
> initialized
> -
>
> Key: WICKET-6454
> URL: https://issues.apache.org/jira/browse/WICKET-6454
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 7.6.0
> Environment: WicketApplication behind a proxy with restrictive 
> internet access
>Reporter: Hans Schneider
>Assignee: Martin Grigorov
>
> I have a Application with a Wicket frontend developed and on my developer 
> workstation with internet access starts the application successul. In a 
> production server with restricte internet access the application can not 
> start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading 
> servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
>   at 
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) 
> ~[na:1.7.0_79]
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
> ~[na:1.7.0_79]
>   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
> ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
>   at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
>   at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
>   at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
>   at sun.net.www.http.HttpClient.(HttpClient.java:211) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
>   at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
>  ~[na:na]
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
>  ~[na:na]
>   at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
>  ~[na:na]
>   at 
> org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
>  ~[na:na]
>   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) 
> ~[na:na]
>   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) 
> ~[na:na]
>   at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
>  ~[na:na]
>   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) 
> ~[na:1.7.0_79]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) 
> [wicket-util-7.6.0.jar:7.6.0]
>   at 
> org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67)
>  [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to 
> disable the validation of the XML?
> I have found a link on how the improvement could be implemented in the Class 
> org.apache.wicket.util.file.WebXmlFile and Method
> {code}
> public final Set getFilterPath(final boolean isServlet, final String 
> filterName,
>   final InputStream is) throws ParserConfigurationException, 
> SAXException, IOException
> {code}
> https://stackoverflow.com/questions/4002885/unknown-host-exception-while-parsing-an-xml-file



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6448) Provide behavior that disables a button after click

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6448:
-

I've updated the title and the description.
I still believe that it is not possible to implement behavior that will cover 
everyone's needs so the description explain the simplest way to do it - via 
"disabled" attribute.

> Provide behavior that disables a button after click
> ---
>
> Key: WICKET-6448
> URL: https://issues.apache.org/jira/browse/WICKET-6448
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Kamil
> Attachments: block-comment-doublesubmit.png, showcase-preventClick.zip
>
>
> Wicket should provide a Behavior that can be assigned to (Ajax)Buttons and 
> when clicked those buttons should be disabled via the HTML "disabled" 
> attribute.
> For AjaxButtons the behavior should re-enable the button after processing the 
> Ajax response.
> 1)Run the app
> 2)Click "submit" quickly several times
> 3)Watch the console



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6448) Provide behavior that disables a button after click

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6448:

Description: 
Wicket should provide a Behavior that can be assigned to (Ajax)Buttons and when 
clicked those buttons should be disabled via the HTML "disabled" attribute.
For AjaxButtons the behavior should re-enable the button after processing the 
Ajax response.

1)Run the app
2)Click "submit" quickly several times
3)Watch the console

  was:
1)Run the app
2)Click "submit" quickly several times
3)Watch the console


> Provide behavior that disables a button after click
> ---
>
> Key: WICKET-6448
> URL: https://issues.apache.org/jira/browse/WICKET-6448
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Kamil
> Attachments: block-comment-doublesubmit.png, showcase-preventClick.zip
>
>
> Wicket should provide a Behavior that can be assigned to (Ajax)Buttons and 
> when clicked those buttons should be disabled via the HTML "disabled" 
> attribute.
> For AjaxButtons the behavior should re-enable the button after processing the 
> Ajax response.
> 1)Run the app
> 2)Click "submit" quickly several times
> 3)Watch the console



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6448) Provide behavior that disables a button after click

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6448:

Summary: Provide behavior that disables a button after click  (was: 
IndicatingAjaxButton should prevent double submit)

> Provide behavior that disables a button after click
> ---
>
> Key: WICKET-6448
> URL: https://issues.apache.org/jira/browse/WICKET-6448
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Kamil
> Attachments: block-comment-doublesubmit.png, showcase-preventClick.zip
>
>
> 1)Run the app
> 2)Click "submit" quickly several times
> 3)Watch the console



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (WICKET-6443) DateTextField(id,model) does not work

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6443.
-
Resolution: Not A Problem

> DateTextField(id,model) does not work  
> ---
>
> Key: WICKET-6443
> URL: https://issues.apache.org/jira/browse/WICKET-6443
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
> Environment: linux , Russian locale
>Reporter: LeonLeon2017
> Attachments: myproject.zip
>
>
> DateTextField(id,model) does not work  for ru locale ,because of incorrect 
> pattern by default.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (WICKET-6458) Websocket replacing a panel which uses websockets

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov edited comment on WICKET-6458 at 9/4/17 8:10 PM:
-

I had the desire to work on this but I have no time to fight with custom builds.
I understand that SBT is better for you but it slows me down. I've spend half 
an hour trying to find how to start your demo app in debug mode in my IDE and 
teach it to use Wicket -SNAPSHOT from my local ~/.m2.

Normal Wicket quickstart (http://wicket.apache.org/start/quickstart.html) would 
make me try again.


was (Author: mgrigorov):
I had the desire to work on this but I have no time to fight with custom builds.
I understand that SBT is better for you but it slows me down. I've spend half 
an hour trying to find how to start your demo app and teach it to use Wicket 
-SNAPSHOT from my local ~/.m2.

> Websocket replacing a panel which uses websockets
> -
>
> Key: WICKET-6458
> URL: https://issues.apache.org/jira/browse/WICKET-6458
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-native-websocket
>Affects Versions: 7.8.0
> Environment: Ubuntu 16.04
> Tomcat 8.5.20
>Reporter: Peter Henderson
>Assignee: Martin Grigorov
>Priority: Minor
>
> I've a page which initially shows a loading panel.
> This panel uses web sockets to trigger background loading when the connected 
> message is received.
> When the background loading has completed
> (onEvent => event.getPayload => WebSocketPushPayload => ???)
> I replace the loading place holder panel with the real data panel.
> The real data panel may also want to use web sockets, and show a loading 
> animation.
> (Turtles all the way down)
> The problem I'm seeing, is that the WebSocketBehavior::onConnected method is 
> not being called on the replaced panel.
> A scala sample which shows this problem.
> https://github.com/bollinger/WebSocketPanelReplace



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6458) Websocket replacing a panel which uses websockets

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-6458:
-

I had the desire to work on this but I have no time to fight with custom builds.
I understand that SBT is better for you but it slows me down. I've spend half 
an hour trying to find how to start your demo app and teach it to use Wicket 
-SNAPSHOT from my local ~/.m2.

> Websocket replacing a panel which uses websockets
> -
>
> Key: WICKET-6458
> URL: https://issues.apache.org/jira/browse/WICKET-6458
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-native-websocket
>Affects Versions: 7.8.0
> Environment: Ubuntu 16.04
> Tomcat 8.5.20
>Reporter: Peter Henderson
>Assignee: Martin Grigorov
>Priority: Minor
>
> I've a page which initially shows a loading panel.
> This panel uses web sockets to trigger background loading when the connected 
> message is received.
> When the background loading has completed
> (onEvent => event.getPayload => WebSocketPushPayload => ???)
> I replace the loading place holder panel with the real data panel.
> The real data panel may also want to use web sockets, and show a loading 
> animation.
> (Turtles all the way down)
> The problem I'm seeing, is that the WebSocketBehavior::onConnected method is 
> not being called on the replaced panel.
> A scala sample which shows this problem.
> https://github.com/bollinger/WebSocketPanelReplace



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6458) Websocket replacing a panel which uses websockets

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6458:

Priority: Minor  (was: Major)

> Websocket replacing a panel which uses websockets
> -
>
> Key: WICKET-6458
> URL: https://issues.apache.org/jira/browse/WICKET-6458
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-native-websocket
>Affects Versions: 7.8.0
> Environment: Ubuntu 16.04
> Tomcat 8.5.20
>Reporter: Peter Henderson
>Assignee: Martin Grigorov
>Priority: Minor
>
> I've a page which initially shows a loading panel.
> This panel uses web sockets to trigger background loading when the connected 
> message is received.
> When the background loading has completed
> (onEvent => event.getPayload => WebSocketPushPayload => ???)
> I replace the loading place holder panel with the real data panel.
> The real data panel may also want to use web sockets, and show a loading 
> animation.
> (Turtles all the way down)
> The problem I'm seeing, is that the WebSocketBehavior::onConnected method is 
> not being called on the replaced panel.
> A scala sample which shows this problem.
> https://github.com/bollinger/WebSocketPanelReplace



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6462) When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6462 When an Ajax Button is submitted, AjaxFormSubmitBehavior #
onSubmit is called twice

> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> ---
>
> Key: WICKET-6462
> URL: https://issues.apache.org/jira/browse/WICKET-6462
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M7, 8.0.0-M8
> Environment: 8.0.0-SNAPSHOT -  2017 08 31
>Reporter: francois
>Assignee: Andrea Del Bene
>Priority: Critical
> Attachments: wicket_quickstart.zip
>
>
> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> The appears after WICKET-6455.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: WICKET-6462 When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread adelbene
Repository: wicket
Updated Branches:
  refs/heads/master 1fc1e3d70 -> 2295939cc


WICKET-6462 When an Ajax Button is submitted, AjaxFormSubmitBehavior #
onSubmit is called twice

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

Branch: refs/heads/master
Commit: 2295939cca8d35e47280218a41accc708d226aec
Parents: 1fc1e3d
Author: Andrea Del Bene 
Authored: Mon Sep 4 21:48:41 2017 +0200
Committer: Andrea Del Bene 
Committed: Mon Sep 4 21:49:57 2017 +0200

--
 .../apache/wicket/ajax/form/AjaxFormSubmitBehavior.java  |  7 ---
 .../java/org/apache/wicket/markup/html/form/Form.java| 11 +++
 2 files changed, 7 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2295939c/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.java
index 3c0fbbf..0caca83 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.java
@@ -174,13 +174,6 @@ public abstract class AjaxFormSubmitBehavior extends 
AjaxEventBehavior
Form form = getForm();

form.getRootForm().onFormSubmitted(submitter);
-   
-   //the target form might have wantSubmitOnParentFormSubmit 
returning "false"
-   //so it must be explicitly submitted.
-   if (!form.isSubmitted())
-   {
-   form.onFormSubmitted(submitter);
-   }
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/2295939c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index 212a68f..1350e25 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -718,7 +718,7 @@ public class Form extends WebMarkupContainer
 */
public final void onFormSubmitted(IFormSubmitter submitter)
{
-   markFormsSubmitted();
+   markFormsSubmitted(submitter);
 
if (handleMultiPart())
{
@@ -984,18 +984,21 @@ public class Form extends WebMarkupContainer
 
/**
 * Sets FLAG_SUBMITTED to true on this form and every enabled nested 
form.
+* @param submitter 
 */
-   private void markFormsSubmitted()
+   private void markFormsSubmitted(IFormSubmitter submitter)
{
setFlag(FLAG_SUBMITTED, true);
-
+   Form formToProcess = findFormToProcess(submitter);
+   
visitChildren(Form.class, new IVisitor()
{
@Override
public void component(final Component component, final 
IVisit visit)
{
Form form = (Form)component;
-   if (form.wantSubmitOnParentFormSubmit() && 
form.isEnabledInHierarchy() && form.isVisibleInHierarchy())
+   if ((form.wantSubmitOnParentFormSubmit() || 
form == formToProcess) 
+   && form.isEnabledInHierarchy() && 
form.isVisibleInHierarchy())
{
form.setFlag(FLAG_SUBMITTED, true);
return;



buildbot failure in on wicket-branch-7.x

2017-09-04 Thread buildbot
The Buildbot has detected a new failure on builder wicket-branch-7.x while 
building wicket. Full details are available at:
https://ci.apache.org/builders/wicket-branch-7.x/builds/434

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-wicket-branch-7.x-commit' triggered this build
Build Source Stamp: [branch wicket-7.x] 13b600c30d681281f40f8300649f78e970b816a9
Blamelist: Martin Tzvetanov Grigorov 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





[jira] [Updated] (WICKET-6458) Websocket replacing a panel which uses websockets

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6458:

Component/s: (was: wicket)
 wicket-native-websocket

> Websocket replacing a panel which uses websockets
> -
>
> Key: WICKET-6458
> URL: https://issues.apache.org/jira/browse/WICKET-6458
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-native-websocket
>Affects Versions: 7.8.0
> Environment: Ubuntu 16.04
> Tomcat 8.5.20
>Reporter: Peter Henderson
>Assignee: Martin Grigorov
>
> I've a page which initially shows a loading panel.
> This panel uses web sockets to trigger background loading when the connected 
> message is received.
> When the background loading has completed
> (onEvent => event.getPayload => WebSocketPushPayload => ???)
> I replace the loading place holder panel with the real data panel.
> The real data panel may also want to use web sockets, and show a loading 
> animation.
> (Turtles all the way down)
> The problem I'm seeing, is that the WebSocketBehavior::onConnected method is 
> not being called on the replaced panel.
> A scala sample which shows this problem.
> https://github.com/bollinger/WebSocketPanelReplace



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (WICKET-6458) Websocket replacing a panel which uses websockets

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-6458:
---

Assignee: Martin Grigorov

> Websocket replacing a panel which uses websockets
> -
>
> Key: WICKET-6458
> URL: https://issues.apache.org/jira/browse/WICKET-6458
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.8.0
> Environment: Ubuntu 16.04
> Tomcat 8.5.20
>Reporter: Peter Henderson
>Assignee: Martin Grigorov
>
> I've a page which initially shows a loading panel.
> This panel uses web sockets to trigger background loading when the connected 
> message is received.
> When the background loading has completed
> (onEvent => event.getPayload => WebSocketPushPayload => ???)
> I replace the loading place holder panel with the real data panel.
> The real data panel may also want to use web sockets, and show a loading 
> animation.
> (Turtles all the way down)
> The problem I'm seeing, is that the WebSocketBehavior::onConnected method is 
> not being called on the replaced panel.
> A scala sample which shows this problem.
> https://github.com/bollinger/WebSocketPanelReplace



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread Kamil (JIRA)

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

Kamil commented on WICKET-6463:
---

Thank you, Martin

> Please add additional constructor to Roles
> --
>
> Key: WICKET-6463
> URL: https://issues.apache.org/jira/browse/WICKET-6463
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Kamil
>Assignee: Martin Grigorov
>Priority: Trivial
> Fix For: 7.9.0, 8.0.0-M8
>
>
> org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
> initialized using String[], but it should be also possible to initialize it 
> using any Collection (since it's already a HashSet, it should be 
> pretty strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (WICKET-6434) Fixed WicketTester to detect components in enclosure when doing isComponentOnAjaxResponse.

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6434.
-
Resolution: Fixed

This has been resolved for 8.0.0-M7 
(https://github.com/apache/wicket/pull/224#issuecomment-320505015)

> Fixed WicketTester to detect components in enclosure when doing 
> isComponentOnAjaxResponse.
> --
>
> Key: WICKET-6434
> URL: https://issues.apache.org/jira/browse/WICKET-6434
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6
>Reporter: Tobias Soloschenko
>Assignee: Martin Grigorov
>Priority: Minor
>  Labels: fix
> Fix For: 8.0.0-M7
>
>
> When a component is in a wicket:enclosure and is then correctly re-rendered 
> using ajax, WicketTester seemed to not be able to detect that the component 
> was in the ajax response in the isComponentOnAjaxResponse method.
> A functionality has been additionalwhere isComponentOnAjaxResponse tries to 
> find an enclosure whose child is the given component, and if one is found, it 
> recurses into isComponentOnAjaxResponse passing the enclosure as an argument.
> In order not to duplicate logic detecting when an enclosure's child is a 
> given component, AjaxEnclosureListener's isControllerOfEnclosure has been 
> switched to public and static.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6434) Fixed WicketTester to detect components in enclosure when doing isComponentOnAjaxResponse.

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6434:

Fix Version/s: (was: 8.0.0-M8)
   8.0.0-M7

> Fixed WicketTester to detect components in enclosure when doing 
> isComponentOnAjaxResponse.
> --
>
> Key: WICKET-6434
> URL: https://issues.apache.org/jira/browse/WICKET-6434
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6
>Reporter: Tobias Soloschenko
>Assignee: Martin Grigorov
>Priority: Minor
>  Labels: fix
> Fix For: 8.0.0-M7
>
>
> When a component is in a wicket:enclosure and is then correctly re-rendered 
> using ajax, WicketTester seemed to not be able to detect that the component 
> was in the ajax response in the isComponentOnAjaxResponse method.
> A functionality has been additionalwhere isComponentOnAjaxResponse tries to 
> find an enclosure whose child is the given component, and if one is found, it 
> recurses into isComponentOnAjaxResponse passing the enclosure as an argument.
> In order not to duplicate logic detecting when an enclosure's child is a 
> given component, AjaxEnclosureListener's isControllerOfEnclosure has been 
> switched to public and static.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6434) Fixed WicketTester to detect components in enclosure when doing isComponentOnAjaxResponse.

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6434:

Fix Version/s: (was: 8.0.0-M7)
   8.0.0-M8

> Fixed WicketTester to detect components in enclosure when doing 
> isComponentOnAjaxResponse.
> --
>
> Key: WICKET-6434
> URL: https://issues.apache.org/jira/browse/WICKET-6434
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6
>Reporter: Tobias Soloschenko
>Assignee: Martin Grigorov
>Priority: Minor
>  Labels: fix
> Fix For: 8.0.0-M8
>
>
> When a component is in a wicket:enclosure and is then correctly re-rendered 
> using ajax, WicketTester seemed to not be able to detect that the component 
> was in the ajax response in the isComponentOnAjaxResponse method.
> A functionality has been additionalwhere isComponentOnAjaxResponse tries to 
> find an enclosure whose child is the given component, and if one is found, it 
> recurses into isComponentOnAjaxResponse passing the enclosure as an argument.
> In order not to duplicate logic detecting when an enclosure's child is a 
> given component, AjaxEnclosureListener's isControllerOfEnclosure has been 
> switched to public and static.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6460) Rename AjaxDownload to AjaxDownloadBehavior

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-6460:

Summary: Rename AjaxDownload to AjaxDownloadBehavior  (was: AjaxDownload 
should have method to provide downloaded file name)

> Rename AjaxDownload to AjaxDownloadBehavior
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>Assignee: Martin Grigorov
> Fix For: 8.0.0-M8
>
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (WICKET-6460) Rename AjaxDownload to AjaxDownloadBehavior

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6460.
-
   Resolution: Fixed
Fix Version/s: 8.0.0-M8

> Rename AjaxDownload to AjaxDownloadBehavior
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>Assignee: Martin Grigorov
> Fix For: 8.0.0-M8
>
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6460) Rename AjaxDownload to AjaxDownloadBehavior

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6460 Rename AjaxDownload to AjaxDownloadBehavior


> Rename AjaxDownload to AjaxDownloadBehavior
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>Assignee: Martin Grigorov
> Fix For: 8.0.0-M8
>
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: WICKET-6460 Rename AjaxDownload to AjaxDownloadBehavior

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master 1f805dd5a -> 1fc1e3d70


WICKET-6460 Rename AjaxDownload to AjaxDownloadBehavior


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

Branch: refs/heads/master
Commit: 1fc1e3d7040ed2f3e73e7067efd201a958a90b3e
Parents: 1f805dd
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 4 22:26:30 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 4 22:26:30 2017 +0300

--
 .../examples/ajax/builtin/AjaxDownloadPage.java |  22 +-
 .../wicket/extensions/ajax/AjaxDownload.java| 384 --
 .../extensions/ajax/AjaxDownloadBehavior.java   | 388 +++
 3 files changed, 399 insertions(+), 395 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1fc1e3d7/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxDownloadPage.java
--
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxDownloadPage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxDownloadPage.java
index 6d1aa3e..70a682d 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxDownloadPage.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxDownloadPage.java
@@ -20,8 +20,8 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.extensions.ajax.AjaxDownload;
-import org.apache.wicket.extensions.ajax.AjaxDownload.Location;
+import org.apache.wicket.extensions.ajax.AjaxDownloadBehavior;
+import org.apache.wicket.extensions.ajax.AjaxDownloadBehavior.Location;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.request.http.flow.AbortWithHttpErrorCodeException;
 import org.apache.wicket.request.resource.ContentDisposition;
@@ -76,7 +76,7 @@ public class AjaxDownloadPage extends BasePage
IResource resource = new ExampleResource("downloaded via ajax")
.setContentDisposition(ContentDisposition.ATTACHMENT);

-   final AjaxDownload download = new AjaxDownload(resource) {
+   final AjaxDownloadBehavior download = new 
AjaxDownloadBehavior(resource) {

@Override
protected void onBeforeDownload(AjaxRequestTarget 
target)
@@ -118,7 +118,7 @@ public class AjaxDownloadPage extends BasePage
IResource resource = new ExampleResource("downloaded via ajax 
in iframe")
.setContentDisposition(ContentDisposition.ATTACHMENT);

-   final AjaxDownload download = new AjaxDownload(resource) {
+   final AjaxDownloadBehavior download = new 
AjaxDownloadBehavior(resource) {

@Override
protected void onBeforeDownload(AjaxRequestTarget 
target)
@@ -166,7 +166,7 @@ public class AjaxDownloadPage extends BasePage
}
};

-   final AjaxDownload download = new AjaxDownload(reference) {
+   final AjaxDownloadBehavior download = new 
AjaxDownloadBehavior(reference) {

@Override
protected void onBeforeDownload(AjaxRequestTarget 
target)
@@ -208,7 +208,7 @@ public class AjaxDownloadPage extends BasePage
IResource resource = new ExampleResource("downloaded via ajax 
in a new browser window")
.setContentDisposition(ContentDisposition.INLINE);
 
-   final AjaxDownload download = new AjaxDownload(resource) {
+   final AjaxDownloadBehavior download = new 
AjaxDownloadBehavior(resource) {
 
@Override
protected void onBeforeDownload(AjaxRequestTarget 
target)
@@ -240,7 +240,7 @@ public class AjaxDownloadPage extends BasePage
target.add(downloadingContainer);
}
};
-   download.setLocation(AjaxDownload.Location.NewWindow);
+   download.setLocation(AjaxDownloadBehavior.Location.NewWindow);
add(download);
 
add(new AjaxLink("downloadInNewWindow")
@@ -258,7 +258,7 @@ public class AjaxDownloadPage extends BasePage
IResource resource = new ExampleResource("downloaded via ajax 
in same browser window"

[jira] [Assigned] (WICKET-6460) AjaxDownload should have method to provide downloaded file name

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-6460:
---

Assignee: Martin Grigorov

> AjaxDownload should have method to provide downloaded file name
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>Assignee: Martin Grigorov
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: WICKET-6463 Please add additional constructor to Roles

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x f8ffe3e13 -> 13b600c30


WICKET-6463 Please add additional constructor to Roles

(cherry picked from commit 1f805dd5af6d06e9209907f33f3c7ab4a4678e76)


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

Branch: refs/heads/wicket-7.x
Commit: 13b600c30d681281f40f8300649f78e970b816a9
Parents: f8ffe3e
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 4 22:11:39 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 4 22:12:30 2017 +0300

--
 .../authroles/authorization/strategies/role/Roles.java  | 9 +
 .../annotations/AnnotationsRoleAuthorizationStrategy.java   | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/13b600c3/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
--
diff --git 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
index 5d272de..fa5251d 100644
--- 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
+++ 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
@@ -16,9 +16,11 @@
  */
 package org.apache.wicket.authroles.authorization.strategies.role;
 
+import java.util.Collection;
 import java.util.HashSet;
 
 import org.apache.wicket.util.io.IClusterable;
+import org.apache.wicket.util.lang.Args;
 import org.apache.wicket.util.string.StringList;
 
 
@@ -53,6 +55,7 @@ public class Roles extends HashSet implements 
IClusterable
 */
public Roles(final String roles)
{
+   Args.notNull(roles, "roles");
for (final String role : roles.split("\\s*,\\s*"))
{
add(role);
@@ -67,12 +70,18 @@ public class Roles extends HashSet implements 
IClusterable
 */
public Roles(final String[] roles)
{
+   Args.notNull(roles, "roles");
for (final String role : roles)
{
add(role);
}
}
 
+   public Roles(final Collection roles) {
+   Args.notNull(roles, "roles");
+   addAll(roles);
+   }
+
/**
 * Whether this roles object containes the provided role.
 * 

http://git-wip-us.apache.org/repos/asf/wicket/blob/13b600c3/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
--
diff --git 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
index ff7b9dd..96163e1 100644
--- 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
+++ 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
@@ -171,7 +171,7 @@ public class AnnotationsRoleAuthorizationStrategy extends 
AbstractRoleAuthorizat
}
 
Roles acceptedRoles = new 
Roles(authorizeActionAnnotation.roles());
-   if (!(isEmpty(acceptedRoles) || 
hasAny(acceptedRoles)))
+   if (!hasAny(acceptedRoles))
{
return false;
}



[jira] [Commented] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6463 Please add additional constructor to Roles

(cherry picked from commit 1f805dd5af6d06e9209907f33f3c7ab4a4678e76)


> Please add additional constructor to Roles
> --
>
> Key: WICKET-6463
> URL: https://issues.apache.org/jira/browse/WICKET-6463
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Kamil
>Assignee: Martin Grigorov
>Priority: Trivial
> Fix For: 7.9.0, 8.0.0-M8
>
>
> org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
> initialized using String[], but it should be also possible to initialize it 
> using any Collection (since it's already a HashSet, it should be 
> pretty strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread ASF subversion and git services (JIRA)

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

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

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

WICKET-6463 Please add additional constructor to Roles


> Please add additional constructor to Roles
> --
>
> Key: WICKET-6463
> URL: https://issues.apache.org/jira/browse/WICKET-6463
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Kamil
>Assignee: Martin Grigorov
>Priority: Trivial
> Fix For: 7.9.0, 8.0.0-M8
>
>
> org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
> initialized using String[], but it should be also possible to initialize it 
> using any Collection (since it's already a HashSet, it should be 
> pretty strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-6463.
-
   Resolution: Fixed
Fix Version/s: 8.0.0-M8
   7.9.0

> Please add additional constructor to Roles
> --
>
> Key: WICKET-6463
> URL: https://issues.apache.org/jira/browse/WICKET-6463
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Kamil
>Assignee: Martin Grigorov
>Priority: Trivial
> Fix For: 7.9.0, 8.0.0-M8
>
>
> org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
> initialized using String[], but it should be also possible to initialize it 
> using any Collection (since it's already a HashSet, it should be 
> pretty strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: WICKET-6463 Please add additional constructor to Roles

2017-09-04 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master b088c6967 -> 1f805dd5a


WICKET-6463 Please add additional constructor to Roles


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

Branch: refs/heads/master
Commit: 1f805dd5af6d06e9209907f33f3c7ab4a4678e76
Parents: b088c69
Author: Martin Tzvetanov Grigorov 
Authored: Mon Sep 4 22:11:39 2017 +0300
Committer: Martin Tzvetanov Grigorov 
Committed: Mon Sep 4 22:11:39 2017 +0300

--
 .../authroles/authorization/strategies/role/Roles.java  | 9 +
 .../annotations/AnnotationsRoleAuthorizationStrategy.java   | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1f805dd5/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
--
diff --git 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
index 5d272de..fa5251d 100644
--- 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
+++ 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/Roles.java
@@ -16,9 +16,11 @@
  */
 package org.apache.wicket.authroles.authorization.strategies.role;
 
+import java.util.Collection;
 import java.util.HashSet;
 
 import org.apache.wicket.util.io.IClusterable;
+import org.apache.wicket.util.lang.Args;
 import org.apache.wicket.util.string.StringList;
 
 
@@ -53,6 +55,7 @@ public class Roles extends HashSet implements 
IClusterable
 */
public Roles(final String roles)
{
+   Args.notNull(roles, "roles");
for (final String role : roles.split("\\s*,\\s*"))
{
add(role);
@@ -67,12 +70,18 @@ public class Roles extends HashSet implements 
IClusterable
 */
public Roles(final String[] roles)
{
+   Args.notNull(roles, "roles");
for (final String role : roles)
{
add(role);
}
}
 
+   public Roles(final Collection roles) {
+   Args.notNull(roles, "roles");
+   addAll(roles);
+   }
+
/**
 * Whether this roles object containes the provided role.
 * 

http://git-wip-us.apache.org/repos/asf/wicket/blob/1f805dd5/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
--
diff --git 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
index ff7b9dd..96163e1 100644
--- 
a/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
+++ 
b/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
@@ -171,7 +171,7 @@ public class AnnotationsRoleAuthorizationStrategy extends 
AbstractRoleAuthorizat
}
 
Roles acceptedRoles = new 
Roles(authorizeActionAnnotation.roles());
-   if (!(isEmpty(acceptedRoles) || 
hasAny(acceptedRoles)))
+   if (!hasAny(acceptedRoles))
{
return false;
}



[jira] [Commented] (WICKET-6459) Ajax re-renders of enclosures do not render their children's header contributions

2017-09-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on WICKET-6459:


Github user disblader commented on a diff in the pull request:

https://github.com/apache/wicket/pull/232#discussion_r136863271
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
 ---
@@ -51,6 +57,39 @@ public void test2() throws Exception
}
 
/**
+* Tests that when a controller of an enclosure is added to the ajax 
target, its header
+* contributions reach the response
+*
+* WICKET-6459
+*
+*/
+   @Test
+   public void testAjaxAndEnclosures() throws Exception
+   {
+
+   tester.startPage(SimplePage3.class);
--- End diff --

I renamed it to `EnclosureAjaxRenderPage`, since it actually tests for both 
regular and inline enclosures 


> Ajax re-renders of enclosures do not render their children's header 
> contributions
> -
>
> Key: WICKET-6459
> URL: https://issues.apache.org/jira/browse/WICKET-6459
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6, 7.8.0
>Reporter: Domas Poliakas
>Priority: Minor
>
> When a component in an enclosure is added to the AjaxRequestTarget, its (and 
> subsequently its children's) header contributions are not rendered. 
> AjaxEnclosureListener replaces any components with enclosures that are in the 
> target with their enclosures. However, in the wicket hierarchy the enclosures 
> appear to be siblings to the components they enclose. What this causes is 
> that when the default ChildFirstHeaderRenderStrategy attempts to render the 
> header contributions for the enclosure, nothing is rendered as the enclosure 
> itself has no children in the hierarchy.
> On one hand, ChildFirstHeaderRenderStrategy seems to be the culprit - it 
> should detect enclosures and act accordingly - but fixing the problem there 
> would cause it to resurface in the future if the default implementation of 
> header render strategy is changed. What would be a correct way fix for this? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-6463:
---

Assignee: Martin Grigorov

> Please add additional constructor to Roles
> --
>
> Key: WICKET-6463
> URL: https://issues.apache.org/jira/browse/WICKET-6463
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Kamil
>Assignee: Martin Grigorov
>Priority: Trivial
>
> org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
> initialized using String[], but it should be also possible to initialize it 
> using any Collection (since it's already a HashSet, it should be 
> pretty strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (WICKET-6462) When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread Andrea Del Bene (JIRA)

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

Andrea Del Bene reassigned WICKET-6462:
---

Assignee: Andrea Del Bene

> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> ---
>
> Key: WICKET-6462
> URL: https://issues.apache.org/jira/browse/WICKET-6462
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M7, 8.0.0-M8
> Environment: 8.0.0-SNAPSHOT -  2017 08 31
>Reporter: francois
>Assignee: Andrea Del Bene
>Priority: Critical
> Attachments: wicket_quickstart.zip
>
>
> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> The appears after WICKET-6455.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6459) Ajax re-renders of enclosures do not render their children's header contributions

2017-09-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on WICKET-6459:


Github user martin-g commented on a diff in the pull request:

https://github.com/apache/wicket/pull/232#discussion_r136861843
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/markup/renderStrategy/ChildFirstHeaderRenderStrategyTest.java
 ---
@@ -51,6 +57,39 @@ public void test2() throws Exception
}
 
/**
+* Tests that when a controller of an enclosure is added to the ajax 
target, its header
+* contributions reach the response
+*
+* WICKET-6459
+*
+*/
+   @Test
+   public void testAjaxAndEnclosures() throws Exception
+   {
+
+   tester.startPage(SimplePage3.class);
--- End diff --

Let's rename the page name to `InlineEnclosureAjaxRenderPage`.
`SimplePage`s are legacy, but for new stuff we should try better! :-)


> Ajax re-renders of enclosures do not render their children's header 
> contributions
> -
>
> Key: WICKET-6459
> URL: https://issues.apache.org/jira/browse/WICKET-6459
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6, 7.8.0
>Reporter: Domas Poliakas
>Priority: Minor
>
> When a component in an enclosure is added to the AjaxRequestTarget, its (and 
> subsequently its children's) header contributions are not rendered. 
> AjaxEnclosureListener replaces any components with enclosures that are in the 
> target with their enclosures. However, in the wicket hierarchy the enclosures 
> appear to be siblings to the components they enclose. What this causes is 
> that when the default ChildFirstHeaderRenderStrategy attempts to render the 
> header contributions for the enclosure, nothing is rendered as the enclosure 
> itself has no children in the hierarchy.
> On one hand, ChildFirstHeaderRenderStrategy seems to be the culprit - it 
> should detect enclosures and act accordingly - but fixing the problem there 
> would cause it to resurface in the future if the default implementation of 
> header render strategy is changed. What would be a correct way fix for this? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6462) When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread francois (JIRA)

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

francois updated WICKET-6462:
-
Affects Version/s: 8.0.0-M8

> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> ---
>
> Key: WICKET-6462
> URL: https://issues.apache.org/jira/browse/WICKET-6462
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M7, 8.0.0-M8
> Environment: 8.0.0-SNAPSHOT -  2017 08 31
>Reporter: francois
>Priority: Critical
> Attachments: wicket_quickstart.zip
>
>
> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> The appears after WICKET-6455.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6462) When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread francois (JIRA)

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

francois updated WICKET-6462:
-
Description: 
When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
twice

The appears after WICKET-6455.

  was:Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice 

Summary: When an Ajax Button is submitted, AjaxFormSubmitBehavior # 
onSubmit is called twice  (was: Since WICKET-6455, the AjaxFormSubmitBehavior # 
onSubmit is called twice )

> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> ---
>
> Key: WICKET-6462
> URL: https://issues.apache.org/jira/browse/WICKET-6462
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M7
> Environment: 8.0.0-SNAPSHOT -  2017 08 31
>Reporter: francois
>Priority: Critical
> Attachments: wicket_quickstart.zip
>
>
> When an Ajax Button is submitted, AjaxFormSubmitBehavior # onSubmit is called 
> twice
> The appears after WICKET-6455.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread Kamil (JIRA)

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

Kamil commented on WICKET-6463:
---

By the way, AnnotationsRoleAuthorizationStrategy#L174 checks 
"isEmpty(acceptedRoles) || hasAny(acceptedRoles)" while hasAny(Roles) does 
exactly the same check

> Please add additional constructor to Roles
> --
>
> Key: WICKET-6463
> URL: https://issues.apache.org/jira/browse/WICKET-6463
> Project: Wicket
>  Issue Type: Improvement
>Reporter: Kamil
>Priority: Trivial
>
> org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
> initialized using String[], but it should be also possible to initialize it 
> using any Collection (since it's already a HashSet, it should be 
> pretty strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (WICKET-6463) Please add additional constructor to Roles

2017-09-04 Thread Kamil (JIRA)
Kamil created WICKET-6463:
-

 Summary: Please add additional constructor to Roles
 Key: WICKET-6463
 URL: https://issues.apache.org/jira/browse/WICKET-6463
 Project: Wicket
  Issue Type: Improvement
Reporter: Kamil
Priority: Trivial


org.apache.wicket.authroles.authorization.strategies.role.Roles can be 
initialized using String[], but it should be also possible to initialize it 
using any Collection (since it's already a HashSet, it should be pretty 
strightforward)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6460) AjaxDownload should have method to provide downloaded file name

2017-09-04 Thread Maxim Solodovnik (JIRA)

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

Maxim Solodovnik commented on WICKET-6460:
--

+1 for renaming

> AjaxDownload should have method to provide downloaded file name
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6460) AjaxDownload should have method to provide downloaded file name

2017-09-04 Thread Sven Meier (JIRA)

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

Sven Meier commented on WICKET-6460:


It was located in the former AjaxDownload implementation from the wiki.

[~solomax] what do you think about the -behavior suffix (as most other 
behaviors have it)?

> AjaxDownload should have method to provide downloaded file name
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6460) AjaxDownload should have method to provide downloaded file name

2017-09-04 Thread JIRA

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

Jarosław commented on WICKET-6460:
--

Ok. Thank you for your answer. I've been mistakenly looking for it in 
AjaxDownload itself.

> AjaxDownload should have method to provide downloaded file name
> ---
>
> Key: WICKET-6460
> URL: https://issues.apache.org/jira/browse/WICKET-6460
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-extensions
>Affects Versions: 8.0.0-M6
>Reporter: Jarosław
>
> Right now file downloaded using
> {code}
>  org.apache.wicket.extensions.ajax.AjaxDownload#initiate(target)
> {code}
> downloads file with name like
> {code}
> 5e7f5bd1-d4dc-4350-ad05-e1aef94cf286.pdf
> {code}
> Could you please provide method giving the user ability to change the file 
> name according to RFC 5987 and also for browsers that do not support this:
> {code}
> Content-Disposition: attachment;
>  filename="EURO rates";
>  filename*=utf-8''%e2%82%ac%20rates
> {code}
> P.S. I think AjaxDownload class should be named AjaxDownloadBehavior - as all 
> behaviors are



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6459) Ajax re-renders of enclosures do not render their children's header contributions

2017-09-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on WICKET-6459:


GitHub user disblader opened a pull request:

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

Ajax inline enclosure fix.

A fix for the issue I described in WICKET-6459. 

I've made this for 7.x as that's the version relevant for me, but I'd like 
it to be propogate to 8.x as well, how would I do that? Should I create a new 
pull request trying to merge this branch into 8.x?

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

$ git pull https://github.com/disblader/wicket enclosure-ajax

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

https://github.com/apache/wicket/pull/232.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 #232


commit 3b21b3a1d2a2220452eac74ec19e78b2c2d6da4a
Author: Domas Poliakas 
Date:   2017-09-01T16:39:42Z

Ajax inline enclosure fix.




> Ajax re-renders of enclosures do not render their children's header 
> contributions
> -
>
> Key: WICKET-6459
> URL: https://issues.apache.org/jira/browse/WICKET-6459
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6, 7.8.0
>Reporter: Domas Poliakas
>Priority: Minor
>
> When a component in an enclosure is added to the AjaxRequestTarget, its (and 
> subsequently its children's) header contributions are not rendered. 
> AjaxEnclosureListener replaces any components with enclosures that are in the 
> target with their enclosures. However, in the wicket hierarchy the enclosures 
> appear to be siblings to the components they enclose. What this causes is 
> that when the default ChildFirstHeaderRenderStrategy attempts to render the 
> header contributions for the enclosure, nothing is rendered as the enclosure 
> itself has no children in the hierarchy.
> On one hand, ChildFirstHeaderRenderStrategy seems to be the culprit - it 
> should detect enclosures and act accordingly - but fixing the problem there 
> would cause it to resurface in the future if the default implementation of 
> header render strategy is changed. What would be a correct way fix for this? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6459) Ajax re-renders of enclosures do not render their children's header contributions

2017-09-04 Thread Domas Poliakas (JIRA)

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

Domas Poliakas commented on WICKET-6459:


It seems this only happens on inline enclosures. 

> Ajax re-renders of enclosures do not render their children's header 
> contributions
> -
>
> Key: WICKET-6459
> URL: https://issues.apache.org/jira/browse/WICKET-6459
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6, 7.8.0
>Reporter: Domas Poliakas
>Priority: Minor
>
> When a component in an enclosure is added to the AjaxRequestTarget, its (and 
> subsequently its children's) header contributions are not rendered. 
> AjaxEnclosureListener replaces any components with enclosures that are in the 
> target with their enclosures. However, in the wicket hierarchy the enclosures 
> appear to be siblings to the components they enclose. What this causes is 
> that when the default ChildFirstHeaderRenderStrategy attempts to render the 
> header contributions for the enclosure, nothing is rendered as the enclosure 
> itself has no children in the hierarchy.
> On one hand, ChildFirstHeaderRenderStrategy seems to be the culprit - it 
> should detect enclosures and act accordingly - but fixing the problem there 
> would cause it to resurface in the future if the default implementation of 
> header render strategy is changed. What would be a correct way fix for this? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6462) Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread francois (JIRA)

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

francois updated WICKET-6462:
-
Environment: 8.0.0-SNAPSHOT -  2017 08 31

> Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice 
> -
>
> Key: WICKET-6462
> URL: https://issues.apache.org/jira/browse/WICKET-6462
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M7
> Environment: 8.0.0-SNAPSHOT -  2017 08 31
>Reporter: francois
>Priority: Critical
> Attachments: wicket_quickstart.zip
>
>
> Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WICKET-6462) Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread francois (JIRA)

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

francois updated WICKET-6462:
-
Environment: (was: OSX)

> Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice 
> -
>
> Key: WICKET-6462
> URL: https://issues.apache.org/jira/browse/WICKET-6462
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M7
>Reporter: francois
>Priority: Critical
> Attachments: wicket_quickstart.zip
>
>
> Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (WICKET-6462) Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice

2017-09-04 Thread francois (JIRA)
francois created WICKET-6462:


 Summary: Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit 
is called twice 
 Key: WICKET-6462
 URL: https://issues.apache.org/jira/browse/WICKET-6462
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 8.0.0-M7
 Environment: OSX
Reporter: francois
Priority: Critical
 Attachments: wicket_quickstart.zip

Since WICKET-6455, the AjaxFormSubmitBehavior # onSubmit is called twice 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6461) Default constructor is incorrectly called if optional param is not provided in parameter placeholder URL with additional required parameter

2017-09-04 Thread Sven Meier (JIRA)

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

Sven Meier commented on WICKET-6461:


Please provide a quickstart. Thanks!

> Default constructor is incorrectly called if optional param is not provided 
> in parameter placeholder URL with additional required parameter
> ---
>
> Key: WICKET-6461
> URL: https://issues.apache.org/jira/browse/WICKET-6461
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.22.0
>Reporter: Melissa Beldman
>
> From the documentation here:
> https://ci.apache.org/projects/wicket/guide/6.x/guide/urls.html
> I'm following the section titled, "Using parameter placeholders with mounted 
> pages".
> In the documentation from here:
> https://cwiki.apache.org/confluence/display/WICKET/Request+mapping
> {code}
> Named parameters - /page/${named1}/${named2}
> mountPage("/page/${named1}/${named2}", MyPage.class);
> Now a request to "/page/a/b" will be handled by MyPage and the parameters can 
> be get with PageParameters.get(String) (e.g. parameters.get("named1") will 
> return "a")
> Optional named parameters - /page/${named1}/#{named2\
> mountPage("/page/${named1}/#{named2}", MyPage.class);
> This means the second parameter is optional. Requests to "/page/a/b" , 
> "/page/a/b/" and "/page/a/" will be handled by MyPage and the parameters can 
> be get with PageParameters.get(String) (e.g. parameters.get("named2") will 
> return "b" for the first case and null for the second).
> The mapper is smart enough to handle optional named parameters in any 
> segment, not just the last one.
> {code}
> it states: "The mapper is smart enough to handle optional named parameters in 
> any segment, not just the last one."
> I've found it does matter IF other segments in the url are also parameter 
> placeholders. The resulting behaviour is that if the optional parameter 
> placeholder isn't provided in the URL, the page's default constructor gets 
> called instead of the PageParameter constructor as expected (since there are 
> still additional PageParameter data that may need to be processed by the 
> page). 
> Here is my example:
> From child class of AdtAuthenticatedWebApplication
> {code}
> @Override
> protected void init() 
> {
> super.init();
> mountPage("/foo/#{optParam}/${otherParam}", MyPage.class);
> //mountPage("/foo/${otherParam}/#{optParam}",  MyPage.class); <--- NOTE: 
> This works as expected
> }
> {code}
> In child class of WebPage
> {code}
> public class MyPage extends WebPage
> {
> public MyPage(PageParameters parameters) 
> {
> super(parameters);
> StringValue optParam = parameters.get("optParam");
> StringValue otherParam = parameters.get("otherParam");
>//do something...
> }
> private MyPage()
> {
> throw new IllegalAccessError("The default constructor should not be 
> instantiated");
> }
> {code}
> And in a different class:
> {code}
> public static BookmarkablePageLink getBookmarkableLink(String id, String 
> optParam, String otherParam)
>  { 
> PageParameters pageParam = new PageParameters();
> 
> pageParam.add("otherParam", otherParam);
> if (optParam != null && !optParam.isEmpty())
> {
> pageParam.add("optParam", optParam);
> }
> 
> return new BookmarkablePageLink(id, MyPage.class, pageParam); 
> 
> } 
> {code}
> Here are the result of clicking on the BookmarkablePageLinks created:
> {code}
> /foo/baz/bar  -- calls MyPage(PageParameters parameters) constructor
> /foo/bar -- attempts to call MyPage default constructor (exception thrown)
> {code}
> Exception thrown is:
> {code}
> Last cause: Class org.apache.wicket.session.DefaultPageFactory can not access 
> a member of class ca.example.for.testing.MyPage with modifiers "private"
> WicketMessage: Can't instantiate page using constructor 'private 
> ca.example.for.testing.MyPage()'. This constructor is private!
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WICKET-6446) FormTester submit() doesn't work

2017-09-04 Thread Sven Meier (JIRA)

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

Sven Meier commented on WICKET-6446:


It's not meant to be used that way :P.

FormTest#submit() is very low-level, it just submits the form - "submit" as in 
"the browser submits the form values to the server", nothing more.

> FormTester submit() doesn't work
> 
>
> Key: WICKET-6446
> URL: https://issues.apache.org/jira/browse/WICKET-6446
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 8.0.0-M6
>Reporter: Kamil
>Assignee: Sven Meier
> Attachments: showcase-submit.zip
>
>
> 1)Run the app.
> 2)Click submit -> it works
> Run the "formShouldBeSubmittedSuccessfully" test - it fails



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


wicket git commit: Added documentation for stream-based children iteration.

2017-09-04 Thread adelbene
Repository: wicket
Updated Branches:
  refs/heads/master 10f5f76e5 -> b088c6967


Added documentation for stream-based children iteration.

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

Branch: refs/heads/master
Commit: b088c6967cb4f1cef7eb95995561adc12a7bdcd1
Parents: 10f5f76
Author: Andrea Del Bene 
Authored: Mon Sep 4 11:35:31 2017 +0200
Committer: Andrea Del Bene 
Committed: Mon Sep 4 11:35:31 2017 +0200

--
 wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc | 2 +-
 wicket-user-guide/src/main/asciidoc/single.adoc  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b088c696/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
--
diff --git a/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc 
b/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
index ec71d00..0e28723 100644
--- a/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
+++ b/wicket-user-guide/src/main/asciidoc/layout/layout_2.adoc
@@ -42,7 +42,7 @@ Label name = (Label)get("innerContainer:name");
 
 
 * replace a specific child component with a new component having the same id 
(with method _replace_).
-* iterate thought children components with the iterator returned by method 
_iterator_ or using visitor pattern with methods _visitChildren_.
+* iterate thought children components. This can be done in the old way 
(pre-Wicket 8) using method _iterator_ or using visitor pattern with method 
_visitChildren_. Starting from Wicket 8 the same task can be accomplished using 
the _stream_ object returned by methods _stream_ (which contains only the 
direct children) and _streamChildren_ (which contains all children).
 
 Both _Panel_ and _WebPage_ have their own associated markup file which is used 
to render the corresponding component. If such file is not provided, Wicket 
will apply markup inheritance looking for a markup file through their ancestor 
classes. When a panel is attached to a container, the content of its markup 
file is inserted into its related tag.
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/b088c696/wicket-user-guide/src/main/asciidoc/single.adoc
--
diff --git a/wicket-user-guide/src/main/asciidoc/single.adoc 
b/wicket-user-guide/src/main/asciidoc/single.adoc
index 1dc1f22..4fc1464 100644
--- a/wicket-user-guide/src/main/asciidoc/single.adoc
+++ b/wicket-user-guide/src/main/asciidoc/single.adoc
@@ -8,7 +8,7 @@ The Apache Software Foundation
 
 //custom variables used inside the guide
 :wicket_examples_url: http://examples8x.wicket.apache.org
-:wicket_tutorial_examples_url: http://examples-wickettutorial.rhcloud.com/
+:wicket_tutorial_examples_url: https://wicket-guide.herokuapp.com/
 
 == Introduction
 include::introduction.adoc[]