[jira] [Commented] (WICKET-5225) Inconsistent behaviour of org.apache.wicket.Page.isPageStateless()

2013-06-19 Thread Mischa Neumann (JIRA)

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

Mischa Neumann commented on WICKET-5225:


Sounds reasonable. 
We can't migrate to the next major version in short, so I will try to manually 
prepare the component tree in our base page implementation in 
org.apache.wicket.Component.onInitialize().

closed in 7.x is would be acceptable.

 Inconsistent behaviour of org.apache.wicket.Page.isPageStateless()
 --

 Key: WICKET-5225
 URL: https://issues.apache.org/jira/browse/WICKET-5225
 Project: Wicket
  Issue Type: Bug
  Components: wicket-auth-roles
Affects Versions: 6.8.0
 Environment: any
Reporter: Mischa Neumann
 Attachments: wicket-bug-5225-quickstart.zip


 we have a page with
 - a login form A (org.apache.wicket.markup.html.form.StatelessFormT)
 - a standard form B inside a panel which is secured with 
 @AuthorizeAction(action = Action.RENDER...)
 our problem: the user must submit the login form twice.
 reason:
 - when the page is requested the first time, the page is stateless cause none 
 of the visible children are stateful.
 - when the user now submits the login form, the page claims to be stateful, 
 the stateful component is form B. 
 - 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(IRequestCycle)
  now handles the page as expired and omits the submit
 possible buggy code: 
 - the visiblity of components is computed before rendering in 
 org.apache.wicket.Component.setRenderAllowed()
 - 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(IRequestCycle)
  calls only org.apache.wicket.MarkupContainer.internalInitialize() on the 
 current page to give it a chance for computing its visibility, 
 Component.setRenderAllowed() is not called

--
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-5221) Add null choice support to Select component like in AbstractSingleSelect

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5221:
-

AbstractSingleSelectChoice works with string concatenation to generate the 
options, while Select's design is to work with proper Components.
In ASSC I see 
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java?source=cc#L308-L396,
 i.e. almost 100 lines of code and comments dealing with the nullOption.

Please attach a patch so we can discuss it. Maybe we will find a middle ground 
where everyone is happy.

 Add null choice support to Select component like in AbstractSingleSelect
 

 Key: WICKET-5221
 URL: https://issues.apache.org/jira/browse/WICKET-5221
 Project: Wicket
  Issue Type: New Feature
  Components: wicket-extensions
Affects Versions: 6.8.0
Reporter: Pedro Santos
Assignee: Pedro Santos
Priority: Minor

 Select component in wicket-extensions is designed to be a light one. 
 Nevertheless I think it's ok to add a new variable to it - e.g. nullValid - 
 so we can set the component to support null choices.

--
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


svn commit: r1494486 - /wicket/common/site/apidocs/1.5/index.html

2013-06-19 Thread mgrigorov
Author: mgrigorov
Date: Wed Jun 19 07:48:08 2013
New Revision: 1494486

