[jira] [Updated] (WICKET-5310) if wicket is an external lib, BundleStringResourceLoader doesn't work

2013-08-08 Thread Paul (JIRA)

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

Paul updated WICKET-5310:
-

Attachment: quickstart.zip

 if wicket is an external lib, BundleStringResourceLoader doesn't work
 -

 Key: WICKET-5310
 URL: https://issues.apache.org/jira/browse/WICKET-5310
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.9.1
 Environment: Apache Tomcat/7.0.39
Reporter: Paul
 Attachments: quickstart.zip


 We have got serveral Wicket-based Wepapps on our server and in order to save 
 space, we have move all shared libs (including wicket) into a shared folder 
 which is included via the common.loader of the catalina.properties file. 
 (Using Apache Tomcat/7.0.39)
 The Problem is now, that StringResourceModel works normal, but the 
 BundleStringResourceLoader doesn't work anymore. It always returns null.
 How to reproduce:
 Build attached quickstart
 Remove wicket-libs from war
 Deploy in Tomcat

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (WICKET-5310) if wicket is an external lib, BundleStringResourceLoader doesn't work

2013-08-08 Thread Paul (JIRA)
Paul created WICKET-5310:


 Summary: if wicket is an external lib, BundleStringResourceLoader 
doesn't work
 Key: WICKET-5310
 URL: https://issues.apache.org/jira/browse/WICKET-5310
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.9.1
 Environment: Apache Tomcat/7.0.39
Reporter: Paul
 Attachments: quickstart.zip

We have got serveral Wicket-based Wepapps on our server and in order to save 
space, we have move all shared libs (including wicket) into a shared folder 
which is included via the common.loader of the catalina.properties file. 
(Using Apache Tomcat/7.0.39)
The Problem is now, that StringResourceModel works normal, but the 
BundleStringResourceLoader doesn't work anymore. It always returns null.

How to reproduce:
Build attached quickstart
Remove wicket-libs from war
Deploy in Tomcat

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (WICKET-5310) if wicket is an external lib, BundleStringResourceLoader doesn't work

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-5310:
---

Assignee: Martin Grigorov

 if wicket is an external lib, BundleStringResourceLoader doesn't work
 -

 Key: WICKET-5310
 URL: https://issues.apache.org/jira/browse/WICKET-5310
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.9.1
 Environment: Apache Tomcat/7.0.39
Reporter: Paul
Assignee: Martin Grigorov
 Attachments: quickstart.zip


 We have got serveral Wicket-based Wepapps on our server and in order to save 
 space, we have move all shared libs (including wicket) into a shared folder 
 which is included via the common.loader of the catalina.properties file. 
 (Using Apache Tomcat/7.0.39)
 The Problem is now, that StringResourceModel works normal, but the 
 BundleStringResourceLoader doesn't work anymore. It always returns null.
 How to reproduce:
 Build attached quickstart
 Remove wicket-libs from war
 Deploy in Tomcat

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (WICKET-5309) No page id appended to some stateful pages using repeaters

2013-08-08 Thread Sven Meier (JIRA)

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

Sven Meier reassigned WICKET-5309:
--

Assignee: Sven Meier

 No page id appended to some stateful pages using repeaters
 --

 Key: WICKET-5309
 URL: https://issues.apache.org/jira/browse/WICKET-5309
 Project: Wicket
  Issue Type: Bug
Affects Versions: 6.9.1
Reporter: Bertrand Guay-Paquet
Assignee: Sven Meier
  Labels: stateful
 Attachments: WICKET-5309.zip


 My test case is a page containing a ListView with a single stateful child. In 
 that case, there is no redirect done to append a pageId to the url because 
 the page's statefulness check is erroneous.
 Analysis:
 This calls page.isPageStateless() to dertermine whether a pageId should be 
 added
 BookmarkableMapper(AbstractBookmarkableMapper).getPageInfo(IPageRequestHandler)
  line: 440
 BookmarkableMapper(AbstractBookmarkableMapper).mapHandler(IRequestHandler) 
 line: 387
 SystemMapper(CompoundRequestMapper).mapHandler(IRequestHandler) line: 215
 RequestCycle.mapUrlFor(IRequestHandler) line: 429
 WebPageRenderer.respond(RequestCycle) line: 268
 RenderPageRequestHandler.respond(IRequestCycle) line: 165
 RequestCycle$HandlerExecutor.respond(IRequestHandler) line: 861
 RequestCycle$HandlerExecutor(RequestHandlerStack).execute(IRequestHandler) 
 line: 64
 RequestCycle.execute(IRequestHandler) line: 261
 The problem I see is that AbstractRepeater's onPopulate() is called during 
 onBeforeRender() and this is not done when the stateless status of the page 
 is first checked. Therefore, no pageId is added unless other components not 
 located inside repeaters are also stateful. 
 See thread http://wicket-users.markmail.org/thread/6q2dmns7lqjgkok7
 I will add a quickstart.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: WICKET-5310 if wicket is an external lib, BundleStringResourceLoader doesn't work

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-6.x fd863e8c4 - 000cd8531


WICKET-5310 if wicket is an external lib, BundleStringResourceLoader doesn't 
work

Fallback to context class loader if a resource cannot be found with the class 
loader that loaded BundleStringResourceLoader class itself


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

Branch: refs/heads/wicket-6.x
Commit: 000cd8531bc641960c939e988fee175d8e318935
Parents: fd863e8
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 09:40:19 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 09:40:19 2013 +0200

--
 .../resource/loader/BundleStringResourceLoader.java  | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/000cd853/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
index 2c0e4b7..fa4ecfa 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
@@ -63,9 +63,16 @@ public class BundleStringResourceLoader implements 
IStringResourceLoader
{
return ResourceBundle.getBundle(bundleName, 
locale).getString(key);
}
-   catch (MissingResourceException e)
+   catch (MissingResourceException mrx)
{
-   return null;
+   try
+   {
+   return ResourceBundle.getBundle(bundleName, 
locale, Thread.currentThread().getContextClassLoader()).getString(key);
+   }
+   catch (MissingResourceException mrx2)
+   {
+   return null;
+   }
}
}
 



[jira] [Resolved] (WICKET-5310) if wicket is an external lib, BundleStringResourceLoader doesn't work

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5310.
-

   Resolution: Fixed
Fix Version/s: 6.10.0
   7.0.0

Fixed.
Now Wicket will fallback to thread's context class loader if the resource 
cannot be found as before.

 if wicket is an external lib, BundleStringResourceLoader doesn't work
 -

 Key: WICKET-5310
 URL: https://issues.apache.org/jira/browse/WICKET-5310
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.9.1
 Environment: Apache Tomcat/7.0.39