URL: http://svn.apache.org/r1494486
Log:
Fix javadocs agains frame injection (http://www.kb.cert.org/vuls/id/225657)


Modified:
wicket/common/site/apidocs/1.5/index.html

Modified: wicket/common/site/apidocs/1.5/index.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/apidocs/1.5/index.html?rev=1494486r1=1494485r2=1494486view=diff
==
--- wicket/common/site/apidocs/1.5/index.html (original)
+++ wicket/common/site/apidocs/1.5/index.html Wed Jun 19 07:48:08 2013
@@ -13,6 +13,42 @@ Wicket Parent 1.5-SNAPSHOT API
 targetPage = targetPage.substring(1);
 if (targetPage.indexOf(:) != -1)
 targetPage = undefined;
+if (targetPage !=   !validURL(targetPage))
+targetPage = undefined;
+function validURL(url) {
+var pos = url.indexOf(.html);
+if (pos == -1 || pos != url.length - 5)
+return false;
+var allowNumber = false;
+var allowSep = false;
+var seenDot = false;
+for (var i = 0; i  url.length - 5; i++) {
+var ch = url.charAt(i);
+if ('a' = ch  ch = 'z' ||
+'A' = ch  ch = 'Z' ||
+ch == '$' ||
+ch == '_') {
+allowNumber = true;
+allowSep = true;
+} else if ('0' = ch  ch = '9'
+|| ch == '-') {
+if (!allowNumber)
+ return false;
+} else if (ch == '/' || ch == '.') {
+if (!allowSep)
+return false;
+allowNumber = false;
+allowSep = false;
+if (ch == '.')
+ seenDot = true;
+if (ch == '/'  seenDot)
+ return false;
+} else {
+return false;
+}
+}
+return true;
+}
 function loadFrames() {
 if (targetPage !=   targetPage != undefined)
  top.classFrame.location = top.targetPage;




svn commit: r1494487 - /wicket/common/site/apidocs/1.4/index.html

2013-06-19 Thread mgrigorov
Author: mgrigorov
Date: Wed Jun 19 07:48:49 2013
New Revision: 1494487

URL: http://svn.apache.org/r1494487
Log:
Fix javadocs agains frame injection (http://www.kb.cert.org/vuls/id/225657)


Modified:
wicket/common/site/apidocs/1.4/index.html

Modified: wicket/common/site/apidocs/1.4/index.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/apidocs/1.4/index.html?rev=1494487r1=1494486r2=1494487view=diff
==
--- wicket/common/site/apidocs/1.4/index.html (original)
+++ wicket/common/site/apidocs/1.4/index.html Wed Jun 19 07:48:49 2013
@@ -13,6 +13,42 @@ Wicket Parent 1.4.18 API
 targetPage = targetPage.substring(1);
 if (targetPage.indexOf(:) != -1)
 targetPage = undefined;
+if (targetPage !=   !validURL(targetPage))
+targetPage = undefined;
+function validURL(url) {
+var pos = url.indexOf(.html);
+if (pos == -1 || pos != url.length - 5)
+return false;
+var allowNumber = false;
+var allowSep = false;
+var seenDot = false;
+for (var i = 0; i  url.length - 5; i++) {
+var ch = url.charAt(i);
+if ('a' = ch  ch = 'z' ||
+'A' = ch  ch = 'Z' ||
+ch == '$' ||
+ch == '_') {
+allowNumber = true;
+allowSep = true;
+} else if ('0' = ch  ch = '9'
+|| ch == '-') {
+if (!allowNumber)
+ return false;
+} else if (ch == '/' || ch == '.') {
+if (!allowSep)
+return false;
+allowNumber = false;
+allowSep = false;
+if (ch == '.')
+ seenDot = true;
+if (ch == '/'  seenDot)
+ return false;
+} else {
+return false;
+}
+}
+return true;
+}
 function loadFrames() {
 if (targetPage !=   targetPage != undefined)
  top.classFrame.location = top.targetPage;




svn commit: r1494488 - /wicket/common/site/apidocs/1.3/index.html

2013-06-19 Thread mgrigorov
Author: mgrigorov
Date: Wed Jun 19 07:49:02 2013
New Revision: 1494488

URL: http://svn.apache.org/r1494488
Log:
Fix javadocs agains frame injection (http://www.kb.cert.org/vuls/id/225657)


Modified:
wicket/common/site/apidocs/1.3/index.html

Modified: wicket/common/site/apidocs/1.3/index.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/apidocs/1.3/index.html?rev=1494488r1=1494487r2=1494488view=diff
==
--- wicket/common/site/apidocs/1.3/index.html (original)
+++ wicket/common/site/apidocs/1.3/index.html Wed Jun 19 07:49:02 2013
@@ -13,6 +13,42 @@ Wicket Parent 1.3.7 API
 targetPage = targetPage.substring(1);
 if (targetPage.indexOf(:) != -1)
 targetPage = undefined;
+if (targetPage !=   !validURL(targetPage))
+targetPage = undefined;
+function validURL(url) {
+var pos = url.indexOf(.html);
+if (pos == -1 || pos != url.length - 5)
+return false;
+var allowNumber = false;
+var allowSep = false;
+var seenDot = false;
+for (var i = 0; i  url.length - 5; i++) {
+var ch = url.charAt(i);
+if ('a' = ch  ch = 'z' ||
+'A' = ch  ch = 'Z' ||
+ch == '$' ||
+ch == '_') {
+allowNumber = true;
+allowSep = true;
+} else if ('0' = ch  ch = '9'
+|| ch == '-') {
+if (!allowNumber)
+ return false;
+} else if (ch == '/' || ch == '.') {
+if (!allowSep)
+return false;
+allowNumber = false;
+allowSep = false;
+if (ch == '.')
+ seenDot = true;
+if (ch == '/'  seenDot)
+ return false;
+} else {
+return false;
+}
+}
+return true;
+}
 function loadFrames() {
 if (targetPage !=   targetPage != undefined)
  top.classFrame.location = top.targetPage;




[2/2] git commit: WICKET-5240 Add ModificationWatcher implementation that uses NIO2 file system polling

2013-06-19 Thread mgrigorov
WICKET-5240 Add ModificationWatcher implementation that uses NIO2 file system 
polling


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

Branch: refs/heads/master
Commit: 5ce35bdac7b0ee06f3f52a3eb7c46967646d781e
Parents: 7bca70e
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 10:07:12 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 10:07:12 2013 +0200

--
 .../util/watch/Nio2ModificationWatcher.java | 201 +++
 1 file changed, 201 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/5ce35bda/wicket-core/src/main/java/org/apache/wicket/core/util/watch/Nio2ModificationWatcher.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/watch/Nio2ModificationWatcher.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/watch/Nio2ModificationWatcher.java
new file mode 100644
index 000..ab1f099
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/watch/Nio2ModificationWatcher.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.core.util.watch;
+
+import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.List;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.ThreadContext;
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.util.io.IOUtils;
+import org.apache.wicket.util.string.Strings;
+import org.apache.wicket.util.thread.ICode;
+import org.apache.wicket.util.thread.Task;
+import org.apache.wicket.util.time.Duration;
+import org.apache.wicket.util.watch.ModificationWatcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * An extension of ModificationWatcher that removes the NotFound entries from
+ * the MarkupCache for newly created files.
+ *
+ * By default MarkupCache registers Markup.NO_MARKUP value for each requested 
but
+ * not found markup file. Later when the user creates the markup file the 
MarkupCache
+ * should be notified.
+ *
+ * @since 7.0.0
+ */
+public class Nio2ModificationWatcher extends ModificationWatcher
+{
+   private static final Logger LOG = 
LoggerFactory.getLogger(Nio2ModificationWatcher.class);
+
+   private final WatchService watchService;
+   private final Application application;
+
+   /** the codeTask/code to run */
+   private Task task;
+
+   public Nio2ModificationWatcher(final Application application)
+   {
+   try
+   {
+   this.application = application;
+
+   this.watchService = 
FileSystems.getDefault().newWatchService();
+   registerWatchables(watchService);
+
+   start(Duration.seconds(2));
+
+   } catch (IOException iox)
+   {
+   throw new WicketRuntimeException(Cannot get the watch 
service, iox);
+   }
+   }
+
+   @Override
+   public void start(final Duration pollFrequency)
+   {
+   // Construct task with the given polling frequency
+   task = new Task(Wicket-ModificationWatcher-NIO2);
+
+   task.run(pollFrequency, new ICode() {
+   @Override
+   public void run(final Logger log)
+   {
+   

[jira] [Created] (WICKET-5240) Add ModificationWatcher implementation that uses NIO2 file system polling

2013-06-19 Thread Martin Grigorov (JIRA)
Martin Grigorov created WICKET-5240:
---

 Summary: Add ModificationWatcher implementation that uses NIO2 
file system polling
 Key: WICKET-5240
 URL: https://issues.apache.org/jira/browse/WICKET-5240
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov


At the moment if a resources is missing on the file system ModificationWatcher 
will register Markup.NO_MARKUP for it and if this resource is added later 
Wicket will claim that it is not there until the markup cache is reset manually.

JDK7 NIO2 provides APIs to poll the file system for changed/new files and 
react. This way the above scenario can be solved.

--
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


[1/2] git commit: Remove unused logger

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master 8681cc902 - 5ce35bdac


Remove unused logger


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

Branch: refs/heads/master
Commit: 7bca70e4fb9d1affcb3706085652ccece57cb939
Parents: 8681cc9
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 08:52:27 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 08:52:27 2013 +0200

--
 .../wicket/markup/html/form/AbstractSingleSelectChoice.java   | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7bca70e4/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
index 8518ec5..8ab23a5 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.java
@@ -22,8 +22,6 @@ import org.apache.wicket.Localizer;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.util.string.AppendingStringBuffer;
 import org.apache.wicket.util.string.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -39,7 +37,6 @@ import org.slf4j.LoggerFactory;
 public abstract class AbstractSingleSelectChoiceT extends AbstractChoiceT, 
T
 {
private static final long serialVersionUID = 1L;
-   private static final Logger logger = 
LoggerFactory.getLogger(AbstractSingleSelectChoice.class);
 
/** String to display when the selected value is null and nullValid is 
false. */
private static final String CHOOSE_ONE = Choose One;



[jira] [Resolved] (WICKET-5240) Add ModificationWatcher implementation that uses NIO2 file system polling

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5240.
-

   Resolution: Fixed
Fix Version/s: 7.0.0

Copied the watcher from wicketstuff-wicket7 project.

 Add ModificationWatcher implementation that uses NIO2 file system polling
 -

 Key: WICKET-5240
 URL: https://issues.apache.org/jira/browse/WICKET-5240
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
 Fix For: 7.0.0


 At the moment if a resources is missing on the file system 
 ModificationWatcher will register Markup.NO_MARKUP for it and if this 
 resource is added later Wicket will claim that it is not there until the 
 markup cache is reset manually.
 JDK7 NIO2 provides APIs to poll the file system for changed/new files and 
 react. This way the above scenario can be solved.

--
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-5201 Remove deprecated classes/methods/fields

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master 5ce35bdac - 3441330f4


WICKET-5201 Remove deprecated classes/methods/fields

Replace deprecated junit.framework with org.junit


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

Branch: refs/heads/master
Commit: 3441330f4683de8dbee23c1784731565eaf8ec6e
Parents: 5ce35bd
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 10:26:05 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 10:26:05 2013 +0200

--
 .../main/java/org/apache/wicket/util/tester/DiffUtil.java| 2 +-
 .../main/java/org/apache/wicket/util/tester/FormTester.java  | 2 +-
 .../java/org/apache/wicket/util/tester/WicketTester.java | 8 
 .../org/apache/wicket/util/tester/WicketTesterHelper.java| 2 +-
 .../test/java/org/apache/wicket/ApplicationSettingsTest.java | 2 +-
 .../org/apache/wicket/AttributeModifierComponentTest.java| 2 +-
 .../test/java/org/apache/wicket/FeedbackMessagesTest.java| 2 +-
 wicket-core/src/test/java/org/apache/wicket/VisitorTest.java | 2 +-
 .../src/test/java/org/apache/wicket/WicketJUnitRunner.java   | 6 +++---
 .../java/org/apache/wicket/ajax/AjaxBehaviorEnabledPage.java | 2 +-
 .../test/java/org/apache/wicket/markup/MarkupParserTest.java | 2 +-
 .../org/apache/wicket/markup/html/ComponentMarkupIdTest.java | 2 +-
 .../apache/wicket/markup/html/form/FormComponentTest.java| 2 +-
 .../org/apache/wicket/markup/html/form/FormHasErrorPage.java | 2 +-
 .../apache/wicket/markup/html/form/submitlink/HomePage.java  | 3 ++-
 .../wicket/markup/html/internal/HeaderResponseTest.java  | 6 ++
 .../markup/html/internal/TraditionalEnclosureAjaxPage.java   | 2 +-
 .../wicket/markup/html/link/submitLink/FormPage2Test.java| 2 +-
 .../wicket/markup/html/link/submitLink/FormPageTest.java | 2 +-
 .../apache/wicket/protocol/http/request/UserAgentTest.java   | 4 ++--
 .../protocol/http/servlet/WicketSessionFilterTest.java   | 8 +++-
 .../org/apache/wicket/redirect/abort/AbortExceptionTest.java | 2 +-
 .../apache/wicket/response/filter/ResponseFilterTest.java| 2 +-
 .../org/apache/wicket/settings/ISecuritySettingsTest.java| 2 +-
 .../test/java/org/apache/wicket/util/tester/CookiePage.java  | 2 +-
 .../apache/wicket/examples/base/markdown/MarkdownTest.java   | 3 +--
 .../markup/html/repeater/tree/table/NodeModelTest.java   | 2 +-
 .../wicket/util/license/AbstractLicenseHeaderHandler.java| 2 +-
 .../apache/wicket/util/license/CssLicenseHeaderHandler.java  | 2 +-
 .../apache/wicket/util/license/JavaLicenseHeaderHandler.java | 2 +-
 .../wicket/util/license/PropertiesLicenseHeaderHandler.java  | 2 +-
 .../wicket/util/license/VelocityLicenseHeaderHandler.java| 2 +-
 .../apache/wicket/util/license/XmlLicenseHeaderHandler.java  | 2 +-
 .../apache/wicket/util/license/XmlPrologHeaderHandler.java   | 2 +-
 34 files changed, 44 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3441330f/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java
index 571290e..e29e81a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
 import java.io.PrintWriter;
 import java.net.URL;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 import org.apache.wicket.markup.MarkupParser;
 import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.util.diff.Diff;

http://git-wip-us.apache.org/repos/asf/wicket/blob/3441330f/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java
index ab3bf72..180eaaa 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.WicketRuntimeException;


[2/4] git commit: Added the old methods test 'absolute*'

2013-06-19 Thread mgrigorov
Added the old methods test 'absolute*'

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

Branch: refs/heads/master
Commit: 7d63a7a9ae21eba42a81f2d7b313c4e147a33c4a
Parents: 80d8f91
Author: bitstorm an.delb...@gmail.com
Authored: Tue May 28 18:05:25 2013 +0200
Committer: bitstorm an.delb...@gmail.com
Committed: Tue May 28 18:05:25 2013 +0200

--
 .../java/org/apache/wicket/request/UrlTest.java | 57 
 1 file changed, 57 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7d63a7a9/wicket-request/src/test/java/org/apache/wicket/request/UrlTest.java
--
diff --git 
a/wicket-request/src/test/java/org/apache/wicket/request/UrlTest.java 
b/wicket-request/src/test/java/org/apache/wicket/request/UrlTest.java
index 44b3814..17082d3 100644
--- a/wicket-request/src/test/java/org/apache/wicket/request/UrlTest.java
+++ b/wicket-request/src/test/java/org/apache/wicket/request/UrlTest.java
@@ -325,6 +325,63 @@ public class UrlTest extends Assert
assertEquals(url.toString(StringMode.LOCAL), url.toString());
}
 
+
+   /**
+* 
+*/
+   @Test
+   public void absolute1()
+   {
+   Url url = Url.parse(abc/efg);
+   assertFalse(url.isFull());
+   assertFalse(url.isContextAbsolute());
+   }
+
+   /**
+* 
+*/
+   @Test
+   public void absolute2()
+   {
+   Url url = Url.parse();
+   assertFalse(url.isFull());
+   assertFalse(url.isContextAbsolute());
+   }
+
+   /**
+* 
+*/
+   @Test
+   public void absolute3()
+   {
+   Url url = Url.parse(/);
+   assertFalse(url.isFull());
+   assertTrue(url.isContextAbsolute());
+   }
+
+   /**
+* 
+*/
+   @Test
+   public void absolute4()
+   {
+   Url url = Url.parse(/abc/efg);
+   assertFalse(url.isFull());
+   assertTrue(url.isContextAbsolute());
+   }
+
+   /**
+* 
+*/
+   @Test
+   public void absolute5()
+   {
+   Url url = Url.parse(http://www.domain.com;);
+   assertTrue(url.isFull());
+   assertFalse(url.isContextAbsolute());
+   }
+
+
/**
 * 
 */



[3/4] git commit: Merge branch 'master' of https://github.com/bitstorm/wicket into del-bene-url-absolute

2013-06-19 Thread mgrigorov
Merge branch 'master' of https://github.com/bitstorm/wicket into 
del-bene-url-absolute


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

Branch: refs/heads/master
Commit: 4a8107f08597af514b1e00a4c82d02e076d1f7c7
Parents: 3441330 7d63a7a
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 10:33:33 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 10:33:33 2013 +0200

--
 .../request/resource/UrlResourceReference.java  | 36 -
 .../wicket/util/tester/BaseWicketTester.java| 84 +++-
 .../java/org/apache/wicket/request/Url.java | 14 +---
 .../org/apache/wicket/request/UrlRenderer.java  | 10 +--
 .../java/org/apache/wicket/request/UrlTest.java | 65 ---
 5 files changed, 104 insertions(+), 105 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/4a8107f0/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
--



[1/4] git commit: Removed deprecated Url.isAbsolute

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master 3441330f4 - 61a2c3b79


Removed deprecated Url.isAbsolute

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

Branch: refs/heads/master
Commit: 80d8f91e7716d78d82effe6f751e5bc7ab15b9fa
Parents: a76d3b9
Author: bitstorm an.delb...@gmail.com
Authored: Tue May 28 16:27:46 2013 +0200
Committer: bitstorm an.delb...@gmail.com
Committed: Tue May 28 16:27:46 2013 +0200

--
 .../request/resource/UrlResourceReference.java  |  36 ---
 .../wicket/util/tester/BaseWicketTester.java|  84 ---
 .../java/org/apache/wicket/request/Url.java |  14 +--
 .../org/apache/wicket/request/UrlRenderer.java  |  10 +-
 .../java/org/apache/wicket/request/UrlTest.java | 102 +--
 5 files changed, 94 insertions(+), 152 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/80d8f91e/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
index 8cf7586..726c5ee 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
@@ -23,17 +23,16 @@ import org.apache.wicket.request.cycle.RequestCycle;
 import org.apache.wicket.util.lang.Args;
 
 /**
- * A ResourceReference that can be used to point to a resource by using an Url.
- * For example to a resource residing in a CDN (Content Delivering Network) or
- * context relative one.
- *
+ * A ResourceReference that can be used to point to a resource by using an 
Url. For example to a
+ * resource residing in a CDN (Content Delivering Network) or context relative 
one.
+ * 
  * @since 6.0
  */
 public class UrlResourceReference extends ResourceReference
 {
/**
-* An Url that knows how to render itself, so it doesn't need 
re-calculating in UrlRenderer.
-* It should be rendered as is.
+* An Url that knows how to render itself, so it doesn't need 
re-calculating in UrlRenderer. It
+* should be rendered as is.
 */
private static class CalculatedUrl extends Url implements IUrlRenderer
{
@@ -65,9 +64,9 @@ public class UrlResourceReference extends ResourceReference
 
/**
 * Constructor.
-*
+* 
 * @param url
-*  the url of the external resource
+*the url of the external resource
 */
public UrlResourceReference(final Url url)
{
@@ -91,7 +90,8 @@ public class UrlResourceReference extends ResourceReference
 
if (contextRelative)
{
-   String contextRelative = 
UrlUtils.rewriteToContextRelative(url.toString(), RequestCycle.get());
+   String contextRelative = 
UrlUtils.rewriteToContextRelative(url.toString(),
+   RequestCycle.get());
_url = new CalculatedUrl(Url.parse(contextRelative, 
url.getCharset()));
}
else
@@ -103,9 +103,9 @@ public class UrlResourceReference extends ResourceReference
}
 
/**
-* @return {@code null} because this ResourceReference wont use an 
IResource to deliver
-*  the content of the external resource. The browser will make a 
direct request to the
-*  external url.
+* @return {@code null} because this ResourceReference wont use an 
IResource to deliver the
+* content of the external resource. The browser will make a 
direct request to the
+* external url.
 */
@Override
public final IResource getResource()
@@ -115,10 +115,10 @@ public class UrlResourceReference extends 
ResourceReference
 
public UrlResourceReference setContextRelative(final boolean 
contextRelative)
{
-   if (contextRelative  url.isAbsolute())
+   if (contextRelative  (url.isFull() || 
url.isContextAbsolute()))
{
-   throw new IllegalStateException(
-   String.format(An absolute url '%s' 
cannot be rendered as context relative, url));
+   throw new IllegalStateException(String.format(
+   An absolute url '%s' cannot be rendered as 
context relative, url));
}

[4/4] git commit: Minor formatting

2013-06-19 Thread mgrigorov
Minor formatting


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

Branch: refs/heads/master
Commit: 61a2c3b79cfa244f9b8e3ce319bb71dd373d4fba
Parents: 4a8107f
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 10:42:03 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 10:42:03 2013 +0200

--
 .../apache/wicket/request/resource/UrlResourceReference.java | 2 +-
 .../java/org/apache/wicket/util/tester/BaseWicketTester.java | 8 +++-
 2 files changed, 4 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/61a2c3b7/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
index 726c5ee..20cb74c 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/UrlResourceReference.java
@@ -103,7 +103,7 @@ public class UrlResourceReference extends ResourceReference
}
 
/**
-* @return {@code null} because this ResourceReference wont use an 
IResource to deliver the
+* @return {@code null} because this ResourceReference won't use an 
IResource to deliver the
 * content of the external resource. The browser will make a 
direct request to the
 * external url.
 */

http://git-wip-us.apache.org/repos/asf/wicket/blob/61a2c3b7/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index 0775a72..8880e29 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -376,8 +376,7 @@ public class BaseWicketTester
// Preserve response cookies in redirects
// XXX: is this really needed ? Browsers wont do that, but some
// Wicket tests assert that a cookie is in the response,
-   // even after redirects (see
-// org.apache.wicket.util.cookies.SetCookieAndRedirectTest.statefulPage())
+   // even after redirects (see 
org.apache.wicket.util.cookies.SetCookieAndRedirectTest.statefulPage())
// They should assert that the cookie is in the next *request*
if (lastResponse != null)
{
@@ -387,7 +386,7 @@ public class BaseWicketTester
CookieCollection responseCookies = new 
CookieCollection();
 
// if the last request is a redirect, all 
cookies from last response should appear
-// in current reponse
+   // in current reponse
// this call will filter duplicates
responseCookies.addAll(lastResponseCookies);
for (Cookie cookie : 
responseCookies.allAsList())
@@ -396,8 +395,7 @@ public class BaseWicketTester
}
 
// copy all request cookies from last request 
to the new request because of redirect
-// handling
-   // this way, the cookie will be send to the 
next requested page
+   // handling this way, the cookie will be send 
to the next requested page
if (lastRequest != null)
{
CookieCollection requestCookies = new 
CookieCollection();



[jira] [Updated] (WICKET-5236) FencedFeedbackPanel doesn't work in a nested multipart form (with ajax file upload)

2013-06-19 Thread Oddgeir Bell (JIRA)

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

Oddgeir Bell updated WICKET-5236:
-

Attachment: FencedFeedbackQuickstart.zip

Quickstart showing the issue.
Just try to upload any file. FileTooLarge-error is displayed in the outer 
feedback, while the other error is displayed in the inner feedback...

 FencedFeedbackPanel doesn't work in a nested multipart form (with ajax file 
 upload)
 ---

 Key: WICKET-5236
 URL: https://issues.apache.org/jira/browse/WICKET-5236
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.7.0
 Environment: Windows 7, JBoss 7.1
Reporter: Oddgeir Bell
Priority: Minor
  Labels: FencedFeedbackPanel, multipart
 Attachments: FencedFeedbackQuickstart.zip


 If you nest a Form with file upload in another form, and use a 
 FencedFeedbackPanel to isolate errors from file upload, the error won't show 
 in the panel. This seems to be because the component giving the error is 
 actually the outer form (which is the form actually handling the file upload, 
 I guess).
 I handled this in our app by using a regular FeedbackPanel in the nested 
 form, with a filter that had to lookup the localized messages for file upload 
 errors and compare those against the message. Really clunky and rather silly 
 workaround... :-)
 A better solution would be very welcome... :-)

--
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] [Resolved] (WICKET-5236) FencedFeedbackPanel doesn't work in a nested multipart form (with ajax file upload)

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5236.
-

Resolution: Duplicate

 FencedFeedbackPanel doesn't work in a nested multipart form (with ajax file 
 upload)
 ---

 Key: WICKET-5236
 URL: https://issues.apache.org/jira/browse/WICKET-5236
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.7.0
 Environment: Windows 7, JBoss 7.1
Reporter: Oddgeir Bell
Priority: Minor
  Labels: FencedFeedbackPanel, multipart
 Attachments: FencedFeedbackQuickstart.zip


 If you nest a Form with file upload in another form, and use a 
 FencedFeedbackPanel to isolate errors from file upload, the error won't show 
 in the panel. This seems to be because the component giving the error is 
 actually the outer form (which is the form actually handling the file upload, 
 I guess).
 I handled this in our app by using a regular FeedbackPanel in the nested 
 form, with a filter that had to lookup the localized messages for file upload 
 errors and compare those against the message. Really clunky and rather silly 
 workaround... :-)
 A better solution would be very welcome... :-)

--
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-5236) FencedFeedbackPanel doesn't work in a nested multipart form (with ajax file upload)

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5236:
-

This is not problem of FencedFeedbackPanel.
It is a problem with Servlet API - the file uploads are read from 
ServletInputStream as a whole, i.e. there is no way to find out which 
FileUpload component brings the huge data. So the error is reported by the most 
outer form.
There is another ticket about this. I'll link it to this one and close this 
ticket as duplicate.

 FencedFeedbackPanel doesn't work in a nested multipart form (with ajax file 
 upload)
 ---

 Key: WICKET-5236
 URL: https://issues.apache.org/jira/browse/WICKET-5236
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.7.0
 Environment: Windows 7, JBoss 7.1
Reporter: Oddgeir Bell
Priority: Minor
  Labels: FencedFeedbackPanel, multipart
 Attachments: FencedFeedbackQuickstart.zip


 If you nest a Form with file upload in another form, and use a 
 FencedFeedbackPanel to isolate errors from file upload, the error won't show 
 in the panel. This seems to be because the component giving the error is 
 actually the outer form (which is the form actually handling the file upload, 
 I guess).
 I handled this in our app by using a regular FeedbackPanel in the nested 
 form, with a filter that had to lookup the localized messages for file upload 
 errors and compare those against the message. Really clunky and rather silly 
 workaround... :-)
 A better solution would be very welcome... :-)

--
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-5201) Remove deprecated classes/methods/fields

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5201:
-

Thanks, Andrea!
I've merged it.

 Remove deprecated classes/methods/fields
 

 Key: WICKET-5201
 URL: https://issues.apache.org/jira/browse/WICKET-5201
 Project: Wicket
  Issue Type: Task
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
 Fix For: 7.0.0


 Remove all deprecated in 6.x methods and fields.

--
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-5237 Wicket generates invalid HTML by expanding col tags

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master 61a2c3b79 - b61fe92cb


WICKET-5237 Wicket generates invalid HTML by expanding col tags


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

Branch: refs/heads/master
Commit: b61fe92cbc0b8a508b1d558d940b23d29e8fc878
Parents: 61a2c3b
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 11:26:11 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 11:26:11 2013 +0200

--
 .../parser/filter/OpenCloseTagExpander.java |  9 +--
 .../parser/filter/OpenCloseTagExpanderTest.java | 62 
 2 files changed, 67 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b61fe92c/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
index f737c74..9e3abf8 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
@@ -37,6 +37,10 @@ import org.apache.wicket.markup.parser.XmlTag.TagType;
  */
 public class OpenCloseTagExpander extends AbstractMarkupFilter
 {
+   // A list of elements which should not be expanded from 
TagType.OPEN_CLOSE to TagType.OPEN + TagType.CLOSE
+   // http://www.w3.org/TR/html-markup/syntax.html#void-element
+   // area, base, br, col, command, embed, hr, img, input, keygen, link, 
meta, param, source, track, wbr
+
private static final ListString replaceForTags = Arrays.asList(a, 
q, sub, sup,
abbr, acronym, cite, code, del, dfn, em, ins, 
kbd, samp, var,
label, textarea, tr, td, th, caption, thead, 
tbody, tfoot, dl, dt,
@@ -52,12 +56,9 @@ public class OpenCloseTagExpander extends 
AbstractMarkupFilter
b,
e,
select,
-   col,
 
-   // New HTML5 elements (excluding: open-close tags:
-   // wbr, source, time, embed, keygen
// @TODO by now an exclude list is probably shorter
-   article, aside, command, details, summary, figure, 
figcaption, footer,
+   article, aside, details, summary, figure, 
figcaption, footer,
header, hgroup, mark, meter, nav, progress, ruby, 
rt, rp, section,
audio, video, canvas, datalist, output);
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/b61fe92c/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
index 0f4c478..fe8d9a0 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
@@ -16,7 +16,15 @@
  */
 package org.apache.wicket.markup.parser.filter;
 
+import java.text.ParseException;
+
 import org.apache.wicket.WicketTestCase;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupElement;
+import org.apache.wicket.markup.WicketTag;
+import org.apache.wicket.markup.parser.AbstractMarkupFilter;
+import org.apache.wicket.markup.parser.IMarkupFilter;
+import org.apache.wicket.markup.parser.XmlTag;
 import org.junit.Test;
 
 /**
@@ -33,4 +41,58 @@ public class OpenCloseTagExpanderTest extends WicketTestCase
executeTest(OpenCloseTagExpanderPage_1.class,
OpenCloseTagExpanderPageExpectedResult_1.html);
}
+
+   /**
+* https://issues.apache.org/jira/browse/WICKET-5237
+* @throws ParseException
+*/
+   @Test
+   public void expand() throws ParseException
+   {
+   String[] htmlVoidElements = new String[] {
+   area, base, br, col, command, embed, hr, 
img, input,
+   keygen, link, meta, param, source, track, 
wbr
+   };
+
+   for (String htmlVoidElement : htmlVoidElements)
+   {
+
+   OpenCloseTagExpander expander = new 
OpenCloseTagExpander() {
+  

git commit: WICKET-5237 Wicket generates invalid HTML by expanding col tags

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-6.x 3687dba21 - f1a0dc860


WICKET-5237 Wicket generates invalid HTML by expanding col tags


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

Branch: refs/heads/wicket-6.x
Commit: f1a0dc8604219065350815dcbfa4b5ebac4befc6
Parents: 3687dba
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 11:26:11 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 11:26:34 2013 +0200

--
 .../parser/filter/OpenCloseTagExpander.java |  9 +--
 .../parser/filter/OpenCloseTagExpanderTest.java | 62 
 2 files changed, 67 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f1a0dc86/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
index f737c74..9e3abf8 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
@@ -37,6 +37,10 @@ import org.apache.wicket.markup.parser.XmlTag.TagType;
  */
 public class OpenCloseTagExpander extends AbstractMarkupFilter
 {
+   // A list of elements which should not be expanded from 
TagType.OPEN_CLOSE to TagType.OPEN + TagType.CLOSE
+   // http://www.w3.org/TR/html-markup/syntax.html#void-element
+   // area, base, br, col, command, embed, hr, img, input, keygen, link, 
meta, param, source, track, wbr
+
private static final ListString replaceForTags = Arrays.asList(a, 
q, sub, sup,
abbr, acronym, cite, code, del, dfn, em, ins, 
kbd, samp, var,
label, textarea, tr, td, th, caption, thead, 
tbody, tfoot, dl, dt,
@@ -52,12 +56,9 @@ public class OpenCloseTagExpander extends 
AbstractMarkupFilter
b,
e,
select,
-   col,
 
-   // New HTML5 elements (excluding: open-close tags:
-   // wbr, source, time, embed, keygen
// @TODO by now an exclude list is probably shorter
-   article, aside, command, details, summary, figure, 
figcaption, footer,
+   article, aside, details, summary, figure, 
figcaption, footer,
header, hgroup, mark, meter, nav, progress, ruby, 
rt, rp, section,
audio, video, canvas, datalist, output);
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/f1a0dc86/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
index 0f4c478..fe8d9a0 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpanderTest.java
@@ -16,7 +16,15 @@
  */
 package org.apache.wicket.markup.parser.filter;
 
+import java.text.ParseException;
+
 import org.apache.wicket.WicketTestCase;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupElement;
+import org.apache.wicket.markup.WicketTag;
+import org.apache.wicket.markup.parser.AbstractMarkupFilter;
+import org.apache.wicket.markup.parser.IMarkupFilter;
+import org.apache.wicket.markup.parser.XmlTag;
 import org.junit.Test;
 
 /**
@@ -33,4 +41,58 @@ public class OpenCloseTagExpanderTest extends WicketTestCase
executeTest(OpenCloseTagExpanderPage_1.class,
OpenCloseTagExpanderPageExpectedResult_1.html);
}
+
+   /**
+* https://issues.apache.org/jira/browse/WICKET-5237
+* @throws ParseException
+*/
+   @Test
+   public void expand() throws ParseException
+   {
+   String[] htmlVoidElements = new String[] {
+   area, base, br, col, command, embed, hr, 
img, input,
+   keygen, link, meta, param, source, track, 
wbr
+   };
+
+   for (String htmlVoidElement : htmlVoidElements)
+   {
+
+   OpenCloseTagExpander expander = new 
OpenCloseTagExpander() 

[jira] [Resolved] (WICKET-5237) Wicket generates invalid HTML by expanding col tags

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5237.
-

   Resolution: Fixed
Fix Version/s: 7.0.0
   6.9.0
 Assignee: Martin Grigorov

 Wicket generates invalid HTML by expanding col tags
 ---

 Key: WICKET-5237
 URL: https://issues.apache.org/jira/browse/WICKET-5237
 Project: Wicket
  Issue Type: Bug
Affects Versions: 6.8.0
 Environment: Ubuntu 12.10, 3.5.0-32-generic #53-Ubuntu SMP Wed May 29 
 20:23:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 java version 1.7.0_21
 Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
 Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
Reporter: Konrad Mohrfeldt
Assignee: Martin Grigorov
Priority: Minor
  Labels: html
 Fix For: 6.9.0, 7.0.0


 hi,
 I just noticed that wicket expands col tags, even though the (x)html 
 specifications forbids it.
 take this markup as an example:
 table
 colgroup
 col width=20% /
 col width=80% /
 /colgroup
 tbody
 tr
 tdI take a fifth of the available space/td
 tdI take four fifth of the available space/td
 /tr
 /tbody
 /table
 Instead of return this as-is, it get's converted to:
 table
 colgroup
 col width=20%/col
 col width=80%/col
 /colgroup
 tbody
 tr
 tdI take a fifth of the available space/td
 tdI take four fifth of the available space/td
 /tr
 /tbody
 /table
 But the specifications mention that col tags must not have end tags. This may 
 be related to WICKET-2765, as this seems to be the point when col was added 
 to the OpenCloseTagExpander class. Note that it is ok to have a non closing 
 col tag in html (self-closing in xhtml). It's all about generating a 
 separated end tag.
 This happens in wicket 6.8, but I guess it's relevant to all versions down to 
 wicket 1.4.
 Specs for reference:
 http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#edef-COL
 http://www.w3.org/TR/html-markup/col.html
 Kind regards,
 Konrad

--
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 Websites based on Wicket

2013-06-19 Thread confluence







Websites based on Wicket
Page edited by Ian Marshall


Comment:
Added MarketTree.co.uk to the list of public sites


 Changes (1)
 




...
* *Loved.by* \- [a simple way to get rewarded for your recommendations|http://loved.by] includes Facebook and Twitter integration * *lyhoo.com.cn* \- [Lyhoo|http://lyhoo.com.cn] A personalized product search, user needs matching and alerting site in Chinese. Migrated from Spring MVC. 
* *MarketTree.co.uk* \- [MarketTree.co.uk|http://MarketTree.co.uk] Trading exchange which uses Wicket throughout. 
* *mauswerks.net* \- [mauswerks.net|http://www.mauswerks.net] US-based ISV/ISP focused on Java application hosting, Brix CMS, and custom transactional solutions. * *me.dium.com* \- [Me.dium.com|http://me.dium.com] Social browsing company bringing a unique experience to the online world. 
...
* *www.songtexte.com* \- [Songtexte.com|http://www.songtexte.com/] A social network for music geeks including lyrics, videos,  Uses Wicket, Spring, Hibernate. * *www.svnsite.com* \- [SVNsite Subversion Hosting|http://www.svnsite.com] \- commercial SVN hosting service built on top of Wicket, JPA and Wicket RAD. 
* *www.srmvision.com* \- [SRMvision ITIL  e-SCM platform|http://www.srmvision.com] \- SRMvision is a whole platform allowing IT departments to manage their activities : assets, cases, services, requests... The application is made using Wicket + JPA + EJBs. 
* *taivallus.fi* \- [Taivallus|http://taivallus.fi] Social networking portal for people interested in travelling. * *www.teachus.dk* \- [TeachUs|http://www.teachus.dk/] Open Source booking system designed for teachers with one-to-one tuition. [Online demo|http://demo.teachus.dk/] (login with leif/leif). [Project website|http://dev.teachus.dk] 
...


Full Content

You can also submit your website to Built with Wicket, along with a screenshot.

(sorted alphabetically by web URL)

Public Sites


	AirBank.cz  A web of a bank and internet banking app.
	Vodafone web  See Vodafone Park
	TipSpot.com
	appgravity.com  appgravity.com Android App search engine.
	www.icecreamwear.com  www.icecreamwear.com Multilingual commercial website developed in Wicket: Personalized Yoga Clothing and Fitness Apparel for Women.
	www.fira.nl  www.fira.nl Sustainability rating system using both wicket and brix.
	pixmeaway.com  PixMeAway.cz Find your travel destination by pictures or get inspired for planning your next vacation
	pohlidame.cz  Pohlidame.cz Monitoring of a state web service called "Insolvenční rejstřík".
	preventivoonline.com  www.preventivoonline.com Italian search engine companies, with small business blog service for each registered company and other services.
	1100ad.com  1100AD Online massive multiplayer strategy game (web site on php, but the game itself on Wicket)
	8vents.com  8vents Message, Photo, File sharing service.
	beTurtle.com  beTurtle 'Green' social networking and information portal.
	Braziland  Braziland Brazilian dance and capoeira shows and classes based in Nice, Côte d'Azur, France.
	cronmaker.com  CronMaker A utility to generate cron expressions.
	datawink.com  datawink an online chart pattern recognition search engine
	dbserver.ics.upjs.sk/davano  Davano Collaborative storytelling and Play-by-post-RPG supporting system. Rewritten from from PHP to Wicket+Spring+Hibernate.
	deect.com  Deect Multilingual dictionary, lexicon, language-learning portal
	Equity Market Data.com  EquityMarketData Financial Data Provider
	evri.com  Evri Real-time news
	ewmix.com  eWmix.com Brazilian e-commerce website.
	exerciselog.eu, trainingslog.dk, træningslog.dk  Exerciselog An exercise log for your monitoring your progress.(different sites branded a bit)
	fabulously40.com  Fabulously40 40 woman's social network. Rails site gone wicket.
	genietown.com  GenieTown GenieTown is building a unique online community of customers and service providers. The site is designed to restore the lost experience of Main Street, where business was conducted in a personal way, the resources were local, and reputation was paramount.
	GreyWay.com  GreyWay.com Digital Signature and Professional Portfolio Management Web Site, based on Apache Wicket 1.4.7 and myBatis 3.01 ORM libraries. Open to General Public.
	homestaybay.com  HomestayBay An online homestay community that connects international ESL students with host families.
	home-account.com  Billed as "The best way to get a mortgage loan".
	insidewood.lib.ncsu.edu  InsideWood InsideWood contains brief descriptions of fossil and modern woody dicots (hardwoods) from more than 200 plant families, and is searchable by an interactive, multiple-entry key. There are over 34,000 images 

[1/2] Remove WicketJUnitRunner and upgrade all tests to JUnit 4

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master b61fe92cb - cd3c7c8c5


http://git-wip-us.apache.org/repos/asf/wicket/blob/cd3c7c8c/wicket-util/src/test/java/org/apache/wicket/util/string/AppendingStringBufferTest.java
--
diff --git 
a/wicket-util/src/test/java/org/apache/wicket/util/string/AppendingStringBufferTest.java
 
b/wicket-util/src/test/java/org/apache/wicket/util/string/AppendingStringBufferTest.java
index 86d03f6..27d883f 100644
--- 
a/wicket-util/src/test/java/org/apache/wicket/util/string/AppendingStringBufferTest.java
+++ 
b/wicket-util/src/test/java/org/apache/wicket/util/string/AppendingStringBufferTest.java
@@ -122,6 +122,7 @@ public class AppendingStringBufferTest extends Assert
assertFalse(asb.endsWith(67890));
}
 
+   @Test
public void testInsert() throws Exception
{
AppendingStringBuffer asb = new 
AppendingStringBuffer(123456789);



git commit: Re-work the JS tests to Promise pipes

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master cd3c7c8c5 - 3254bfc0d


Re-work the JS tests to Promise pipes

It is easier to follow the flow this way


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

Branch: refs/heads/master
Commit: 3254bfc0da5e17b821e383e6bd3c97198fbdb3f6
Parents: cd3c7c8
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 16:03:38 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 16:03:38 2013 +0200

--
 .../src/main/webapp/js-test/tests/ajax/form.js  | 33 ++--
 .../src/main/webapp/js-test/tests/echo.js   | 16 +-
 .../src/main/webapp/js-test/tests/forminput.js  | 32 +--
 .../src/main/webapp/js-test/tests/helloworld.js |  3 +-
 4 files changed, 41 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3254bfc0/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
--
diff --git a/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js 
b/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
index af7b266..eb348b1 100644
--- a/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
+++ b/wicket-examples/src/main/webapp/js-test/tests/ajax/form.js
@@ -30,28 +30,27 @@ $q(document).ready(function() {
var name = 'Ajax form name';
$nameInput.val(name);
 
-   
gym.ajaxClick($('input[name=ajax-button]')).then(function($$) {
+   return gym.ajaxClick($('input[name=ajax-button]'));
+   }).then(function($) {
 
-   // an error feedback message that email is 
mandatory is expected
-   var $feedback = $$('li.feedbackPanelERROR  
span');
-   equal($feedback.length, 1, 'The error feedback 
message that email is missing is here');
-   equal($feedback.text(), 'Email is required', 
'The error feedback matches');
+   // an error feedback message that email is mandatory is 
expected
+   var $feedback = $('li.feedbackPanelERROR  span');
+   equal($feedback.length, 1, 'The error feedback message 
that email is missing is here');
+   equal($feedback.text(), 'Email is required', 'The error 
feedback matches');
 
-   // enter the email field too
-   var $emailInput = $$('input[name=email]');
-   var email = 'cont...@example.com';
-   $emailInput.val(email);
+   // enter the email field too
+   var $emailInput = $('input[name=email]');
+   var email = 'cont...@example.com';
+   $emailInput.val(email);
 
-   
gym.ajaxClick($$('input[name=ajax-button]')).then(function($$$) {
+   return gym.ajaxClick($('input[name=ajax-button]'));
+   }).then(function($) {
 
-   // the feedback panel must be empty now
-   var $feedback = 
$$$('li.feedbackPanelERROR  span');
-   equal($feedback.length, 0, 'The error 
feedback message should be gone');
+   // the feedback panel must be empty now
+   var $feedback = $('li.feedbackPanelERROR  span');
+   equal($feedback.length, 0, 'The error feedback message 
should be gone');
 
-   start();
-   });
-   });
-   });
+   }).always(start);
});
 
 });

http://git-wip-us.apache.org/repos/asf/wicket/blob/3254bfc0/wicket-examples/src/main/webapp/js-test/tests/echo.js
--
diff --git a/wicket-examples/src/main/webapp/js-test/tests/echo.js 
b/wicket-examples/src/main/webapp/js-test/tests/echo.js
index 8635629..2264f55 100644
--- a/wicket-examples/src/main/webapp/js-test/tests/echo.js
+++ b/wicket-examples/src/main/webapp/js-test/tests/echo.js
@@ -23,21 +23,21 @@ $q(document).ready(function() {
asyncTest('echo', function () {
expect(2);
 
+   var message = 'Hello Functional QUnit';
+
gym.load('/echo').then(function($) {
 
var $messageInput = $('input[name=msgInput]');
-   

[jira] [Created] (WICKET-5241) RequestLogger's server duration does not include 'detach duration'

2013-06-19 Thread Chris Gunnink (JIRA)
Chris Gunnink created WICKET-5241:
-

 Summary: RequestLogger's server duration does not include 'detach 
duration'
 Key: WICKET-5241
 URL: https://issues.apache.org/jira/browse/WICKET-5241
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.6.0
Reporter: Chris Gunnink
Priority: Minor


When a certain IModel impl takes a lot of time to detach, this will not be 
included in the 'duration' section. This is very easy to reproduce: use a model 
that sleeps for 10 seconds in the detach(); make sure to write a page which 
will not much time to render, say 100ms. One will see that the RequestLogger 
will output 100ms as duration, instead of 10100ms.

In our production environment, these this server duration is the primary metric 
to show server performance; so right now we're dealing with misleading figures.

I hope this is an easy one to fix ;-)

--
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-4881) IE 8 : error when handling Wicket Ajax Response

2013-06-19 Thread Tobias Haupt (JIRA)

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

Tobias Haupt updated WICKET-4881:
-

Attachment: WICKET-4881-avoid-recursion.patch

Patch added that avoids recursion in most of the default evaluations

 IE 8 : error when handling Wicket Ajax Response
 ---

 Key: WICKET-4881
 URL: https://issues.apache.org/jira/browse/WICKET-4881
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.2.0, 6.3.0
 Environment: Internet Explorer 8, Windows 7 64 bits
Reporter: Frédéric Donckels
Assignee: Martin Grigorov
 Fix For: 6.4.0

 Attachments: WICKET-4881-avoid-recursion.patch, WICKET-4881.patch, 
 wicket_bug_report.7z, wicket_bug_report.zip


 I have a problem with Wicket 6.2.0/6.3.0 and IE (this works perfectly with 
 Chrome or Firefox). I have a list of items, with Ajax links in the list. The 
 response to the Ajax link modifies a panel from the page, and redraws the 
 list (its container).
 IE does at least some of the changes correctly, but outputs an error, and it 
 seems that subsequent Ajax request fail:
(... some UI code ...)
(... Jquery and Wicket ajax references ...)
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=other/bictables/list;
 /*]^]^*/
 /script
 /head]]/header-contributionevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-AMEND,e:click,c:AMENDea});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-RETURN,e:click,c:RETURNec});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-view,e:click,c:viewf2});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-edit,e:click,c:editf3});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-reorder-down,e:click,c:downf4});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-view,e:click,c:viewf5});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-edit,e:click,c:editf6});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-up,e:click,c:upf7});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-down,e:click,c:downf8});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-view,e:click,c:viewf9});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-edit,e:click,c:editfa});]]