Reporter: Paul
Assignee: Martin Grigorov
 Fix For: 7.0.0, 6.10.0

 Attachments: quickstart.zip


 We have got serveral Wicket-based Wepapps on our server and in order to save 
 space, we have move all shared libs (including wicket) into a shared folder 
 which is included via the common.loader of the catalina.properties file. 
 (Using Apache Tomcat/7.0.39)
 The Problem is now, that StringResourceModel works normal, but the 
 BundleStringResourceLoader doesn't work anymore. It always returns null.
 How to reproduce:
 Build attached quickstart
 Remove wicket-libs from war
 Deploy in Tomcat

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: WICKET-5310 if wicket is an external lib, BundleStringResourceLoader doesn't work

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/master 3e38950a1 - 29b9422ad


WICKET-5310 if wicket is an external lib, BundleStringResourceLoader doesn't 
work

Fallback to context class loader if a resource cannot be found with the class 
loader that loaded BundleStringResourceLoader class itself


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

Branch: refs/heads/master
Commit: 29b9422adeac165a9bd40a4b86a4819051193cbc
Parents: 3e38950
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 09:40:19 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 09:44:18 2013 +0200

--
 .../resource/loader/BundleStringResourceLoader.java  | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/29b9422a/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
index 2c0e4b7..fa4ecfa 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/loader/BundleStringResourceLoader.java
@@ -63,9 +63,16 @@ public class BundleStringResourceLoader implements 
IStringResourceLoader
{
return ResourceBundle.getBundle(bundleName, 
locale).getString(key);
}
-   catch (MissingResourceException e)
+   catch (MissingResourceException mrx)
{
-   return null;
+   try
+   {
+   return ResourceBundle.getBundle(bundleName, 
locale, Thread.currentThread().getContextClassLoader()).getString(key);
+   }
+   catch (MissingResourceException mrx2)
+   {
+   return null;
+   }
}
}
 



[1/2] git commit: formatted

2013-08-08 Thread svenmeier
Updated Branches:
  refs/heads/wicket-6.x 000cd8531 - 59d04da2a


formatted

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

Branch: refs/heads/wicket-6.x
Commit: 11c5b62d54dc76bd2a0196ff3e460ffdb29cb8d8
Parents: 000cd85
Author: svenmeier s...@meiers.net
Authored: Thu Aug 8 11:52:46 2013 +0200
Committer: svenmeier s...@meiers.net
Committed: Thu Aug 8 11:52:46 2013 +0200

--
 .../request/handler/render/WebPageRenderer.java | 25 +++-
 1 file changed, 14 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/11c5b62d/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
index 5dd15c4..f49a92b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
@@ -107,7 +107,7 @@ public class WebPageRenderer extends PageRenderer
}
 
// keep the original response
-   final WebResponse originalResponse = (WebResponse) 
requestCycle.getResponse();
+   final WebResponse originalResponse = 
(WebResponse)requestCycle.getResponse();
 
// buffered web response for page
BufferedWebResponse response = new 
BufferedWebResponse(originalResponse);
@@ -123,10 +123,11 @@ public class WebPageRenderer extends PageRenderer
if (scheduled == null  
requestCycle.getRequestHandlerScheduledAfterCurrent() != null)
{
// This is a special case.
-   // During page render another request handler 
got scheduled and will want to overwrite
-   // the response, so we need to let it.
-   // Just preserve the meta data headers
-   originalResponse.reset(); // clear the initial 
actions because they are already copied into the new response's actions
+   // During page render another request handler 
got scheduled and will want to
+   // overwrite the response, so we need to let it.
+   // Just preserve the meta data headers. Clear 
the initial actions because they are
+   // already copied into the new response's 
actions
+   originalResponse.reset();
response.writeMetaData(originalResponse);
return null;
}
@@ -253,13 +254,15 @@ public class WebPageRenderer extends PageRenderer
{
if (isRedirectToBuffer() == false  
logger.isDebugEnabled())
{
-   String details = String.format(redirect 
strategy: '%s', isAjax: '%s', redirect policy: '%s',  +
-   current url: '%s', target url: 
'%s', is new: '%s', is stateless: '%s', is temporary: '%s',
-   
Application.get().getRequestCycleSettings().getRenderStrategy(),
-   isAjax, getRedirectPolicy(), 
currentUrl, targetUrl, getPageProvider().isNewPageInstance(),
-   getPage().isPageStateless(), 
isSessionTemporary());
+   String details = String.format(
+   redirect strategy: '%s', isAjax: '%s', 
redirect policy: '%s', 
+   + current url: '%s', target 
url: '%s', is new: '%s', is stateless: '%s', is temporary: '%s',
+   
Application.get().getRequestCycleSettings().getRenderStrategy(), isAjax,
+   getRedirectPolicy(), currentUrl, 
targetUrl,
+   getPageProvider().isNewPageInstance(), 
getPage().isPageStateless(),
+   isSessionTemporary());
logger.debug(Falling back to 
Redirect_To_Buffer render strategy because none of the conditions  +
-   matched. Details:  + details);
+   

[2/2] git commit: WICKET-5309 check whether rendering changed page url

2013-08-08 Thread svenmeier
WICKET-5309 check whether rendering changed page url

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

Branch: refs/heads/wicket-6.x
Commit: 59d04da2a8b1fc600d0a56464aa3c26b59a39cfd
Parents: 11c5b62
Author: svenmeier s...@meiers.net
Authored: Thu Aug 8 12:25:31 2013 +0200
Committer: svenmeier s...@meiers.net
Committed: Thu Aug 8 12:25:31 2013 +0200

--
 .../request/handler/render/WebPageRenderer.java | 24 
 1 file changed, 19 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/59d04da2/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
index f49a92b..8e77875 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
@@ -268,17 +268,31 @@ public class WebPageRenderer extends PageRenderer
// force creation of possible stateful page to get the 
final target url
getPage();
 
-   Url renderTargetUrl = 
requestCycle.mapUrlFor(getRenderPageRequestHandler());
+   Url beforeRenderUrl = 
requestCycle.mapUrlFor(getRenderPageRequestHandler());
 
// redirect to buffer
-   BufferedWebResponse response = 
renderPage(renderTargetUrl, requestCycle);
+   BufferedWebResponse response = 
renderPage(beforeRenderUrl, requestCycle);
 
if (response == null)
{
return;
}
 
-   if (currentUrl.equals(renderTargetUrl))
+   // the url might have changed after page has been 
rendered (e.g. the
+   // stateless flag might have changed because stateful 
components
+   // were added)
+   final Url afterRenderUrl = 
requestCycle.mapUrlFor(getRenderPageRequestHandler());
+
+   if 
(beforeRenderUrl.getSegments().equals(afterRenderUrl.getSegments()) == false)
+   {
+   // the amount of segments is different - 
generated relative URLs
+   // will not work, we need to rerender the page. 
This can happen
+   // with IRequestHandlers that produce different 
URLs with
+   // different amount of segments for stateless 
and stateful pages
+   response = renderPage(afterRenderUrl, 
requestCycle);
+   }
+
+   if (currentUrl.equals(afterRenderUrl))
{
// no need to redirect when both urls are 
exactly the same

response.writeTo((WebResponse)requestCycle.getResponse());
@@ -298,9 +312,9 @@ public class WebPageRenderer extends PageRenderer
}
else
{
-   storeBufferedResponse(renderTargetUrl, 
response);
+   storeBufferedResponse(afterRenderUrl, response);
 
-   redirectTo(renderTargetUrl, requestCycle);
+   redirectTo(afterRenderUrl, requestCycle);
}
}
}



[1/2] git commit: formatted

2013-08-08 Thread svenmeier
Updated Branches:
  refs/heads/master 29b9422ad - 4ab506431


formatted

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

Branch: refs/heads/master
Commit: 1c8dc6f77027a3b3bcc68e24b427daa7effd2aa2
Parents: 29b9422
Author: svenmeier s...@meiers.net
Authored: Thu Aug 8 11:43:23 2013 +0200
Committer: svenmeier s...@meiers.net
Committed: Thu Aug 8 11:43:23 2013 +0200

--
 .../request/handler/render/WebPageRenderer.java | 135 +--
 1 file changed, 62 insertions(+), 73 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1c8dc6f7/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
index c3899ec..ad39922 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
@@ -107,7 +107,7 @@ public class WebPageRenderer extends PageRenderer
}
 