(... lots of similar code from the table ...)
 evaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-actions-edit,e:click,c:edit136});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-reorder-up,e:click,c:up137});]]/evaluate/ajax-response
 INFO: returned focused element: 
 http://localhost:8080/payments/app/other/bictables/list?3#
 INFO: returned focused element: null
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: 
 [object Error], text: 
 Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-view,e:click,c:view10d});
 ERROR: FunctionsExecuter.processNext: [object Error]
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating 
 javascript: [object Error], text: 
 Wicket.Ajax.ajax({u:./list?2-4.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-
   view,e:click,c:view2cb});
 ERROR: FunctionsExecuter.processNext: [object Error]
 all subsequent Ajax requests lead to :
 INFO: Channel '0' is busy - scheduling the callback to be executed when the 
 previous request finish
 Is this a bug in Wicket, in IE? Any way to circumvent it if it's in IE?

--
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-5242) Disable escaping of html tag attributes

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5242:
-

Can you point to an official reference that says that ,, and  are allowed 
in attribute values in HTML(5) ?
Thanks!

 Disable escaping of html tag attributes
 ---

 Key: WICKET-5242
 URL: https://issues.apache.org/jira/browse/WICKET-5242
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.7.0
Reporter: Bertrand Guay-Paquet
  Labels: escaping, html, tags

 Currently, all component tag attributes are escaped.With html5 data- 
 attributes, much more values can be considered valid depending on the tag 
 attribute and some should not be escaped.
 For example, bootstrap tooltips use the data-title attribute to set the 
 content of a tooltip. Using Wicket's tag attributes, it's not possible to set 
 the value bhello world/b as the data-title since it is escaped.
 ComponentTag#writeOutput() is the method which calls 
 Strings.escapeMarkup(value); and escapes tag values. This is called by 
 Component#renderComponentTag().
 There should be a way to disable component tag escaping either per-tag or 
 per-component.
 Reference email thread:
 http://apache-wicket.1842946.n4.nabble.com/AttributeModifier-with-html-in-the-attribute-tp4659206.html