// keep the original response
-   final WebResponse originalResponse = (WebResponse) 
requestCycle.getResponse();
+   final WebResponse originalResponse = 
(WebResponse)requestCycle.getResponse();
 
// buffered web response for page
BufferedWebResponse response = new 
BufferedWebResponse(originalResponse);
@@ -123,10 +123,11 @@ public class WebPageRenderer extends PageRenderer
if (scheduled == null  
requestCycle.getRequestHandlerScheduledAfterCurrent() != null)
{
// This is a special case.
-   // During page render another request handler 
got scheduled and will want to overwrite
-   // the response, so we need to let it.
-   // Just preserve the meta data headers
-   originalResponse.reset(); // clear the initial 
actions because they are already copied into the new response's actions
+   // During page render another request handler 
got scheduled and will want to
+   // overwrite the response, so we need to let it.
+   // Just preserve the meta data headers. Clear 
the initial actions because they are
+   // already copied into the new response's 
actions
+   originalResponse.reset();
response.writeMetaData(originalResponse);
return null;
}
@@ -191,15 +192,18 @@ public class WebPageRenderer extends PageRenderer
 
boolean isAjax = isAjax(requestCycle);
 
-   boolean shouldPreserveClientUrl = 
((WebRequest)requestCycle.getRequest()).shouldPreserveClientUrl();
+   boolean shouldPreserveClientUrl = 
((WebRequest)requestCycle.getRequest())
+   .shouldPreserveClientUrl();
 