--
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] [Comment Edited] (WICKET-4881) IE 8 : error when handling Wicket Ajax Response

2013-06-19 Thread Tobias Haupt (JIRA)

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

Tobias Haupt edited comment on WICKET-4881 at 6/19/13 2:22 PM:
---

I still have heavy performance problems with the deep recursion / deep stack 
problem. In my case I append javascript that does a lot of jquery stuff so that 
it builds a big stack itself. I get the too much recursion message in firefox 
pretty soon or the page freezes.

I understand that recursion is necessary through the notify call if the 
execution of the next step needs to be deferred until something long running 
(like downloading scripts etc.) has happened. Most of the calls of notify do 
not need a deferred execution so I introduced a second callback: notifyContinue 
that will be called whenever it is possible to avoid recursion.

Please see the attached patch and verify if everything is correctly adapted. In 
my case it avoids the Exception and speeds up the evaluation a lot.

  was (Author: tobiashaupt):
I still have heavy performance problems with the deep recursion / deep 
stack problem. In my case I append javascript that does a lot of jquery stuff 
so that it builds a big stack itself. I get the too much recursion message in 
firefox pretty soon or the page freezes.

I understand that recursion is necessary through the notify call if the 
execution of the next step needs to be deferred until something long running 
(like downloading scripts etc.) has happened. Most of the calls of notify do 
not need a deferred execution so I introduced a second callback: notifyContinue 
that will be called whenever it is possible to avoid recursion.