if (bufferedResponse != null)
{
-   logger.warn(The Buffered response should be handled by 
BufferedResponseRequestHandler);
+   logger
+   .warn(The Buffered response should be handled 
by BufferedResponseRequestHandler);
// if there is saved response for this URL render it

bufferedResponse.writeTo((WebResponse)requestCycle.getResponse());
}
-   else {
+   else
+   {
RedirectPolicy redirectPolicy = getRedirectPolicy();
 
boolean onePassRender = isOnePassRender();
@@ -210,7 +214,9 @@ public class WebPageRenderer extends PageRenderer
boolean isNewPageInstance = 
getPageProvider().isNewPageInstance();
boolean isPageStateless = getPage().isPageStateless();
 
-   if (shouldRenderPageAndWriteResponse(isAjax, 
onePassRender, isRedirectToRender, redirectPolicy, shouldPreserveClientUrl, 
targetEqualsCurrentUrl, isNewPageInstance, isPageStateless)) //
+   if (shouldRenderPageAndWriteResponse(isAjax, 
onePassRender, isRedirectToRender,
+   redirectPolicy, shouldPreserveClientUrl, 
targetEqualsCurrentUrl, 

[2/2] git commit: WICKET-5309 check whether rendering changed page url

2013-08-08 Thread svenmeier
WICKET-5309 check whether rendering changed page url

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

Branch: refs/heads/master
Commit: 4ab506431371e78ee5d1f5000200c74f89a97a94
Parents: 1c8dc6f
Author: svenmeier s...@meiers.net
Authored: Thu Aug 8 12:25:08 2013 +0200
Committer: svenmeier s...@meiers.net
Committed: Thu Aug 8 12:25:08 2013 +0200

--
 .../request/handler/render/WebPageRenderer.java | 25 
 1 file changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/4ab50643/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
index ad39922..b3fb62b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/handler/render/WebPageRenderer.java
@@ -259,17 +259,32 @@ public class WebPageRenderer extends PageRenderer
// force creation of possible stateful 
page to get the final target url
getPage();
 
-   Url renderTargetUrl = 
requestCycle.mapUrlFor(getRenderPageRequestHandler());
+   Url beforeRenderUrl = 
requestCycle.mapUrlFor(getRenderPageRequestHandler());
 
// redirect to buffer
-   BufferedWebResponse response = 
renderPage(renderTargetUrl, requestCycle);
+   BufferedWebResponse response = 
renderPage(beforeRenderUrl, requestCycle);
 
if (response == null)
{
return;
}
 
-   if (currentUrl.equals(renderTargetUrl))
+   // the url might have changed after 
page has been rendered (e.g. the
+   // stateless flag might have changed 
because stateful components
+   // were added)
+   final Url afterRenderUrl = requestCycle
+   
.mapUrlFor(getRenderPageRequestHandler());
+
+   if 
(beforeRenderUrl.getSegments().equals(afterRenderUrl.getSegments()) == false)
+   {
+   // the amount of segments is 
different - generated relative URLs
+   // will not work, we need to 
rerender the page. This can happen
+   // with IRequestHandlers that 
produce different URLs with
+   // different amount of segments 
for stateless and stateful pages
+   response = 
renderPage(afterRenderUrl, requestCycle);
+   }
+
+   if (currentUrl.equals(afterRenderUrl))
{
// no need to redirect when 
both urls are exactly the same

response.writeTo((WebResponse)requestCycle.getResponse());
@@ -289,9 +304,9 @@ public class WebPageRenderer extends PageRenderer
}
else
{
-   
storeBufferedResponse(renderTargetUrl, response);
+   
storeBufferedResponse(afterRenderUrl, response);
 
-   redirectTo(renderTargetUrl, 
requestCycle);
+   redirectTo(afterRenderUrl, 
requestCycle);
}
}
}



[jira] [Resolved] (WICKET-5309) No page id appended to some stateful pages using repeaters

2013-08-08 Thread Sven Meier (JIRA)

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

Sven Meier resolved WICKET-5309.


   Resolution: Fixed
Fix Version/s: 6.10.0
   7.0.0

The page url is now checked again after rendering (as before WICKET-4995). Note 
that the fix for WICKET-4995 is still in place, i.e. the page is acquired first 
to prevent a stateful page to be rendered twice.

 No page id appended to some stateful pages using repeaters
 --

 Key: WICKET-5309
 URL: https://issues.apache.org/jira/browse/WICKET-5309
 Project: Wicket
  Issue Type: Bug
Affects Versions: 6.9.1
Reporter: Bertrand Guay-Paquet
Assignee: Sven Meier
  Labels: stateful
 Fix For: 7.0.0, 6.10.0

 Attachments: WICKET-5309.zip


 My test case is a page containing a ListView with a single stateful child. In 
 that case, there is no redirect done to append a pageId to the url because 
 the page's statefulness check is erroneous.
 Analysis:
 This calls page.isPageStateless() to dertermine whether a pageId should be 
 added
 BookmarkableMapper(AbstractBookmarkableMapper).getPageInfo(IPageRequestHandler)
  line: 440
 BookmarkableMapper(AbstractBookmarkableMapper).mapHandler(IRequestHandler) 
 line: 387
 SystemMapper(CompoundRequestMapper).mapHandler(IRequestHandler) line: 215
 RequestCycle.mapUrlFor(IRequestHandler) line: 429
 WebPageRenderer.respond(RequestCycle) line: 268
 RenderPageRequestHandler.respond(IRequestCycle) line: 165
 RequestCycle$HandlerExecutor.respond(IRequestHandler) line: 861
 RequestCycle$HandlerExecutor(RequestHandlerStack).execute(IRequestHandler) 
 line: 64
 RequestCycle.execute(IRequestHandler) line: 261
 The problem I see is that AbstractRepeater's onPopulate() is called during 
 onBeforeRender() and this is not done when the stateless status of the page 
 is first checked. Therefore, no pageId is added unless other components not 
 located inside repeaters are also stateful. 
 See thread http://wicket-users.markmail.org/thread/6q2dmns7lqjgkok7
 I will add a quickstart.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (WICKET-4993) Add a minInputLength parameter to AutoCompleteTextField

2013-08-08 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13733380#comment-13733380
 ] 

Martin Grigorov commented on WICKET-4993:
-

The default value should be 1 to be backward compatible, right ?
In your patch I see 3.

I'll test it now.

 Add a minInputLength parameter to AutoCompleteTextField
 ---

 Key: WICKET-4993
 URL: https://issues.apache.org/jira/browse/WICKET-4993
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-extensions
Affects Versions: 6.4.0
Reporter: Andrea Del Bene
Priority: Minor
 Attachments: WICKET-4993.patch


 We should add a parameter to AutoCompleteTextField to set the minimum input 
 length required to display the autocomplete list.
 See patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (WICKET-4993) Add a minInputLength parameter to AutoCompleteTextField

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-4993:
---

Assignee: Martin Grigorov

 Add a minInputLength parameter to AutoCompleteTextField
 ---

 Key: WICKET-4993
 URL: https://issues.apache.org/jira/browse/WICKET-4993
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-extensions
Affects Versions: 6.4.0
Reporter: Andrea Del Bene
Assignee: Martin Grigorov
Priority: Minor
 Attachments: WICKET-4993.patch


 We should add a parameter to AutoCompleteTextField to set the minimum input 
 length required to display the autocomplete list.
 See patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: WICKET-4993 Add a minInputLength parameter to AutoCompleteTextField

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/master 4ab506431 - 30345bf3d


WICKET-4993 Add a minInputLength parameter to AutoCompleteTextField


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

Branch: refs/heads/master
Commit: 30345bf3d004fe0d7213c59f61302b3d1c35d621
Parents: 4ab5064
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 13:26:35 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 13:26:35 2013 +0200

--
 .../AbstractAutoCompleteBehavior.java   |  1 +
 .../html/autocomplete/AutoCompleteSettings.java | 23 
 .../html/autocomplete/wicket-autocomplete.js| 20 ++---
 3 files changed, 41 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/30345bf3/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
index a9360a7..45ed86d 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
@@ -155,6 +155,7 @@ public abstract class AbstractAutoCompleteBehavior extends 
AbstractDefaultAjaxBe
settings.getIgnoreBordersWhenPositioning());
sb.append(,showListOnFocusGain: 
).append(settings.getShowListOnFocusGain());
sb.append(,throttleDelay: 
).append(settings.getThrottleDelay());
+   sb.append(,minInputLength: 
).append(settings.getMinInputLength());
sb.append(,parameterName: 
').append(settings.getParameterName()).append('\'');
sb.append(,showCompleteListOnFocusGain: ).append(
settings.getShowCompleteListOnFocusGain());

http://git-wip-us.apache.org/repos/asf/wicket/blob/30345bf3/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
index 0bd6aa8..89b78ab 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
@@ -71,6 +71,8 @@ public final class AutoCompleteSettings implements 
IClusterable
 
private String parameterName = q;
 
+   private int minInputLength = 1;
+
/**
 * Indicates whether the first item in the list is automatically 
selected when the autocomplete
 * list is shown.
@@ -357,4 +359,25 @@ public final class AutoCompleteSettings implements 
IClusterable
{
return parameterName;
}
+
+   /**
+* @return the minimum input length required to display the 
autocomplete list
+*/
+   public int getMinInputLength()
+   {
+   return minInputLength;
+   }
+
+   /**
+* Set the minimum input length required to display the autocomplete 
list
+*
+* @param minInputLength
+*the minimum input length required to display the 
autocomplete list
+* @return this {@link AutoCompleteSettings}
+*/
+   public AutoCompleteSettings setMinInputLength(int minInputLength)
+   {
+   this.minInputLength = minInputLength;
+   return this;
+   }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/30345bf3/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
index 6de3de2..1a13d0c 

git commit: WICKET-4993 Add a minInputLength parameter to AutoCompleteTextField

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-6.x 59d04da2a - 7b8785cde


WICKET-4993 Add a minInputLength parameter to AutoCompleteTextField


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

Branch: refs/heads/wicket-6.x
Commit: 7b8785cde48e96709f5c274b4ef9d7240c974e2a
Parents: 59d04da
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 13:26:35 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 13:27:17 2013 +0200

--
 .../AbstractAutoCompleteBehavior.java   |  1 +
 .../html/autocomplete/AutoCompleteSettings.java | 23 
 .../html/autocomplete/wicket-autocomplete.js| 22 +++
 3 files changed, 42 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7b8785cd/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
index 9105f73..487d09b 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java
@@ -155,6 +155,7 @@ public abstract class AbstractAutoCompleteBehavior extends 
AbstractDefaultAjaxBe
sb.append(,ignoreBordersWhenPositioning: 
).append(settings.getIgnoreBordersWhenPositioning());
sb.append(,showListOnFocusGain: 
).append(settings.getShowListOnFocusGain());
sb.append(,throttleDelay: 
).append(settings.getThrottleDelay());
+   sb.append(,minInputLength: 
).append(settings.getMinInputLength());
sb.append(,parameterName: 
').append(settings.getParameterName()).append('\'');
sb.append(,showCompleteListOnFocusGain: ).append(
settings.getShowCompleteListOnFocusGain());

http://git-wip-us.apache.org/repos/asf/wicket/blob/7b8785cd/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
index 8f784ad..fba085e 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java
@@ -73,6 +73,8 @@ public final class AutoCompleteSettings implements 
IClusterable
 
private String parameterName = q;
 
+   private int minInputLength = 1;
+
/**
 * Indicates whether the first item in the list is automatically 
selected when the autocomplete
 * list is shown.
@@ -385,4 +387,25 @@ public final class AutoCompleteSettings implements 
IClusterable
{
return parameterName;
}
+
+   /**
+* @return the minimum input length required to display the 
autocomplete list
+*/
+   public int getMinInputLength()
+   {
+   return minInputLength;
+   }
+
+   /**
+* Set the minimum input length required to display the autocomplete 
list
+*
+* @param minInputLength
+*the minimum input length required to display the 
autocomplete list
+* @return this {@link AutoCompleteSettings}
+*/
+   public AutoCompleteSettings setMinInputLength(int minInputLength)
+   {
+   this.minInputLength = minInputLength;
+   return this;
+   }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/7b8785cd/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
--
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
 

[jira] [Resolved] (WICKET-4993) Add a minInputLength parameter to AutoCompleteTextField

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-4993.
-

   Resolution: Fixed
Fix Version/s: 6.10.0
   7.0.0

Changed the default to be 1, so it the same behavior as before.
Additionally added functionality to hide the drop-down when the precondition 
fails.

Thanks!

 Add a minInputLength parameter to AutoCompleteTextField
 ---

 Key: WICKET-4993
 URL: https://issues.apache.org/jira/browse/WICKET-4993
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-extensions
Affects Versions: 6.4.0
Reporter: Andrea Del Bene
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 7.0.0, 6.10.0

 Attachments: WICKET-4993.patch


 We should add a parameter to AutoCompleteTextField to set the minimum input 
 length required to display the autocomplete list.
 See patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Upgrade Jetty to 8.1.12 and Spring to 3.2.4

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/master 30345bf3d - 2e2c4ba69


Upgrade Jetty to 8.1.12 and Spring to 3.2.4


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

Branch: refs/heads/master
Commit: 2e2c4ba69d44a9471e80c337fb234ea52655aac5
Parents: 30345bf
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 13:41:46 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 13:41:46 2013 +0200

--
 .../quickstart/src/main/resources/archetype-resources/pom.xml| 2 +-
 pom.xml  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2e2c4ba6/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
--
diff --git 
a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml 
b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index 594c990..21da03e 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -43,7 +43,7 @@
/licenses
properties
wicket.version7.0.0-SNAPSHOT/wicket.version
-   jetty.version8.1.11.v20130520/jetty.version
+   jetty.version8.1.12.v20130726/jetty.version
slf4j.version1.7.5/slf4j.version

project.build.sourceEncodingUTF-8/project.build.sourceEncoding
/properties

http://git-wip-us.apache.org/repos/asf/wicket/blob/2e2c4ba6/pom.xml
--
diff --git a/pom.xml b/pom.xml
index c912bf9..9dd4884 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,9 +30,9 @@
properties

project.build.sourceEncodingUTF-8/project.build.sourceEncoding
mvn.build.java.version1.7/mvn.build.java.version
-   jetty.version8.1.11.v20130520/jetty.version
+   jetty.version8.1.12.v20130726/jetty.version
jetty9.version9.0.4.v20130625/jetty9.version
-   spring.version3.2.3.RELEASE/spring.version
+   spring.version3.2.4.RELEASE/spring.version
servlet-api.version3.0.1/servlet-api.version
maven.javadoc.version2.9.1/maven.javadoc.version
maven.surefire.version2.12.2/maven.surefire.version



[jira] [Assigned] (WICKET-5287) NumberFormatException from Requests with invalid URIs

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-5287:
---

Assignee: Martin Grigorov

 NumberFormatException from Requests with invalid URIs
 -

 Key: WICKET-5287
 URL: https://issues.apache.org/jira/browse/WICKET-5287
 Project: Wicket
  Issue Type: Bug
Affects Versions: 1.5.10, 6.9.1
Reporter: Martin Funk
Assignee: Martin Grigorov

 we still can reproduce this on any version.
 Maybe this git diff gives a clearer picture:
 diff --git 
 a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
  
 b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 index f974a06..9ee3308 100644
 --- 
 a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 +++ 
 b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 @@ -191,6 +191,16 @@
   assertEquals(any/source/of/error, errorClientUrl.toString());
   }
  
 + @Test
 + public void wicketFoo()
 + {
 + String filterPath = filterPath;
 + MockHttpServletRequest httpRequest = new 
 MockHttpServletRequest(null, null, null);
 + httpRequest.setURL(http://localhost; + '/' + filterPath + 
 /request/foo://:/);
 +
 + ServletWebRequest webRequest = new 
 ServletWebRequest(httpRequest, filterPath);
 + }
 +
   private static class CustomRequestPage extends WebPage implements 
 IMarkupResourceStreamProvider
   {
   private static final long serialVersionUID = 1L;
 This tests leads to this exption
 java.lang.NumberFormatException: For input string: 
   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at org.apache.wicket.request.Url.parse(Url.java:277)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:208)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.init(ServletWebRequest.java:112)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.init(ServletWebRequest.java:82)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequestTest.wicketFoo(ServletWebRequestTest.java:201)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at 
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   at 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   at 
 org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
   at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
   at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
   at 
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
   at 
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (WICKET-4993) Add a minInputLength parameter to AutoCompleteTextField

2013-08-08 Thread Andrea Del Bene (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13733448#comment-13733448
 ] 

Andrea Del Bene commented on WICKET-4993:
-

yes sorry, I left 3 instead of 1. Thank you!

 Add a minInputLength parameter to AutoCompleteTextField
 ---

 Key: WICKET-4993
 URL: https://issues.apache.org/jira/browse/WICKET-4993
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-extensions
Affects Versions: 6.4.0
Reporter: Andrea Del Bene
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 7.0.0, 6.10.0

 Attachments: WICKET-4993.patch


 We should add a parameter to AutoCompleteTextField to set the minimum input 
 length required to display the autocomplete list.
 See patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (WICKET-5287) NumberFormatException when parsing the port from Requests with invalid URIs

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5287:


Summary: NumberFormatException when parsing the port from Requests with 
invalid URIs  (was: NumberFormatException from Requests with invalid URIs)

 NumberFormatException when parsing the port from Requests with invalid URIs
 ---

 Key: WICKET-5287
 URL: https://issues.apache.org/jira/browse/WICKET-5287
 Project: Wicket
  Issue Type: Bug
Affects Versions: 1.5.10, 6.9.1
Reporter: Martin Funk
Assignee: Martin Grigorov

 we still can reproduce this on any version.
 Maybe this git diff gives a clearer picture:
 diff --git 
 a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
  
 b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 index f974a06..9ee3308 100644
 --- 
 a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 +++ 
 b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 @@ -191,6 +191,16 @@
   assertEquals(any/source/of/error, errorClientUrl.toString());
   }
  
 + @Test
 + public void wicketFoo()
 + {
 + String filterPath = filterPath;
 + MockHttpServletRequest httpRequest = new 
 MockHttpServletRequest(null, null, null);
 + httpRequest.setURL(http://localhost; + '/' + filterPath + 
 /request/foo://:/);
 +
 + ServletWebRequest webRequest = new 
 ServletWebRequest(httpRequest, filterPath);
 + }
 +
   private static class CustomRequestPage extends WebPage implements 
 IMarkupResourceStreamProvider
   {
   private static final long serialVersionUID = 1L;
 This tests leads to this exption
 java.lang.NumberFormatException: For input string: 
   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at org.apache.wicket.request.Url.parse(Url.java:277)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:208)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.init(ServletWebRequest.java:112)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.init(ServletWebRequest.java:82)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequestTest.wicketFoo(ServletWebRequestTest.java:201)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at 
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   at 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   at 
 org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
   at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
   at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
   at 
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
   at 
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: WICKET-5287 NumberFormatException when parsing the port from Requests with invalid URIs

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/master 2e2c4ba69 - e6c24a19f


WICKET-5287 NumberFormatException when parsing the port from Requests with 
invalid URIs


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

Branch: refs/heads/master
Commit: e6c24a19f0ada846445cbc9a3d87a0a37617db84
Parents: 2e2c4ba
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 14:42:55 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 14:42:55 2013 +0200

--
 .../protocol/http/servlet/ServletWebRequest.java   |  2 +-
 .../http/servlet/ServletWebRequestTest.java| 15 +++
 .../main/java/org/apache/wicket/request/Url.java   | 17 -
 3 files changed, 32 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/e6c24a19/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
index ecd0f22..0581076 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
@@ -205,7 +205,7 @@ public class ServletWebRequest extends WebRequest
}
}
 