Please see the attached patch and verify if everything is correctly adapted. In 
my case id avoids the Exception and speeds up the evaluation a lot.
  
 IE 8 : error when handling Wicket Ajax Response
 ---

 Key: WICKET-4881
 URL: https://issues.apache.org/jira/browse/WICKET-4881
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.2.0, 6.3.0
 Environment: Internet Explorer 8, Windows 7 64 bits
Reporter: Frédéric Donckels
Assignee: Martin Grigorov
 Fix For: 6.4.0

 Attachments: WICKET-4881-avoid-recursion.patch, WICKET-4881.patch, 
 wicket_bug_report.7z, wicket_bug_report.zip


 I have a problem with Wicket 6.2.0/6.3.0 and IE (this works perfectly with 
 Chrome or Firefox). I have a list of items, with Ajax links in the list. The 
 response to the Ajax link modifies a panel from the page, and redraws the 
 list (its container).
 IE does at least some of the changes correctly, but outputs an error, and it 
 seems that subsequent Ajax request fail:
(... some UI code ...)
(... Jquery and Wicket ajax references ...)
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=other/bictables/list;
 /*]^]^*/
 /script
 /head]]/header-contributionevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-AMEND,e:click,c:AMENDea});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-RETURN,e:click,c:RETURNec});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-view,e:click,c:viewf2});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-edit,e:click,c:editf3});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-reorder-down,e:click,c:downf4});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-view,e:click,c:viewf5});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-edit,e:click,c:editf6});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-up,e:click,c:upf7});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-down,e:click,c:downf8});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-view,e:click,c:viewf9});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-edit,e:click,c:editfa});]]
(... lots of similar code from the table ...)
 

[jira] [Commented] (WICKET-4881) IE 8 : error when handling Wicket Ajax Response

2013-06-19 Thread Tobias Haupt (JIRA)

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

Tobias Haupt commented on WICKET-4881:
--

I still have heavy performance problems with the deep recursion / deep stack 
problem. In my case I append javascript that does a lot of jquery stuff so that 
it builds a big stack itself. I get the too much recursion message in firefox 
pretty soon or the page freezes.

I understand that recursion is necessary through the notify call if the 
execution of the next step needs to be deferred until something long running 
(like downloading scripts etc.) has happened. Most of the calls of notify do 
not need a deferred execution so I introduced a second callback: notifyContinue 
that will be called whenever it is possible to avoid recursion.

Please see the attached patch and verify if everything is correctly adapted. In 
my case id avoids the Exception and speeds up the evaluation a lot.

 IE 8 : error when handling Wicket Ajax Response
 ---

 Key: WICKET-4881
 URL: https://issues.apache.org/jira/browse/WICKET-4881
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.2.0, 6.3.0
 Environment: Internet Explorer 8, Windows 7 64 bits
Reporter: Frédéric Donckels
Assignee: Martin Grigorov
 Fix For: 6.4.0

 Attachments: WICKET-4881-avoid-recursion.patch, WICKET-4881.patch, 
 wicket_bug_report.7z, wicket_bug_report.zip


 I have a problem with Wicket 6.2.0/6.3.0 and IE (this works perfectly with 
 Chrome or Firefox). I have a list of items, with Ajax links in the list. The 
 response to the Ajax link modifies a panel from the page, and redraws the 
 list (its container).
 IE does at least some of the changes correctly, but outputs an error, and it 
 seems that subsequent Ajax request fail:
(... some UI code ...)
(... Jquery and Wicket ajax references ...)
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=other/bictables/list;
 /*]^]^*/
 /script
 /head]]/header-contributionevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-AMEND,e:click,c:AMENDea});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-RETURN,e:click,c:RETURNec});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-view,e:click,c:viewf2});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-edit,e:click,c:editf3});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-reorder-down,e:click,c:downf4});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-view,e:click,c:viewf5});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-edit,e:click,c:editf6});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-up,e:click,c:upf7});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-down,e:click,c:downf8});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-view,e:click,c:viewf9});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-edit,e:click,c:editfa});]]
(... lots of similar code from the table ...)
 evaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-actions-edit,e:click,c:edit136});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-reorder-up,e:click,c:up137});]]/evaluate/ajax-response
 INFO: returned focused element: 
 http://localhost:8080/payments/app/other/bictables/list?3#
 INFO: returned focused element: null
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: 
 [object Error], text: 
 Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-view,e:click,c:view10d});
 ERROR: FunctionsExecuter.processNext: [object Error]
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating 
 javascript: [object Error], text: 
 Wicket.Ajax.ajax({u:./list?2-4.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-
   view,e:click,c:view2cb});
 ERROR: FunctionsExecuter.processNext: [object Error]
 all subsequent Ajax requests lead to :
 INFO: Channel '0' is busy - scheduling the callback to be executed 

[jira] [Commented] (WICKET-4881) IE 8 : error when handling Wicket Ajax Response

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-4881:
-

Please create a new ticket.
Also please add information why you think some calls do not need to wait for 
the previous.
A quickstart app will really help to improve this code faster.
Thanks!

 IE 8 : error when handling Wicket Ajax Response
 ---

 Key: WICKET-4881
 URL: https://issues.apache.org/jira/browse/WICKET-4881
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.2.0, 6.3.0
 Environment: Internet Explorer 8, Windows 7 64 bits
Reporter: Frédéric Donckels
Assignee: Martin Grigorov
 Fix For: 6.4.0

 Attachments: WICKET-4881-avoid-recursion.patch, WICKET-4881.patch, 
 wicket_bug_report.7z, wicket_bug_report.zip


 I have a problem with Wicket 6.2.0/6.3.0 and IE (this works perfectly with 
 Chrome or Firefox). I have a list of items, with Ajax links in the list. The 
 response to the Ajax link modifies a panel from the page, and redraws the 
 list (its container).
 IE does at least some of the changes correctly, but outputs an error, and it 
 seems that subsequent Ajax request fail:
(... some UI code ...)
(... Jquery and Wicket ajax references ...)
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=other/bictables/list;
 /*]^]^*/
 /script
 /head]]/header-contributionevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-AMEND,e:click,c:AMENDea});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-RETURN,e:click,c:RETURNec});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-view,e:click,c:viewf2});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-edit,e:click,c:editf3});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-reorder-down,e:click,c:downf4});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-view,e:click,c:viewf5});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-edit,e:click,c:editf6});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-up,e:click,c:upf7});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-down,e:click,c:downf8});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-view,e:click,c:viewf9});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-edit,e:click,c:editfa});]]
(... lots of similar code from the table ...)
 evaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-actions-edit,e:click,c:edit136});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-reorder-up,e:click,c:up137});]]/evaluate/ajax-response
 INFO: returned focused element: 
 http://localhost:8080/payments/app/other/bictables/list?3#
 INFO: returned focused element: null
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: 
 [object Error], text: 
 Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-view,e:click,c:view10d});
 ERROR: FunctionsExecuter.processNext: [object Error]
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating 
 javascript: [object Error], text: 
 Wicket.Ajax.ajax({u:./list?2-4.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-
   view,e:click,c:view2cb});
 ERROR: FunctionsExecuter.processNext: [object Error]
 all subsequent Ajax requests lead to :
 INFO: Channel '0' is busy - scheduling the callback to be executed when the 
 previous request finish
 Is this a bug in Wicket, in IE? Any way to circumvent it if it's in IE?

--
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-4881) IE 8 : error when handling Wicket Ajax Response

2013-06-19 Thread Tobias Haupt (JIRA)

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

Tobias Haupt commented on WICKET-4881:
--

I understand it like that: all tasks need to wait but some finish instantly / 
synchronously - they don't need the deferred callback to be called at some 
future time. 
So they don't need further recursion and can continue with the next step in a 
simple loop.

I know that there was a quickstart to check the recursion depth and stack size 
allready. This should be sufficient. It's hard to simulate the problem. 

 IE 8 : error when handling Wicket Ajax Response
 ---

 Key: WICKET-4881
 URL: https://issues.apache.org/jira/browse/WICKET-4881
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.2.0, 6.3.0
 Environment: Internet Explorer 8, Windows 7 64 bits
Reporter: Frédéric Donckels
Assignee: Martin Grigorov
 Fix For: 6.4.0

 Attachments: WICKET-4881-avoid-recursion.patch, WICKET-4881.patch, 
 wicket_bug_report.7z, wicket_bug_report.zip


 I have a problem with Wicket 6.2.0/6.3.0 and IE (this works perfectly with 
 Chrome or Firefox). I have a list of items, with Ajax links in the list. The 
 response to the Ajax link modifies a panel from the page, and redraws the 
 list (its container).
 IE does at least some of the changes correctly, but outputs an error, and it 
 seems that subsequent Ajax request fail:
(... some UI code ...)
(... Jquery and Wicket ajax references ...)
 script type=text/javascript id=wicket-ajax-base-url
 /*![CDATA[*/
 Wicket.Ajax.baseUrl=other/bictables/list;
 /*]^]^*/
 /script
 /head]]/header-contributionevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-AMEND,e:click,c:AMENDea});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-interaction-view-toolbar-RETURN,e:click,c:RETURNec});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-view,e:click,c:viewf2});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-actions-edit,e:click,c:editf3});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-0-reorder-down,e:click,c:downf4});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-view,e:click,c:viewf5});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-actions-edit,e:click,c:editf6});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-up,e:click,c:upf7});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-1-reorder-down,e:click,c:downf8});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-view,e:click,c:viewf9});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-2-actions-edit,e:click,c:editfa});]]
(... lots of similar code from the table ...)
 evaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-actions-edit,e:click,c:edit136});]]/evaluateevaluate![CDATA[Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-17-reorder-up,e:click,c:up137});]]/evaluate/ajax-response
 INFO: returned focused element: 
 http://localhost:8080/payments/app/other/bictables/list?3#
 INFO: returned focused element: null
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: 
 [object Error], text: 
 Wicket.Ajax.ajax({u:./list?3-1.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-view,e:click,c:view10d});
 ERROR: FunctionsExecuter.processNext: [object Error]
 ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating 
 javascript: [object Error], text: 
 Wicket.Ajax.ajax({u:./list?2-4.IBehaviorListener.0-entities-entitiesList-bictables-7-actions-
   view,e:click,c:view2cb});
 ERROR: FunctionsExecuter.processNext: [object Error]
 all subsequent Ajax requests lead to :
 INFO: Channel '0' is busy - scheduling the callback to be executed when the 
 previous request finish
 Is this a bug in Wicket, in IE? Any way to circumvent it if it's in IE?

--
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


[2/2] git commit: Add JS tests for Bean Validation example

2013-06-19 Thread mgrigorov
Add JS tests for Bean Validation example


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

Branch: refs/heads/master
Commit: 91ecda6cefccb6ba7cfe15fcd9b2350e52c37323
Parents: fdb31e9
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 17:28:18 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 17:28:18 2013 +0200

--
 .../src/main/webapp/js-test/all.html|  5 ++
 .../js-test/tests/bean-validation/birthdate.js  | 75 ++
 .../js-test/tests/bean-validation/email.js  | 73 +
 .../js-test/tests/bean-validation/name.js   | 82 
 .../js-test/tests/bean-validation/phone.js  | 62 +++
 5 files changed, 297 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/91ecda6c/wicket-examples/src/main/webapp/js-test/all.html
--
diff --git a/wicket-examples/src/main/webapp/js-test/all.html 
b/wicket-examples/src/main/webapp/js-test/all.html
index 5a13582..694723f 100644
--- a/wicket-examples/src/main/webapp/js-test/all.html
+++ b/wicket-examples/src/main/webapp/js-test/all.html
@@ -24,6 +24,11 @@
script type=text/javascript src=tests/ajax/form.js/script
script type=text/javascript src=tests/cdi/injection.js/script
script type=text/javascript src=tests/cdi/conversation.js/script
+
+script type=text/javascript 
src=tests/bean-validation/name.js/script
+script type=text/javascript 
src=tests/bean-validation/email.js/script
+script type=text/javascript 
src=tests/bean-validation/phone.js/script
+script type=text/javascript 
src=tests/bean-validation/birthdate.js/script
 /head
 
 body