-   return setParameters(Url.parse(url.toString(), getCharset()));
+   return setParameters(Url.parse(url.toString(), getCharset(), 
false));
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/e6c24a19/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
index f974a06..965dcd8 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
@@ -191,6 +191,21 @@ public class ServletWebRequestTest extends Assert
assertEquals(any/source/of/error, errorClientUrl.toString());
}
 
+   /**
+* WICKET-5287
+*/
+   @Test
+   public void parseUrlWhichLooksLikeFullInItsContextRelativePart()
+   {
+   String filterPath = filterPath;
+   MockHttpServletRequest httpRequest = new 
MockHttpServletRequest(null, null, null);
+   String looksLikeFullUrl = /foo://:/;
+   httpRequest.setURL(http://localhost; + '/' + 
httpRequest.getContextPath() + '/' + filterPath + looksLikeFullUrl);
+
+   ServletWebRequest webRequest = new 
ServletWebRequest(httpRequest, filterPath);
+   assertEquals(looksLikeFullUrl, 
webRequest.getClientUrl().toString());
+   }
+
private static class CustomRequestPage extends WebPage implements 
IMarkupResourceStreamProvider
{
private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/wicket/blob/e6c24a19/wicket-request/src/main/java/org/apache/wicket/request/Url.java
--
diff --git a/wicket-request/src/main/java/org/apache/wicket/request/Url.java 
b/wicket-request/src/main/java/org/apache/wicket/request/Url.java
index 596163e..11f6b47 100755
--- a/wicket-request/src/main/java/org/apache/wicket/request/Url.java
+++ b/wicket-request/src/main/java/org/apache/wicket/request/Url.java
@@ -202,6 +202,21 @@ public class Url implements Serializable
 */
public static Url parse(CharSequence _url, Charset charset)
{
+   return parse(_url, charset, true);
+   }
+
+   /**
+* Parses the given URL string.
+*
+* @param _url
+*absolute or relative url with query string
+* @param charset
+* @param isFullHint
+*a hint whether to try to parse the protocol, host and 
port part of the url
+* @return Url object
+*/
+   public static Url parse(CharSequence _url, Charset charset, boolean 
isFullHint)
+   {
Args.notNull(_url, _url);
 
final Url result = new Url(charset);
@@ 

git commit: WICKET-5287 NumberFormatException when parsing the port from Requests with invalid URIs

2013-08-08 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-6.x 7b8785cde - ee075afab


WICKET-5287 NumberFormatException when parsing the port from Requests with 
invalid URIs


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

Branch: refs/heads/wicket-6.x
Commit: ee075afab34b503b65270627621fff8b00898e24
Parents: 7b8785c
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu Aug 8 14:42:55 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Aug 8 14:43:12 2013 +0200

--
 .../protocol/http/servlet/ServletWebRequest.java   |  2 +-
 .../http/servlet/ServletWebRequestTest.java| 15 +++
 .../main/java/org/apache/wicket/request/Url.java   | 17 -
 3 files changed, 32 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ee075afa/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
index 24947bb..e97113f 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
@@ -206,7 +206,7 @@ public class ServletWebRequest extends WebRequest
}
}
 