http://git-wip-us.apache.org/repos/asf/wicket/blob/91ecda6c/wicket-examples/src/main/webapp/js-test/tests/bean-validation/birthdate.js
--
diff --git 
a/wicket-examples/src/main/webapp/js-test/tests/bean-validation/birthdate.js 
b/wicket-examples/src/main/webapp/js-test/tests/bean-validation/birthdate.js
new file mode 100644
index 000..c442aa6
--- /dev/null
+++ b/wicket-examples/src/main/webapp/js-test/tests/bean-validation/birthdate.js
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+$q(document).ready(function() {
+   use strict;
+
+   var selectors = {
+
+   birthdateInput: input[name=birthdate],
+   birthdateInvalidDateErrorFeedback: li.feedbackPanelERROR  
span:contains(\The value of 'Birthdate' is not a valid Date.\),
+   birthdateNotInPastErrorFeedback: li.feedbackPanelERROR  
span:contains(\'Birthdate' must be in the past\)
+
+   };
+
+   var submit = function($) {
+   return gym.click($('input[value=Submit]'));
+   };
+
+   module('Bean validation');
+
+   asyncTest('birthdate', function () {
+   expect(6);
+
+   gym.load('/bean-validation')
+   .then(function($) {
+
+   // enter non-date birthdate
+   var $input = $(selectors.birthdateInput);
+   $input.val('abc');
+
+   
equal($(selectors.birthdateInvalidDateErrorFeedback).length, 0, 'The feedback 
message for invalid birthdate is NOT there');
+
+   return submit($);
+   }).then(function($) {
+
+   
equal($(selectors.birthdateInvalidDateErrorFeedback).length, 1, 'The feedback 
message for invalid birthdate is there');
+
+   // enter birthdate in the future
+   var $input = $(selectors.birthdateInput);
+   $input.val('3/22/2345');
+
+

[1/2] git commit: Java 7 diamonds

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/master 3254bfc0d - 91ecda6ce


Java 7 diamonds


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

Branch: refs/heads/master
Commit: fdb31e9c07743f99e182e35230ba5ffc7d22862a
Parents: 3254bfc
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jun 19 16:22:50 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jun 19 16:22:50 2013 +0200

--
 .../wicket/bean/validation/DefaultPropertyResolverTest.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fdb31e9c/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/DefaultPropertyResolverTest.java
--
diff --git 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/DefaultPropertyResolverTest.java
 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/DefaultPropertyResolverTest.java
index 3f90170..fe4653f 100644
--- 
a/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/DefaultPropertyResolverTest.java
+++ 
b/wicket-experimental/wicket-bean-validation/src/test/java/org/apache/wicket/bean/validation/DefaultPropertyResolverTest.java
@@ -45,7 +45,7 @@ public class DefaultPropertyResolverTest
{
DefaultPropertyResolver resolver = new 
DefaultPropertyResolver();
 
-   TextField? component = new TextFieldBean1(id, new 
PropertyModelBean1(new Bean1(),
+   TextField? component = new TextField(id, new 
PropertyModelBean1(new Bean1(),
foo));
Property property = resolver.resolveProperty(component);
assertThat(property, not(nullValue()));
@@ -58,7 +58,7 @@ public class DefaultPropertyResolverTest
{
DefaultPropertyResolver resolver = new 
DefaultPropertyResolver();
 
-   TextField? component = new TextFieldBean2(id, new 
PropertyModelBean2(new Bean2(),
+   TextField? component = new TextField(id, new 
PropertyModelBean2(new Bean2(),
foo));
Property property = resolver.resolveProperty(component);
assertThat(property, not(nullValue()));
@@ -76,7 +76,7 @@ public class DefaultPropertyResolverTest
{
DefaultPropertyResolver resolver = new 
DefaultPropertyResolver();
 
-   TextField? component = new TextFieldBean3(id, new 
PropertyModelBean3(new Bean3(),
+   TextField? component = new TextField(id, new 
PropertyModelBean3(new Bean3(),
foo));
Property property = resolver.resolveProperty(component);
assertThat(property, not(nullValue()));



[jira] [Resolved] (WICKET-5201) Remove deprecated classes/methods/fields

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5201.
-

Resolution: Fixed

 Remove deprecated classes/methods/fields
 

 Key: WICKET-5201
 URL: https://issues.apache.org/jira/browse/WICKET-5201
 Project: Wicket
  Issue Type: Task
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
 Fix For: 7.0.0


 Remove all deprecated in 6.x methods and fields.

--
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-5242) Disable escaping of html tag attributes

2013-06-19 Thread Bertrand Guay-Paquet (JIRA)

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

Bertrand Guay-Paquet commented on WICKET-5242:
--

I found this:
http://www.w3.org/html/wg/drafts/html/master/dom.html#attributes

Except where otherwise specified, attributes on HTML elements may have any 
string value, including the empty string. Except where explicitly stated, there 
is no restriction on what text can be specified in such attributes.

Also, a related stack overflow question with more discussion:
http://stackoverflow.com/questions/4699276/can-data-attribute-contain-html-tags

 Disable escaping of html tag attributes
 ---

 Key: WICKET-5242
 URL: https://issues.apache.org/jira/browse/WICKET-5242
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.7.0
Reporter: Bertrand Guay-Paquet
  Labels: escaping, html, tags

 Currently, all component tag attributes are escaped.With html5 data- 
 attributes, much more values can be considered valid depending on the tag 
 attribute and some should not be escaped.
 For example, bootstrap tooltips use the data-title attribute to set the 
 content of a tooltip. Using Wicket's tag attributes, it's not possible to set 
 the value bhello world/b as the data-title since it is escaped.
 ComponentTag#writeOutput() is the method which calls 
 Strings.escapeMarkup(value); and escapes tag values. This is called by 
 Component#renderComponentTag().
 There should be a way to disable component tag escaping either per-tag or 
 per-component.
 Reference email thread:
 http://apache-wicket.1842946.n4.nabble.com/AttributeModifier-with-html-in-the-attribute-tp4659206.html

--
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-5226) CDI integration fails in Glassfish 4.0 with WELD-000070

2013-06-19 Thread Phill Ashworth (JIRA)

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

Phill Ashworth commented on WICKET-5226:


Rebuilt Wicket from wicket-6.x and I'm still getting the same exception:

2013-06-20 07:13:40,729 [http-listener-2(3)] DEBUG 
org.apache.wicket.MarkupContainer - Add logo to [DebugBar [Component id = 
debug]]
2013-06-20 07:13:40,761 [http-listener-2(3)] WARN  RequestCycleExtra - 

2013-06-20 07:13:40,901 [http-listener-2(3)] WARN  RequestCycleExtra - Handling 
the following exception
org.apache.wicket.WicketRuntimeException: Can't instantiate page using 
constructor 'public 
com.mydomain.webapp.HomePage(org.apache.wicket.request.mapper.parameter.PageParameters)'
 and argument ''. An exception has been thrown during construction!
at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:76)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:268)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 ~[wicket-request-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) 
[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
 [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
 [wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
 ~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) 
~[wicket-core-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
 ~[web-core.jar:na]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 ~[web-core.jar:na]
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
 ~[web-core.jar:na]
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
 ~[web-core.jar:na]
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) 
~[web-core.jar:na]
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) 
~[web-core.jar:na]
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) 
~[web-glue.jar:na]
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) 
~[web-core.jar:na]
at 
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) 
~[web-core.jar:na]
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) 
~[web-core.jar:na]
at 
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
 ~[kernel.jar:na]
at 
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) 
~[nucleus-grizzly-all.jar:na]
at 
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) 
~[nucleus-grizzly-all.jar:na]
at 
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
 ~[nucleus-grizzly-all.jar:na]
at 

[jira] [Commented] (WICKET-5226) CDI integration fails in Glassfish 4.0 with WELD-000070

2013-06-19 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5226:
-

I have fixed this the other day by adding a check to not process for injecting 
an anonymous class.
Are you sure that you have the latest 6.x code ?

 CDI integration fails in Glassfish 4.0 with WELD-70
 ---

 Key: WICKET-5226
 URL: https://issues.apache.org/jira/browse/WICKET-5226
 Project: Wicket
  Issue Type: Bug
  Components: wicket-cdi
Affects Versions: 6.8.0
 Environment: Glassfish 4.0
Reporter: Phill Ashworth
Assignee: Martin Grigorov
  Labels: cdi, glassfish, javaee7
 Fix For: 6.9.0, 7.0.0

 Attachments: cditest.zip


 When CDI is configured in the Application and a page has a non-static inner 
 class the page throws exception, regardless of whether there are any injected 
 fields.
 Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-70 Simple 
 bean [EnhancedAnnotatedTypeImpl] private  class com.inversebit.HomePage$AForm 
 cannot be a non-static inner class
   at 
 org.jboss.weld.injection.producer.BasicInjectionTarget.checkType(BasicInjectionTarget.java:81)
   at 
 org.jboss.weld.injection.producer.BasicInjectionTarget.init(BasicInjectionTarget.java:69)
   at 
 org.jboss.weld.injection.producer.BeanInjectionTarget.init(BeanInjectionTarget.java:52)
   at 
 org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:95)
   at 
 org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:78)
   ... 65 more

--
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-5226) CDI integration fails in Glassfish 4.0 with WELD-000070

2013-06-19 Thread Phill Ashworth (JIRA)

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

Phill Ashworth commented on WICKET-5226:


I'm pretty sure it's the latest code unless I'm doing something daft...
This line in the above stack trace suggests I'm using your recently modified 
ComponentInjector.java as line 57 was not present before:
at 
org.apache.wicket.cdi.ComponentInjector.onInstantiation(ComponentInjector.java:57)
 ~[wicket-cdi-6.9.0-SNAPSHOT.jar:6.9.0-SNAPSHOT]

 CDI integration fails in Glassfish 4.0 with WELD-70
 ---

 Key: WICKET-5226
 URL: https://issues.apache.org/jira/browse/WICKET-5226
 Project: Wicket
  Issue Type: Bug
  Components: wicket-cdi
Affects Versions: 6.8.0
 Environment: Glassfish 4.0
Reporter: Phill Ashworth
Assignee: Martin Grigorov
  Labels: cdi, glassfish, javaee7
 Fix For: 6.9.0, 7.0.0

 Attachments: cditest.zip


 When CDI is configured in the Application and a page has a non-static inner 
 class the page throws exception, regardless of whether there are any injected 
 fields.
 Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-70 Simple 
 bean [EnhancedAnnotatedTypeImpl] private  class com.inversebit.HomePage$AForm 
 cannot be a non-static inner class
   at 
 org.jboss.weld.injection.producer.BasicInjectionTarget.checkType(BasicInjectionTarget.java:81)
   at 
 org.jboss.weld.injection.producer.BasicInjectionTarget.init(BasicInjectionTarget.java:69)
   at 
 org.jboss.weld.injection.producer.BeanInjectionTarget.init(BeanInjectionTarget.java:52)
   at 
 org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:95)
   at 
 org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:78)
   ... 65 more

--
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-5226 CDI integration fails in Glassfish 4.0 with WELD-000070

2013-06-19 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-6.x f1a0dc860 - cdb9c0d84


WICKET-5226 CDI integration fails in Glassfish 4.0 with WELD-70

Don't try to process anonymous classes


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

Branch: refs/heads/wicket-6.x
Commit: cdb9c0d847c1ced195caeb9034378782840d3988
Parents: f1a0dc8
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jun 18 13:56:48 2013 +0200
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu Jun 20 07:56:38 2013 +0200

--
 .../apache/wicket/cdi/ComponentInjector.java|  3 ++-
 .../wicket/cdi/ComponentInjectorTest.java   | 21 
 2 files changed, 23 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/cdb9c0d8/wicket-cdi/src/main/java/org/apache/wicket/cdi/ComponentInjector.java
--
diff --git 
a/wicket-cdi/src/main/java/org/apache/wicket/cdi/ComponentInjector.java 
b/wicket-cdi/src/main/java/org/apache/wicket/cdi/ComponentInjector.java
index 0316004..c921706 100644
--- a/wicket-cdi/src/main/java/org/apache/wicket/cdi/ComponentInjector.java
+++ b/wicket-cdi/src/main/java/org/apache/wicket/cdi/ComponentInjector.java
@@ -48,7 +48,8 @@ class ComponentInjector extends AbstractInjector implements 
IComponentInstantiat
{
Class? extends Component componentClass = 
component.getClass();
 
-   if (componentClass.isMemberClass()  
Modifier.isStatic(componentClass.getModifiers()) == false)
+   if (componentClass.isAnonymousClass() ||
+   (componentClass.isMemberClass()  
Modifier.isStatic(componentClass.getModifiers()) == false))
{
LOG.debug(Skipping non-static inner class '{}' , 
componentClass);
}

http://git-wip-us.apache.org/repos/asf/wicket/blob/cdb9c0d8/wicket-cdi/src/test/java/org/apache/wicket/cdi/ComponentInjectorTest.java
--
diff --git 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/ComponentInjectorTest.java 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/ComponentInjectorTest.java
index 55d00cd..4be6976 100644
--- a/wicket-cdi/src/test/java/org/apache/wicket/cdi/ComponentInjectorTest.java
+++ b/wicket-cdi/src/test/java/org/apache/wicket/cdi/ComponentInjectorTest.java
@@ -107,6 +107,27 @@ public class ComponentInjectorTest extends Assert
assertEquals(expectedValue, component.dependency);
}
 
+   /**
+* https://issues.apache.org/jira/browse/WICKET-5226
+*/
+   @Test
+   public void anonymousClass()
+   {
+   BeanManager beanManager = mock(BeanManager.class);
+   INonContextualManager nonContextualManager = 
mock(INonContextualManager.class);
+
+   CdiContainer cdiContainer = new CdiContainer(beanManager, 
nonContextualManager);
+   ComponentInjector injector = new 
ComponentInjector(cdiContainer);
+
+   WebComponent component = new WebComponent(someId) {
+   // anonymous class
+   };
+
+   injector.onInstantiation(component);
+
+   verify(nonContextualManager, never()).inject(any());
+   }
+
private class TestNonStaticComponent extends WebComponent
{
@Inject