-   return setParameters(Url.parse(url.toString(), getCharset()));
+   return setParameters(Url.parse(url.toString(), getCharset(), 
false));
}
 
/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/ee075afa/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
index f974a06..965dcd8 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
@@ -191,6 +191,21 @@ public class ServletWebRequestTest extends Assert
assertEquals(any/source/of/error, errorClientUrl.toString());
}
 
+   /**
+* WICKET-5287
+*/
+   @Test
+   public void parseUrlWhichLooksLikeFullInItsContextRelativePart()
+   {
+   String filterPath = filterPath;
+   MockHttpServletRequest httpRequest = new 
MockHttpServletRequest(null, null, null);
+   String looksLikeFullUrl = /foo://:/;
+   httpRequest.setURL(http://localhost; + '/' + 
httpRequest.getContextPath() + '/' + filterPath + looksLikeFullUrl);
+
+   ServletWebRequest webRequest = new 
ServletWebRequest(httpRequest, filterPath);
+   assertEquals(looksLikeFullUrl, 
webRequest.getClientUrl().toString());
+   }
+
private static class CustomRequestPage extends WebPage implements 
IMarkupResourceStreamProvider
{
private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/wicket/blob/ee075afa/wicket-request/src/main/java/org/apache/wicket/request/Url.java
--
diff --git a/wicket-request/src/main/java/org/apache/wicket/request/Url.java 
b/wicket-request/src/main/java/org/apache/wicket/request/Url.java
index ab70446..c285c51 100755
--- a/wicket-request/src/main/java/org/apache/wicket/request/Url.java
+++ b/wicket-request/src/main/java/org/apache/wicket/request/Url.java
@@ -202,6 +202,21 @@ public class Url implements Serializable
 */
public static Url parse(CharSequence _url, Charset charset)
{
+   return parse(_url, charset, true);
+   }
+
+   /**
+* Parses the given URL string.
+*
+* @param _url
+*absolute or relative url with query string
+* @param charset
+* @param isFullHint
+*a hint whether to try to parse the protocol, host and 
port part of the url
+* @return Url object
+*/
+   public static Url parse(CharSequence _url, Charset charset, boolean 
isFullHint)
+   {
Args.notNull(_url, _url);
 
final Url result = new Url(charset);

[jira] [Resolved] (WICKET-5287) NumberFormatException when parsing the port from Requests with invalid URIs

2013-08-08 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5287.
-

   Resolution: Fixed
Fix Version/s: 6.10.0
   7.0.0

 NumberFormatException when parsing the port from Requests with invalid URIs
 ---

 Key: WICKET-5287
 URL: https://issues.apache.org/jira/browse/WICKET-5287
 Project: Wicket
  Issue Type: Bug
Affects Versions: 1.5.10, 6.9.1
Reporter: Martin Funk
Assignee: Martin Grigorov
 Fix For: 7.0.0, 6.10.0


 we still can reproduce this on any version.
 Maybe this git diff gives a clearer picture:
 diff --git 
 a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
  
 b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 index f974a06..9ee3308 100644
 --- 
 a/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 +++ 
 b/wicket-core/src/test/java/org/apache/wicket/protocol/http/servlet/ServletWebRequestTest.java
 @@ -191,6 +191,16 @@
   assertEquals(any/source/of/error, errorClientUrl.toString());
   }
  
 + @Test
 + public void wicketFoo()
 + {
 + String filterPath = filterPath;
 + MockHttpServletRequest httpRequest = new 
 MockHttpServletRequest(null, null, null);
 + httpRequest.setURL(http://localhost; + '/' + filterPath + 
 /request/foo://:/);
 +
 + ServletWebRequest webRequest = new 
 ServletWebRequest(httpRequest, filterPath);
 + }
 +
   private static class CustomRequestPage extends WebPage implements 
 IMarkupResourceStreamProvider
   {
   private static final long serialVersionUID = 1L;
 This tests leads to this exption
 java.lang.NumberFormatException: For input string: 
   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at org.apache.wicket.request.Url.parse(Url.java:277)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:208)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.init(ServletWebRequest.java:112)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.init(ServletWebRequest.java:82)
   at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequestTest.wicketFoo(ServletWebRequestTest.java:201)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at 
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
   at 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   at 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
   at 
 org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
   at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
   at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
   at 
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
   at 
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
   at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (WICKET-5311) Logical collision between setRequired() and setNullValid() methods in DropDownChoice

2013-08-08 Thread Karel Krajca (JIRA)

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

Karel Krajca updated WICKET-5311:
-

Description: 
In my opinion, there is a logical collision between setRequired() and 
setNullValid() methods in DropDownChoice. Imagine you have an optional property 
A assigned a value in your model. In UI you allow the property A mapped to an 
instance of DropDownChoice to have its value from a list (Item1, Item2). When 
you adjust the instance of DropDownChoice to be 
DropDownChoice.setRequired(false), you expect to have ((none), Item1, Item2) in 
the dropdown list but in reality, you get only (Item1, Item2) choices. To have 
the (any) option which stands for a null value in the dropdown, you still need 
to set DropDownChoice.setNullValid(false).

I would propose to automatically add the (none) or any value to 
DropDownChoice list when having DropDownChoice.setRequired(false).

Another case showing that setRequired() and setNullValid() are logically 
contradicted is that you can set DropDownChoice.setRequired(true) and 
DropDownChoice.setNullValid(true) leading to have a dropdown with (any) 
option which can be selected, but don not pass the form validation.

Thank you for your consideration of this issue which could lead you to some 
useful refactoring.

  was:
In my opinion, there is a collision between setRequired() and setNullValid() 
methods in DropDownChoice. Imagine you have an optional property A assigned a 
value in your model. In UI you allow the property A mapped to an instance of 
DropDownChoice to have its value from a list (Item1, Item2). When you adjust 
the instance of DropDownChoice to be DropDownChoice.setRequired(false), you 
expect to have ((none), Item1, Item2) in the dropdown list but in reality, you 
get only (Item1, Item2) choices. To have the (any) option which stands for a 
null value in the dropdown, you still need to set 
DropDownChoice.setNullValid(false).

I would propose to automatically add the (none) or any value to 
DropDownChoice list when having DropDownChoice.setRequired(false).

Another case showing that setRequired() and setNullValid() are logically 
contradicted is that you can set DropDownChoice.setRequired(true) and 
DropDownChoice.setNullValid(true) leading to have a dropdown with (any) 
option which can be selected, but don not pass the form validation.

Thank you for your consideration of this issue which could lead you to some 
useful refactoring.


 Logical collision between setRequired() and setNullValid() methods in 
 DropDownChoice
 

 Key: WICKET-5311
 URL: https://issues.apache.org/jira/browse/WICKET-5311
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.8.0
Reporter: Karel Krajca

 In my opinion, there is a logical collision between setRequired() and 
 setNullValid() methods in DropDownChoice. Imagine you have an optional 
 property A assigned a value in your model. In UI you allow the property A 
 mapped to an instance of DropDownChoice to have its value from a list (Item1, 
 Item2). When you adjust the instance of DropDownChoice to be 
 DropDownChoice.setRequired(false), you expect to have ((none), Item1, Item2) 
 in the dropdown list but in reality, you get only (Item1, Item2) choices. To 
 have the (any) option which stands for a null value in the dropdown, you 
 still need to set DropDownChoice.setNullValid(false).
 I would propose to automatically add the (none) or any value to 
 DropDownChoice list when having DropDownChoice.setRequired(false).
 Another case showing that setRequired() and setNullValid() are logically 
 contradicted is that you can set DropDownChoice.setRequired(true) and 
 DropDownChoice.setNullValid(true) leading to have a dropdown with (any) 
 option which can be selected, but don not pass the form validation.
 Thank you for your consideration of this issue which could lead you to some 
 useful refactoring.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (WICKET-5311) Logical collision between setRequired() and setNullValid() methods in DropDownChoice

2013-08-08 Thread Karel Krajca (JIRA)
Karel Krajca created WICKET-5311:


 Summary: Logical collision between setRequired() and 
setNullValid() methods in DropDownChoice
 Key: WICKET-5311
 URL: https://issues.apache.org/jira/browse/WICKET-5311
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.8.0
Reporter: Karel Krajca


In my opinion, there is a collision between setRequired() and setNullValid() 
methods in DropDownChoice. Imagine you have an optional property A assigned a 
value in your model. In UI you allow the property A mapped to an instance of 
DropDownChoice to have its value from a list (Item1, Item2). When you adjust 
the instance of DropDownChoice to be DropDownChoice.setRequired(false), you 
expect to have ((none), Item1, Item2) in the dropdown list but in reality, you 
get only (Item1, Item2) choices. To have the (any) option which stands for a 
null value in the dropdown, you still need to set 
DropDownChoice.setNullValid(false).

I would propose to automatically add the (none) or any value to 
DropDownChoice list when having DropDownChoice.setRequired(false).

Another case showing that setRequired() and setNullValid() are logically 
contradicted is that you can set DropDownChoice.setRequired(true) and 
DropDownChoice.setNullValid(true) leading to have a dropdown with (any) 
option which can be selected, but don not pass the form validation.

Thank you for your consideration of this issue which could lead you to some 
useful refactoring.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[CONF] Apache Wicket Companies that provide services

2013-08-08 Thread Szurdi Miklos (Confluence)







Companies that provide services
Page edited by Szurdi Miklos


 Changes (1)
 




...
* [Mystic Coders, LLC|http://www.mysticcoders.com/] is a company that has developed Wicket solutions for many large to small companies and is available for consulting, developing, training and speaking engagements. * [Metaprime|http://www.metaprime.hu] is a Hungarian company developing Wicket web applications and offering consulting and development services, training sessions for small to medium sized teams. 
* [Sonrisa International Inc.|http://sonrisainc.com] is an IT Outsource company providing Apache Wicket development and Wicket consultancy in Europe and the US 
* [Richard Paul|http://www.linkedin.com/in/richardpaullinked] Wicket Consulting Services in the Greater Chicago Area. * [Solvation|http://www.solvation.net] Java  Wicket consulting based in Copenhagen, Denmark. 
...


Full Content

List of companies that provide commercial services for Wicket.


Wicket Support Services


	Jonathan Locke originated Wicket and provides consulting services.
	JTeam is a leading Dutch solutions company and sister company of SpringSource, offering Wicket training courses in Holland and Belgium in partnership with jWeekend.
	Zenika is a leading French training company, offering Wicket courses in Paris in partnership with jWeekend.
	Wicket Support is a company that provides training, consultations and commercial support for Wicket.
	Wicket Training provides training classes, on-site training, and consulting for Wicket (US-Based).
	Jaywayis a premier Java consulting group that via its Malaysian subsidiary provides services for Wicket development, especially running Wicket in OSGi environments.
	Jayway DKis a premier Java consulting group located in Denmark provides services for Wicket development, course etc.
	Skillsmatteris a leading provider of training, mentoring and project based skills transfer. Amongst other things, they provide Wicket courses.
	Anyware Technologies is a french company  that provides many training courses, including Wicket.
	jWeekend provides consultancy, product development and  weekday/weekend, expert training globally, in Java technologies, Scala, OO  also in Wicket, since 2007.
	comSysto GmbH provides Wicket consulting and training in Germany in cooperation with jWeekend. Furthermore they provide consulting services in Spring and Oracle BI.
	Doculibre Inc. is a Canadian company that provides Wicket support and development.
	Componence India  is an Indian company that provides Wicket support and development.
	Xavier Hanin is a french independent consultant who provides services for Wicket development and training.
	Curalia is Java consulting company that provides services for Wicket development.
	The Macau Productivity and Technology Transfer Center is a non-profit organization that is including Wicket in its extensive training programs.
	Reaktor Innovations is a Finnish company that provides Wicket development and training.
	Ralf Ebert is a German independent consultant who provides services for Wicket development and German Wicket training courses.
	JointEffort is a small Dutch company that provides training, consultations and services for Wicket development.
	Leverage IT is a small South African IT Consulting and Development company that specializes in the use of Java Open Source Technologies, Platforms and Frameworks, including Wicket.
	XENTUM is a Polish company that provides Wicket development and support.
	automação.info is a Brazilian company that provides Wicket development.
	Genuco Systems is a company with offices in Hong Kong and Canada that provide leading edge Wicket development solutions as well as financial services.
	Devotek IT is the corporate identity of Thomas Mäder. I offer contracting, consulting and training for Wicket and Eclipse (where I used to be a committer).
	footprint e.K. / Jan Kriesten provides training and consulting with Wicket, Java and Scala. Jan Kriesten is located in Hamburg, Germany, but will be available on-site in other countries as well.
	Studio M2J of Juan Moreno  C.is a company located in Milan Italy offering Wicket development/J2ee integration, Trainig in Java and Wicket/Tapestry, Eclipse and hibernate, embedded solutions too.
	3FConsulting is a company located in Florence Italy offering Wicket development/J2ee integration and embedded solutions too.
	Mystic Coders, LLC is a company that has developed Wicket solutions for many large to small companies and is available for consulting, developing, training and speaking engagements.
	Metaprime is a Hungarian company developing Wicket web applications and offering consulting and development services, training sessions for small to medium sized teams.
	Sonrisa 

[jira] [Created] (WICKET-5312) Add detachModel(IModel? model) to Component

2013-08-08 Thread Steve Lowery (JIRA)
Steve Lowery created WICKET-5312:


 Summary: Add detachModel(IModel? model) to Component
 Key: WICKET-5312
 URL: https://issues.apache.org/jira/browse/WICKET-5312
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
 Environment: Any
Reporter: Steve Lowery
Priority: Minor


Can you add the following method (or something similar) to Component to avoid a 
lot of boilerplate code when a Component has more than one model object?  We 
have many components that take more than one model object and we are 
responsible for detaching all but the one passed into super.  If those others 
are optional, we have to null check them before detaching.  Would be nice if 
wicket did this for us...

protected final void detachModel(IModel? model) {
  if(model != null) {
model.detach();
  }
}


Without a convenience method, our code looks like this...

@Override
protected void onDetach() {
  if(modelOne != null) {
modelOne.detach();
  }
  if(modelTwo != null) {
modelTwo.detach();
  }
 ...
}



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira