[jira] [Updated] (WICKET-5430) Please delete old releases from mirroring system

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5430:


Assignee: Martijn Dashorst

> Please delete old releases from mirroring system
> 
>
> Key: WICKET-5430
> URL: https://issues.apache.org/jira/browse/WICKET-5430
> Project: Wicket
>  Issue Type: Bug
> Environment: http://www.apache.org/dist/wicket/
>Reporter: Sebb
>Assignee: Martijn Dashorst
>
> To reduce the load on the ASF mirrors, projects are required to delete old 
> releases [1]
> Please can you remove all non-current releases?
> Thanks!
> [Note that older releases are always available from the ASF archive server]
> [1] http://www.apache.org/dev/release.html#when-to-archive 



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread JIRA

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

Jyri-Matti Lähteenmäki commented on WICKET-5424:


Thanks a lot, you are quick =)

...but I'm a bit worried of two things:

1) Caching should be used with great caution, unless it's clear that the result 
will never change. If this approach is used widely in Wicket, it might be 
causing bugs which are really hard to catch. At least it's making Wicket more 
fragile. Are you sure removing the cache would cause a noticeable hit? It looks 
like the method is just invoking isVisible/EnabledInHierarchy for the whole 
component tree a couple of times. Since the implementation is "going down" with 
a visitor and on each component coming back up with the "hierarchy", it's doing 
the same stuff multiple times, so maybe the whole check could be performed in 
one method so that the visibility of each component is checked only once? Would 
it still be too slow?

2) I probably don't understand much about statelessness in Wicket, but doesn't 
it feel odd that statelessness can change during a request? How about turning 
the process "upside down": instead of checking for statelessness, make each 
component determine its statelessness just before rendering. Thus this flag 
wouldn't even be available before the render phase and it could not change once 
it's determined (there's no point in changing it during rendering or 
afterwards, right?).

I'm kind of waving my hands in the air here, so feel free to ignore my 
suggestions =)

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
>Assignee: Sven Meier
> Fix For: 6.13.0
>
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case 

[jira] [Created] (WICKET-5430) Please delete old releases from mirroring system

2013-11-26 Thread Sebb (JIRA)
Sebb created WICKET-5430:


 Summary: Please delete old releases from mirroring system
 Key: WICKET-5430
 URL: https://issues.apache.org/jira/browse/WICKET-5430
 Project: Wicket
  Issue Type: Bug
 Environment: http://www.apache.org/dist/wicket/
Reporter: Sebb


To reduce the load on the ASF mirrors, projects are required to delete old 
releases [1]

Please can you remove all non-current releases?

Thanks!

[Note that older releases are always available from the ASF archive server]

[1] http://www.apache.org/dev/release.html#when-to-archive 



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-4997) Mounted bookmarkable Page not recreated on Session Expiry

2013-11-26 Thread bernard (JIRA)

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

bernard commented on WICKET-4997:
-

Emond, my big thanks for that!

> Mounted bookmarkable Page not recreated on Session Expiry
> -
>
> Key: WICKET-4997
> URL: https://issues.apache.org/jira/browse/WICKET-4997
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.4.0
> Environment: JDK 7, GlassFish 3.1.2.2
>Reporter: bernard
>Assignee: Emond Papegaaij
> Fix For: 6.13.0, 7.0.0
>
> Attachments: TestCase.zip, WICKET-4997-bernard-sources.zip
>
>
> With the default true of 
> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry() 
> PageExpiryException is thrown when a Link on a page is clicked.
> I find it very useful and in fact indispensible to rely on 
> RecreateMountedPagesAfterExpiry especially on logout links.
> But it doesn't seem to work for me in 6.4.0. I think this is because 
> Link#getUrl() calls Component#utlFor() which requires a stateless page for 
> this to work:
>   if (page.isPageStateless())
>   {
>   handler = new 
> BookmarkableListenerInterfaceRequestHandler(provider, listener);
>   }
>   else
>   {
>   handler = new ListenerInterfaceRequestHandler(provider, 
> listener);
>   }
> With a stateless page a url is:
> http://localhost:8080/wicket/HomePage?-1.ILinkListener-toolBar-signout
> With a non stateless but bookmarkable page a url is:
> http://localhost:8080/wicket/page?1-1.ILinkListener-toolBar-signout
> So I guess that a stateful page cannot be recovered because after session 
> expiry Wicket cannot find out what the page is. It is not coded in the URL.
> Looking at the semantics of UrlFor(), I thought this might be a bug and I 
> copied and changed the code in my Link subclass from
> //if (page.isPageStateless()) {
> to:
> if (page.isBookmarkable()) {
>   
> It works as expected but I don't know whether it would break other things if 
> implemented in Wicket.
> I guess I am not the only one who needs recovery for bookmarkable pages in 
> this way. Would it be possible to change Wicket to fix this so it becomes 
> possible?



--
This message was sent by Atlassian JIRA
(v6.1#6144)


buildbot success in ASF Buildbot on wicket-master

2013-11-26 Thread buildbot
The Buildbot has detected a restored build on builder wicket-master while 
building wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-master/builds/1527

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch master] 9ea38ad793835d3d7f5db1d276e93b16ebd4db7b
Blamelist: svenmeier 

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Updated] (WICKET-5426) Page not recognized as stateless although stateful component is hidden in #onConfigure()

2013-11-26 Thread Sven Meier (JIRA)

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

Sven Meier updated WICKET-5426:
---

Affects Version/s: 7.0.0
Fix Version/s: (was: 7.0.0)

> Page not recognized as stateless although stateful component is hidden in 
> #onConfigure()
> 
>
> Key: WICKET-5426
> URL: https://issues.apache.org/jira/browse/WICKET-5426
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.12.0, 7.0.0
>Reporter: Sven Meier
>Priority: Minor
>
> Page#stateless gets cached. If Page#isStateless() is called before rendering, 
> a page might not be considered stateless although in #onConfigure() all 
> stateful components are hidden.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread Sven Meier (JIRA)

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

Sven Meier commented on WICKET-5424:


Thanks Martin, I'll use WicketTesterLazyIsPageStatelessBase and subclasses in 
WICKET-5426.

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
>Assignee: Sven Meier
> Fix For: 6.13.0
>
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case this is a known issue without a proper fix, how then could I 
> verify page statelessness through WicketTester? Currently I'm clearing the 
> stateless-cache by reflection, which feels kind of bad...



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-5426) Page not recognized as stateless although stateful component is hidden in #onConfigure()

2013-11-26 Thread Sven Meier (JIRA)

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

Sven Meier commented on WICKET-5426:


See WicketTesterLazyIsPageStatelessBase and subclasses.

> Page not recognized as stateless although stateful component is hidden in 
> #onConfigure()
> 
>
> Key: WICKET-5426
> URL: https://issues.apache.org/jira/browse/WICKET-5426
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.12.0, 7.0.0
>Reporter: Sven Meier
>Priority: Minor
>
> Page#stateless gets cached. If Page#isStateless() is called before rendering, 
> a page might not be considered stateless although in #onConfigure() all 
> stateful components are hidden.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Resolved] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread Sven Meier (JIRA)

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

Sven Meier resolved WICKET-5424.


   Resolution: Fixed
Fix Version/s: (was: 7.0.0)

The difference between test and in-browser run is present in 6.x only, this 
issue is now fixed with 6.13.0.

WICKET-5426 will track improvements on statelessness handling when stateful 
components are hidden in the render phase.

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
>Assignee: Sven Meier
> Fix For: 6.13.0
>
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case this is a known issue without a proper fix, how then could I 
> verify page statelessness through WicketTester? Currently I'm clearing the 
> stateless-cache by reflection, which feels kind of bad...



--
This message was sent by Atlassian JIRA
(v6.1#6144)


git commit: using new stateless tests for WICKET-5426, difference between test and in-browser run in Wicket 6.x is tracked in WICKET-5424

2013-11-26 Thread svenmeier
Updated Branches:
  refs/heads/master 1d8b419e3 -> 9ea38ad79


using new stateless tests for WICKET-5426, difference between
test and in-browser run in Wicket 6.x is tracked in WICKET-5424

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

Branch: refs/heads/master
Commit: 9ea38ad793835d3d7f5db1d276e93b16ebd4db7b
Parents: 1d8b419
Author: svenmeier 
Authored: Tue Nov 26 19:06:17 2013 +0100
Committer: svenmeier 
Committed: Tue Nov 26 19:06:17 2013 +0100

--
 .../wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java| 2 +-
 .../util/tester/WicketTesterLazyIsPageStatelessOnePassTest.java| 2 +-
 .../WicketTesterLazyIsPageStatelessRedirectToBufferTest.java   | 2 +-
 .../WicketTesterLazyIsPageStatelessRedirectToRenderTest.java   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9ea38ad7/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
index 333c75d..a82658c 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
@@ -31,7 +31,7 @@ import org.apache.wicket.util.resource.StringResourceStream;
 import org.junit.Test;
 
 /**
- * https://issues.apache.org/jira/browse/WICKET-5424
+ * https://issues.apache.org/jira/browse/WICKET-5426
  */
 public class WicketTesterLazyIsPageStatelessBase extends WicketTestCase
 {

http://git-wip-us.apache.org/repos/asf/wicket/blob/9ea38ad7/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessOnePassTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessOnePassTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessOnePassTest.java
index b12b001..115be55 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessOnePassTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessOnePassTest.java
@@ -21,7 +21,7 @@ import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.settings.def.RequestCycleSettings;
 
 /**
- * https://issues.apache.org/jira/browse/WICKET-5424
+ * https://issues.apache.org/jira/browse/WICKET-5426
  */
 public class WicketTesterLazyIsPageStatelessOnePassTest extends 
WicketTesterLazyIsPageStatelessBase
 {

http://git-wip-us.apache.org/repos/asf/wicket/blob/9ea38ad7/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToBufferTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToBufferTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToBufferTest.java
index 3c14b90..27ac62f 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToBufferTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToBufferTest.java
@@ -21,7 +21,7 @@ import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.settings.def.RequestCycleSettings;
 
 /**
- * https://issues.apache.org/jira/browse/WICKET-5424
+ * https://issues.apache.org/jira/browse/WICKET-5426
  */
 public class WicketTesterLazyIsPageStatelessRedirectToBufferTest extends 
WicketTesterLazyIsPageStatelessBase
 {

http://git-wip-us.apache.org/repos/asf/wicket/blob/9ea38ad7/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToRenderTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToRenderTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToRenderTest.java
index afb4850..83b578d 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessRedirectToRenderTest.java
+++ 
b/wicket-core/

buildbot success in ASF Buildbot on wicket-branch-6.x

2013-11-26 Thread buildbot
The Buildbot has detected a restored build on builder wicket-branch-6.x while 
building wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-branch-6.x/builds/221

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch wicket-6.x] 6c37c6604b6358b6a9d836770445744ed2b51293
Blamelist: Igor Vaynberg 

Build succeeded!

sincerely,
 -The Buildbot





git commit: tweak for WICKET-5411

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


tweak for WICKET-5411


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

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

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


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

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

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



git commit: tweak for WICKET-5411

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


tweak for WICKET-5411


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

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

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


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

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

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



buildbot failure in ASF Buildbot on wicket-master

2013-11-26 Thread buildbot
The Buildbot has detected a new failure on builder wicket-master while building 
wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-master/builds/1525

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch master] 62a1a94f854eb2e2ecba06092b77ee2668529ff3
Blamelist: Igor Vaynberg 

BUILD FAILED: failed compile

sincerely,
 -The Buildbot





buildbot failure in ASF Buildbot on wicket-branch-6.x

2013-11-26 Thread buildbot
The Buildbot has detected a new failure on builder wicket-branch-6.x while 
building wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-branch-6.x/builds/220

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch wicket-6.x] 8808dd8f20bfed844ba9ea8c6ab57f24cd2c53c9
Blamelist: Igor Vaynberg 

BUILD FAILED: failed compile

sincerely,
 -The Buildbot





[jira] [Resolved] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests

2013-11-26 Thread Igor Vaynberg (JIRA)

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

Igor Vaynberg resolved WICKET-5411.
---

Resolution: Fixed

> Improve AutoLabels by updating their CSS classes automatically during Ajax 
> requests
> ---
>
> Key: WICKET-5411
> URL: https://issues.apache.org/jira/browse/WICKET-5411
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Igor Vaynberg
>Assignee: Igor Vaynberg
> Fix For: 6.13.0, 7.0.0
>
>
> The problem with auto labels is that once they are rendered the only way to 
> update their `error`/`required` css classes during ajax requests is to update 
> some parent since auto components cannot be targeted directly. however, when 
> dealing with forms we may not necessarily want to repaint components because 
> we may lose state.
> This issue solves the problem by tracking state changes in form components 
> that have auto labels and updating their css classes on all ajax requests.
> disabled by default in 6.13 (to enable override 
> WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0



--
This message was sent by Atlassian JIRA
(v6.1#6144)


git commit: tweak for WICKET-5411

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


tweak for WICKET-5411


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

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

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


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



git commit: tweak for WICKET-5411

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


tweak for WICKET-5411


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

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

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


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



[jira] [Resolved] (WICKET-5428) AutoCompleteTextfield Position doesn't consider ScrollPosition

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5428.
-

Resolution: Duplicate

> AutoCompleteTextfield Position doesn't consider ScrollPosition
> --
>
> Key: WICKET-5428
> URL: https://issues.apache.org/jira/browse/WICKET-5428
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 6.12.0
>Reporter: Jennifer Brunklaus
>Priority: Minor
>
> The JavaScript of AutoCompleteTextField doesn't consider the ScrollPosition 
> of the Page.
> In our case is an AutoCompleteTextField at the end of a formular, but still 
> in sight at the bottom. If the User is typing without scrolling, everything 
> is fine.
> But if the User scrolls down, the PopUp Window of the AutoCompleteTextField 
> is heading the wrong position.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (WICKET-5428) AutoCompleteTextfield Position doesn't consider ScrollPosition

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5428:


Priority: Minor  (was: Critical)

> AutoCompleteTextfield Position doesn't consider ScrollPosition
> --
>
> Key: WICKET-5428
> URL: https://issues.apache.org/jira/browse/WICKET-5428
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Affects Versions: 6.12.0
>Reporter: Jennifer Brunklaus
>Priority: Minor
>
> The JavaScript of AutoCompleteTextField doesn't consider the ScrollPosition 
> of the Page.
> In our case is an AutoCompleteTextField at the end of a formular, but still 
> in sight at the bottom. If the User is typing without scrolling, everything 
> is fine.
> But if the User scrolls down, the PopUp Window of the AutoCompleteTextField 
> is heading the wrong position.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (WICKET-5429) property media of link css

2013-11-26 Thread Duto (JIRA)

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

Duto updated WICKET-5429:
-

Attachment: Sample.zip

> property media of link css 
> ---
>
> Key: WICKET-5429
> URL: https://issues.apache.org/jira/browse/WICKET-5429
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.12.0
>Reporter: Duto
>Priority: Trivial
> Attachments: Sample.zip
>
>
> Media property of link (css) is not set if addResourceReplacement is set on 
> WebApplication.init : 
> I set a css file on page via renderHead(IHeaderResponse response) with screen 
> media :
> @Override
> public void renderHead(IHeaderResponse response) {
>   response.render(CssHeaderItem.forReference(OriginalResourceReference.get(), 
> "screen"));
> }
> and after if I defined a resourceReplacement on application init :
> @Override
> public void init() {
>   super.init();
>   addResourceReplacement(OriginalResourceReference.get(), new 
> CssResourceReference(OriginalResourceReference.class, "overwrite.css"));
> }
> I don't have the property media="screen" when wicket generated page.
> Duto 



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (WICKET-5429) property media of link css

2013-11-26 Thread Duto (JIRA)
Duto created WICKET-5429:


 Summary: property media of link css 
 Key: WICKET-5429
 URL: https://issues.apache.org/jira/browse/WICKET-5429
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.12.0
Reporter: Duto
Priority: Trivial


Media property of link (css) is not set if addResourceReplacement is set on 
WebApplication.init : 

I set a css file on page via renderHead(IHeaderResponse response) with screen 
media :

@Override
public void renderHead(IHeaderResponse response) {
  response.render(CssHeaderItem.forReference(OriginalResourceReference.get(), 
"screen"));
}

and after if I defined a resourceReplacement on application init :

@Override
public void init() {
  super.init();
  addResourceReplacement(OriginalResourceReference.get(), new 
CssResourceReference(OriginalResourceReference.class, "overwrite.css"));
}

I don't have the property media="screen" when wicket generated page.

Duto 



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (WICKET-5428) AutoCompleteTextfield Position doesn't consider ScrollPosition

2013-11-26 Thread Jennifer Brunklaus (JIRA)
Jennifer Brunklaus created WICKET-5428:
--

 Summary: AutoCompleteTextfield Position doesn't consider 
ScrollPosition
 Key: WICKET-5428
 URL: https://issues.apache.org/jira/browse/WICKET-5428
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 6.12.0
Reporter: Jennifer Brunklaus
Priority: Critical


The JavaScript of AutoCompleteTextField doesn't consider the ScrollPosition of 
the Page.

In our case is an AutoCompleteTextField at the end of a formular, but still in 
sight at the bottom. If the User is typing without scrolling, everything is 
fine.

But if the User scrolls down, the PopUp Window of the AutoCompleteTextField is 
heading the wrong position.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


buildbot success in ASF Buildbot on wicket-master

2013-11-26 Thread buildbot
The Buildbot has detected a restored build on builder wicket-master while 
building wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-master/builds/1524

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch master] 4a02776fe904d52a2048751ed8a77196a8c09bc3
Blamelist: Martin Tzvetanov Grigorov 

Build succeeded!

sincerely,
 -The Buildbot





git commit: WICKET-5424 Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/master 0bd6020eb -> 4a02776fe


WICKET-5424 Page.isPageStateless() returning true in regular run but false in 
WicketTester

Make the build passing until the problem is debugged


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

Branch: refs/heads/master
Commit: 4a02776fe904d52a2048751ed8a77196a8c09bc3
Parents: 0bd6020
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 15:45:15 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 15:45:15 2013 +0100

--
 .../util/tester/WicketTesterLazyIsPageStatelessBase.java   | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/4a02776f/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
index c4fa872..333c75d 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
@@ -45,8 +45,10 @@ public class WicketTesterLazyIsPageStatelessBase extends 
WicketTestCase
public void isStateless() throws Exception
{
tester.startPage(MyPage.class);
-   tester.assertLabel("isPageStateless", "true");
-   assertTrue(tester.getLastRenderedPage().isPageStateless());
+
+   // the checks below must be reversed when the bug is fixed
+   tester.assertLabel("isPageStateless", "false"/*"true"*/);
+   
assertFalse/*True*/(tester.getLastRenderedPage().isPageStateless());
}
 
public static class MyPage extends WebPage implements 
IMarkupResourceStreamProvider



git commit: WICKET-5424 Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/master 1e1d19225 -> 0bd6020eb


WICKET-5424 Page.isPageStateless() returning true in regular run but false in 
WicketTester

Duplicate the test case for all render strategies


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

Branch: refs/heads/master
Commit: 0bd6020eb5e1d3c029075e6a78efa6c16040cef8
Parents: 1e1d192
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 15:18:00 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 15:18:00 2013 +0100

--
 .../WicketTesterLazyIsPageStatelessBase.java|  92 
 ...ketTesterLazyIsPageStatelessOnePassTest.java |  40 +++
 ...LazyIsPageStatelessRedirectToBufferTest.java |  40 +++
 ...LazyIsPageStatelessRedirectToRenderTest.java |  40 +++
 .../WicketTesterLazyIsPageStatelessTest.java| 108 ---
 5 files changed, 212 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0bd6020e/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
new file mode 100644
index 000..c4fa872
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessBase.java
@@ -0,0 +1,92 @@
+/*
+ * 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.util.tester;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.WicketTestCase;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.StringResourceStream;
+import org.junit.Test;
+
+/**
+ * https://issues.apache.org/jira/browse/WICKET-5424
+ */
+public class WicketTesterLazyIsPageStatelessBase extends WicketTestCase
+{
+   /**
+* The page must be stateless because the stateful component
+* is hidden in #onConfigure
+*
+* @throws Exception
+*/
+   @Test
+   public void isStateless() throws Exception
+   {
+   tester.startPage(MyPage.class);
+   tester.assertLabel("isPageStateless", "true");
+   assertTrue(tester.getLastRenderedPage().isPageStateless());
+   }
+
+   public static class MyPage extends WebPage implements 
IMarkupResourceStreamProvider
+   {
+   public MyPage()
+   {
+   add(new AjaxLink("link")
+   {
+   @Override
+   public void onClick(AjaxRequestTarget target)
+   {
+   }
+   }.add(new Behavior()
+   {
+   @Override
+   public void onConfigure(Component c)
+   {
+   c.setVisible(false);
+   }
+   }));
+   add(new Label("isPageStateless", new 
AbstractReadOnlyModel()
+   {
+   @Override
+   public Boolean getObject()
+   {
+   return

[jira] [Reopened] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reopened WICKET-5424:
-


The issue is still existing in master branch - 
http://ci.apache.org/builders/wicket-master/builds/1522/steps/compile/logs/stdio.

I've used the attached quickstart as a test case.

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
>Assignee: Sven Meier
> Fix For: 6.13.0, 7.0.0
>
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case this is a known issue without a proper fix, how then could I 
> verify page statelessness through WicketTester? Currently I'm clearing the 
> stateless-cache by reflection, which feels kind of bad...



--
This message was sent by Atlassian JIRA
(v6.1#6144)


git commit: WICKET-5424 Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/master 9642d5459 -> 1e1d19225


WICKET-5424 Page.isPageStateless() returning true in regular run but false in 
WicketTester

Fix the class name of RequestCycleSettings


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

Branch: refs/heads/master
Commit: 1e1d19225da657070cf7612fe7909a4053547549
Parents: 9642d54
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 15:10:33 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 15:10:33 2013 +0100

--
 .../wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/1e1d1922/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
index ef18329..a9542c2 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
@@ -28,7 +28,7 @@ import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.mock.MockApplication;
 import org.apache.wicket.model.AbstractReadOnlyModel;
 import org.apache.wicket.protocol.http.WebApplication;
-import org.apache.wicket.settings.IRequestCycleSettings;
+import org.apache.wicket.settings.def.RequestCycleSettings;
 import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.resource.StringResourceStream;
 import org.junit.Test;
@@ -46,7 +46,7 @@ public class WicketTesterLazyIsPageStatelessTest extends 
WicketTestCase
@Override
public void init() {
super.init();
-   
getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
+   
getRequestCycleSettings().setRenderStrategy(RequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
}
};
}



buildbot failure in ASF Buildbot on wicket-master

2013-11-26 Thread buildbot
The Buildbot has detected a new failure on builder wicket-master while building 
wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-master/builds/1521

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch master] 9642d54594dfd1508f27e85f18652f206bb79e21
Blamelist: Martin Tzvetanov Grigorov 

BUILD FAILED: failed compile

sincerely,
 -The Buildbot





git commit: WICKET-5424 Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/master 17860dfb1 -> 9642d5459


WICKET-5424 Page.isPageStateless() returning true in regular run but false in 
WicketTester

Add the quickstart app as a test case


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

Branch: refs/heads/master
Commit: 9642d54594dfd1508f27e85f18652f206bb79e21
Parents: 17860df
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 15:00:38 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 15:01:22 2013 +0100

--
 .../WicketTesterLazyIsPageStatelessTest.java| 108 +++
 1 file changed, 108 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9642d545/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
new file mode 100644
index 000..ef18329
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
@@ -0,0 +1,108 @@
+/*
+ * 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.util.tester;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.WicketTestCase;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.mock.MockApplication;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.settings.IRequestCycleSettings;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.StringResourceStream;
+import org.junit.Test;
+
+/**
+ * https://issues.apache.org/jira/browse/WICKET-5424
+ */
+public class WicketTesterLazyIsPageStatelessTest extends WicketTestCase
+{
+   @Override
+   protected WebApplication newApplication()
+   {
+   return new MockApplication()
+   {
+   @Override
+   public void init() {
+   super.init();
+   
getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
+   }
+   };
+   }
+
+   /**
+* The page must be stateless because the stateful component
+* is hidden in #onConfigure
+*
+* @throws Exception
+*/
+   @Test
+   public void isStateless() throws Exception
+   {
+   tester.startPage(MyPage.class);
+   tester.assertLabel("isPageStateless", "true");
+   assertTrue(tester.getLastRenderedPage().isPageStateless());
+   }
+
+   public static class MyPage extends WebPage implements 
IMarkupResourceStreamProvider
+   {
+   public MyPage()
+   {
+   add(new AjaxLink("link")
+   {
+   @Override
+   public void onClick(AjaxRequestTarget target)
+   {
+   }
+   }.add(new Behavior()
+   {
+   @Override
+   public void onConfigure(Component c)
+   {
+   c.setVisible(false);
+ 

git commit: WICKET-5424 Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-6.x 527663713 -> 4a5d1220e


WICKET-5424 Page.isPageStateless() returning true in regular run but false in 
WicketTester

Add the quickstart app as a test case


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

Branch: refs/heads/wicket-6.x
Commit: 4a5d1220e5c897e07db59aa1a50d6b67b0c06001
Parents: 5276637
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 15:00:38 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 15:00:38 2013 +0100

--
 .../WicketTesterLazyIsPageStatelessTest.java| 108 +++
 1 file changed, 108 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/4a5d1220/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
new file mode 100644
index 000..ef18329
--- /dev/null
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterLazyIsPageStatelessTest.java
@@ -0,0 +1,108 @@
+/*
+ * 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.util.tester;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.WicketTestCase;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.mock.MockApplication;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.settings.IRequestCycleSettings;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.StringResourceStream;
+import org.junit.Test;
+
+/**
+ * https://issues.apache.org/jira/browse/WICKET-5424
+ */
+public class WicketTesterLazyIsPageStatelessTest extends WicketTestCase
+{
+   @Override
+   protected WebApplication newApplication()
+   {
+   return new MockApplication()
+   {
+   @Override
+   public void init() {
+   super.init();
+   
getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
+   }
+   };
+   }
+
+   /**
+* The page must be stateless because the stateful component
+* is hidden in #onConfigure
+*
+* @throws Exception
+*/
+   @Test
+   public void isStateless() throws Exception
+   {
+   tester.startPage(MyPage.class);
+   tester.assertLabel("isPageStateless", "true");
+   assertTrue(tester.getLastRenderedPage().isPageStateless());
+   }
+
+   public static class MyPage extends WebPage implements 
IMarkupResourceStreamProvider
+   {
+   public MyPage()
+   {
+   add(new AjaxLink("link")
+   {
+   @Override
+   public void onClick(AjaxRequestTarget target)
+   {
+   }
+   }.add(new Behavior()
+   {
+   @Override
+   public void onConfigure(Component c)
+   {
+   c.setVisible(false);
+ 

git commit: WICKET-5427 Building Wicket with JDK 1.8 fails with signatures like >

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/master fed607f62 -> 17860dfb1


WICKET-5427 Building Wicket with JDK 1.8 fails with signatures like >


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

Branch: refs/heads/master
Commit: 17860dfb1b4ad7ee57b550aa0b0ab2bc5b3a2805
Parents: fed607f
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 14:43:50 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 14:47:13 2013 +0100

--
 .../src/main/java/org/apache/wicket/util/value/ValueMap.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/17860dfb/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java
--
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java 
b/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java
index acba07f..1688389 100755
--- a/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java
@@ -789,7 +789,8 @@ public class ValueMap extends LinkedHashMap 
implements IValueMap
@Override
public > T getAsEnum(final String key, final Class 
eClass)
{
-   return getEnumImpl(key, eClass, null);
+   // explicitly pass T as type to be able to build with JDK 1.8. 
WICKET-5427
+   return this.getEnumImpl(key, eClass, null);
}
 
/**



[jira] [Resolved] (WICKET-5427) Building Wicket with JDK 1.8 fails with signatures like >

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5427.
-

   Resolution: Fixed
Fix Version/s: 7.0.0

A fix/workaround is applied to master branch.

Maven Clirr plugin doesn't allow to apply it to wicket-6.x branch:

[ERROR] Failed to execute goal org.codehaus.mojo:clirr-maven-plugin:2.5:check 
(clirr-check) on project wicket-util: Execution clirr-check of goal 
org.codehaus.mojo:clirr-maven-plugin:2.5:check failed: Invalid byte tag in 
constant pool: 15 -> [Help 1]


> Building Wicket with JDK 1.8 fails with signatures like >
> ---
>
> Key: WICKET-5427
> URL: https://issues.apache.org/jira/browse/WICKET-5427
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 6.12.0, 7.0.0
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
>Priority: Minor
> Fix For: 7.0.0
>
>
> Trying to build Wicket with JDK 1.8 (build b117) fails with:
> [ERROR] 
> /home/martin/git/apache/wicket/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java:[792,40]
>  incompatible types: inference variable T has incompatible upper bounds 
> java.lang.Enum,T



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (WICKET-5427) Building Wicket with JDK 1.8 fails with signatures like >

2013-11-26 Thread Martin Grigorov (JIRA)
Martin Grigorov created WICKET-5427:
---

 Summary: Building Wicket with JDK 1.8 fails with signatures like 
>
 Key: WICKET-5427
 URL: https://issues.apache.org/jira/browse/WICKET-5427
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 6.12.0, 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
Priority: Minor


Trying to build Wicket with JDK 1.8 (build b117) fails with:

[ERROR] 
/home/martin/git/apache/wicket/wicket-util/src/main/java/org/apache/wicket/util/value/ValueMap.java:[792,40]
 incompatible types: inference variable T has incompatible upper bounds 
java.lang.Enum,T




--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-5426) Page not recognized as stateless although stateful component is hidden in #onConfigure()

2013-11-26 Thread Sven Meier (JIRA)

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

Sven Meier commented on WICKET-5426:


related bug in BaseWicketTester

> Page not recognized as stateless although stateful component is hidden in 
> #onConfigure()
> 
>
> Key: WICKET-5426
> URL: https://issues.apache.org/jira/browse/WICKET-5426
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.12.0
>Reporter: Sven Meier
>Priority: Minor
> Fix For: 7.0.0
>
>
> Page#stateless gets cached. If Page#isStateless() is called before rendering, 
> a page might not be considered stateless although in #onConfigure() all 
> stateful components are hidden.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (WICKET-5426) Page not recognized as stateless although stateful component is hidden in #onConfigure()

2013-11-26 Thread Sven Meier (JIRA)
Sven Meier created WICKET-5426:
--

 Summary: Page not recognized as stateless although stateful 
component is hidden in #onConfigure()
 Key: WICKET-5426
 URL: https://issues.apache.org/jira/browse/WICKET-5426
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.12.0
Reporter: Sven Meier
Priority: Minor
 Fix For: 7.0.0


Page#stateless gets cached. If Page#isStateless() is called before rendering, a 
page might not be considered stateless although in #onConfigure() all stateful 
components are hidden.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Resolved] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread Sven Meier (JIRA)

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

Sven Meier resolved WICKET-5424.


   Resolution: Fixed
Fix Version/s: 7.0.0
   6.13.0

BaseWicketTester now takes care not to interfere with the wrapped PageRenderer. 
With the configured render strategy ONE_PASS_RENDER the page is reported as 
stateless in the testcase and when rendered in the browser.

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
>Assignee: Sven Meier
> Fix For: 6.13.0, 7.0.0
>
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case this is a known issue without a proper fix, how then could I 
> verify page statelessness through WicketTester? Currently I'm clearing the 
> stateless-cache by reflection, which feels kind of bad...



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[2/2] git commit: WICKET-5424 record rendered page after wrapped render has responded

2013-11-26 Thread svenmeier
WICKET-5424 record rendered page after wrapped render has responded

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

Branch: refs/heads/wicket-6.x
Commit: 5276637135f108d1036c2098ca438a650180f226
Parents: 8094436
Author: svenmeier 
Authored: Tue Nov 26 12:47:10 2013 +0100
Committer: svenmeier 
Committed: Tue Nov 26 12:47:10 2013 +0100

--
 .../wicket/util/tester/BaseWicketTester.java| 37 +++-
 1 file changed, 28 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/52766371/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 16efa26..7b8806a 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
@@ -40,6 +40,7 @@ import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpSession;
 
 import junit.framework.AssertionFailedError;
+
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
 import org.apache.wicket.IPageManagerProvider;
@@ -2646,17 +2647,35 @@ public class BaseWicketTester
}
 
@Override
-   public PageRenderer get(RenderPageRequestHandler handler)
+   public PageRenderer get(final RenderPageRequestHandler handler)
{
-   Page newPage = 
(Page)handler.getPageProvider().getPageInstance();
-   if (componentInPage != null && lastPage != null &&
-   lastPage.getPageClass() != 
newPage.getPageClass())
+   return new PageRenderer(handler)
{
-   // WICKET-3913: reset startComponent if a new 
page type is rendered
-   componentInPage = null;
-   }
-   lastRenderedPage = lastPage = newPage;
-   return delegate.get(handler);
+   @Override
+   public void respond(RequestCycle requestCycle)
+   {
+   
delegate.get(handler).respond(requestCycle);
+
+   // WICKET-5424 record page after 
wrapped renderer has
+   // responded
+   if 
(handler.getPageProvider().hasPageInstance())
+   {
+   Page renderedPage = 
(Page)handler.getPageProvider().getPageInstance();
+   if (componentInPage != null && 
lastPage != null
+   && 
lastPage.getPageClass() != renderedPage.getPageClass())
+   {
+   // WICKET-3913: reset 
startComponent if a new page
+   // type is rendered
+   componentInPage = null;
+   }
+   lastRenderedPage = lastPage = 
renderedPage;
+   }
+   else
+   {
+   lastRenderedPage = null;
+   }
+   }
+   };
}
}
 



[1/2] git commit: ignore license header in simplelogger.properties

2013-11-26 Thread svenmeier
Updated Branches:
  refs/heads/wicket-6.x 8ff9809d3 -> 527663713


ignore license header in simplelogger.properties

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

Branch: refs/heads/wicket-6.x
Commit: 809443634a8e76cb83a360c15122843caaecd54d
Parents: 8ff9809
Author: svenmeier 
Authored: Tue Nov 26 12:46:33 2013 +0100
Committer: svenmeier 
Committed: Tue Nov 26 12:46:33 2013 +0100

--
 .../test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/80944363/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
 
b/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
index e612055..3a3f7bf 100644
--- 
a/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
+++ 
b/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/ApacheLicenceHeaderTest.java
@@ -36,6 +36,7 @@ public class ApacheLicenceHeaderTest extends 
ApacheLicenseHeaderTestCase
{
xmlIgnore.add(".settings");
xmlIgnore.add("src/main/resources/META-INF/beans.xml");
+   xmlIgnore.add("src/test/java/simplelogger.properties");
xmlPrologIgnore = Arrays.asList("src");
}
 }



git commit: WICKET-5424 record rendered page after wrapped render has responded

2013-11-26 Thread svenmeier
Updated Branches:
  refs/heads/master 8923bdfa1 -> fed607f62


WICKET-5424 record rendered page after wrapped render has responded

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

Branch: refs/heads/master
Commit: fed607f62de2c6635d4c04045c2f4d9cb24add25
Parents: 8923bdf
Author: svenmeier 
Authored: Tue Nov 26 12:47:21 2013 +0100
Committer: svenmeier 
Committed: Tue Nov 26 12:47:21 2013 +0100

--
 .../wicket/util/tester/BaseWicketTester.java| 36 +++-
 1 file changed, 27 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fed607f6/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 58eec83..9f7c4c3 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
@@ -41,6 +41,7 @@ import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpSession;
 
 import junit.framework.AssertionFailedError;
+
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
 import org.apache.wicket.IPageManagerProvider;
@@ -2639,17 +2640,34 @@ public class BaseWicketTester
}
 
@Override
-   public PageRenderer get(RenderPageRequestHandler handler)
+   public PageRenderer get(final RenderPageRequestHandler handler)
{
-   Page newPage = 
(Page)handler.getPageProvider().getPageInstance();
-   if (componentInPage != null && lastPage != null &&
-   lastPage.getPageClass() != 
newPage.getPageClass())
+   return new PageRenderer(handler)
{
-   // WICKET-3913: reset startComponent if a new 
page type is rendered
-   componentInPage = null;
-   }
-   lastRenderedPage = lastPage = newPage;
-   return delegate.get(handler);
+   @Override
+   public void respond(RequestCycle requestCycle)
+   {
+   
delegate.get(handler).respond(requestCycle);
+
+   // WICKET-5424 record page after 
wrapped renderer has responded
+   if 
(handler.getPageProvider().hasPageInstance())
+   {
+   Page renderedPage = 
(Page)handler.getPageProvider().getPageInstance();
+   if (componentInPage != null && 
lastPage != null
+   && 
lastPage.getPageClass() != renderedPage.getPageClass())
+   {
+   // WICKET-3913: reset 
startComponent if a new page
+   // type is rendered
+   componentInPage = null;
+   }
+   lastRenderedPage = lastPage = 
renderedPage;
+   }
+   else
+   {
+   lastRenderedPage = null;
+   }
+   }
+   };
}
}
 



[jira] [Updated] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5424:


Assignee: Sven Meier

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
>Assignee: Sven Meier
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case this is a known issue without a proper fix, how then could I 
> verify page statelessness through WicketTester? Currently I'm clearing the 
> stateless-cache by reflection, which feels kind of bad...



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-5424) Page.isPageStateless() returning true in regular run but false in WicketTester

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5424:
-

Good catch!
The patch looks good to me.

> Page.isPageStateless() returning true in regular run but false in WicketTester
> --
>
> Key: WICKET-5424
> URL: https://issues.apache.org/jira/browse/WICKET-5424
> Project: Wicket
>  Issue Type: Bug
>Affects Versions: 6.8.0, 6.12.0
>Reporter: Jyri-Matti Lähteenmäki
> Attachments: WICKET-5424-tester.patch, wicket-bug-test.zip
>
>
> Motivation:
> Healthcheck/heartbeat pages must always be stateless to prevent significant 
> amounts of session creation and storage.
> Also each anonymously accessed page in a public site should be stateless due 
> to the same reason (otherwise the site could easily be DoSsed down).
> It would be nice to verify these requirements by tests.
> If I create an ought-to-be-stateless page with an AjaxLink which is hidden by 
> a behavior:
> public class MyPage extends WebPage {
> public MyPage() {
> add(new AjaxLink("link") {
> @Override
> public void onClick(AjaxRequestTarget target) {
> //
> }
> }.add(new Behavior() {
> @Override
> public void onConfigure(Component c) {
> c.setVisible(false);
> }
> }));
> add(new Label("isPageStateless", new AbstractReadOnlyModel() 
> {
> @Override
> public Boolean getObject() {
> return MyPage.this.isPageStateless();
> }
> }));
> }
> }
> then checking through a web server the page correctly prints "true", and no 
> HttpSessions are created.
> However, when I try to verify statelessness through WicketTester, the 
> following test passes:
> @Test
> public void testName() throws Exception {
> WicketTester tester = new WicketTester(new WebApplication() {
> @Override
> public Class getHomePage() {
> return MyPage.class;
> }
> });
> tester.startPage(MyPage.class);
> tester.assertLabel("isPageStateless", "false");
> assertFalse(tester.getLastRenderedPage().isPageStateless());
> }
> It seems that somehow due to WicketTester, isPageStateless() is being invoked 
> before any behaviors are run (and thus the AjaxLink is still visible), and 
> since stateless-flag for the page is cached, it remains false.
> If it's by design that isPageStateless should always return the same result 
> during each request, then I guess that the statelessness resolution process 
> must not depend on anything happening after the page constructor? I assume 
> it's not by design.
> Suggestions:
> A) Obvious fix would be to remove stateless-flag caching, since apparently it 
> is causing problems, as also suggested by a hackish comment in Page.init(). 
> In general, caching should always be used sparingly.
> B) Or maybe whoever is invoking isPageStateless() at an early stage should 
> actually be using Page.peekPageStateless()? But this doesn't really seem like 
> a real fix, more like a temporary hack.
> C) All caching could also be disabled during test runs, but this would not be 
> a good thing since tests should reproduce the actual behavior as closely as 
> possible.
> D) In case this is a known issue without a proper fix, how then could I 
> verify page statelessness through WicketTester? Currently I'm clearing the 
> stateless-cache by reflection, which feels kind of bad...



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Reopened] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reopened WICKET-5411:
-


Reopening to improve the problem with tag.put("id", ...) before 6.13

> Improve AutoLabels by updating their CSS classes automatically during Ajax 
> requests
> ---
>
> Key: WICKET-5411
> URL: https://issues.apache.org/jira/browse/WICKET-5411
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Igor Vaynberg
>Assignee: Igor Vaynberg
> Fix For: 6.13.0, 7.0.0
>
>
> The problem with auto labels is that once they are rendered the only way to 
> update their `error`/`required` css classes during ajax requests is to update 
> some parent since auto components cannot be targeted directly. however, when 
> dealing with forms we may not necessarily want to repaint components because 
> we may lose state.
> This issue solves the problem by tracking state changes in form components 
> that have auto labels and updating their css classes on all ajax requests.
> disabled by default in 6.13 (to enable override 
> WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests

2013-11-26 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5411:
-

tag.put("id", getLabelIdFor(component)); at 
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?source=cc#L302
 
causes a lot of 
  WARN  - ComponentTag   - Please use component.setMarkupId(String) 
to change the tag's 'id' attribute.
when executing the JS UI tests (start wicket examples and go to 
http://localhost:8080/js-test/all.html)

> Improve AutoLabels by updating their CSS classes automatically during Ajax 
> requests
> ---
>
> Key: WICKET-5411
> URL: https://issues.apache.org/jira/browse/WICKET-5411
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Igor Vaynberg
>Assignee: Igor Vaynberg
> Fix For: 6.13.0, 7.0.0
>
>
> The problem with auto labels is that once they are rendered the only way to 
> update their `error`/`required` css classes during ajax requests is to update 
> some parent since auto components cannot be targeted directly. however, when 
> dealing with forms we may not necessarily want to repaint components because 
> we may lose state.
> This issue solves the problem by tracking state changes in form components 
> that have auto labels and updating their css classes on all ajax requests.
> disabled by default in 6.13 (to enable override 
> WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0



--
This message was sent by Atlassian JIRA
(v6.1#6144)


buildbot success in ASF Buildbot on wicket-branch-6.x

2013-11-26 Thread buildbot
The Buildbot has detected a restored build on builder wicket-branch-6.x while 
building wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-branch-6.x/builds/217

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch wicket-6.x] 8ff9809d34d9dc92bd2b385951a1041f91cd2a03
Blamelist: Emond Papegaaij 

Build succeeded!

sincerely,
 -The Buildbot





git commit: Fix testcases

2013-11-26 Thread papegaaij
Updated Branches:
  refs/heads/wicket-6.x 3239c8d00 -> 8ff9809d3


Fix testcases


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

Branch: refs/heads/wicket-6.x
Commit: 8ff9809d34d9dc92bd2b385951a1041f91cd2a03
Parents: 3239c8d
Author: Emond Papegaaij 
Authored: Tue Nov 26 11:05:57 2013 +0100
Committer: Emond Papegaaij 
Committed: Tue Nov 26 11:05:57 2013 +0100

--
 .../src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/8ff9809d/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
 
b/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
index ef862c6..496d092 100644
--- 
a/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
+++ 
b/wicket-experimental/wicket-cdi-1.1/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
@@ -38,7 +38,8 @@ import org.junit.runner.RunWith;
 @AdditionalClasses({ CdiWicketTester.class, BehaviorInjector.class, 
CdiConfiguration.class,
CdiShutdownCleaner.class, ComponentInjector.class, 
ConversationExpiryChecker.class,
ConversationPropagator.class, DetachEventEmitter.class, 
SessionInjector.class,
-   TestAppScope.class, TestConversationBean.class, 
TestCdiApplication.class })
+   TestAppScope.class, TestConversationBean.class, 
TestCdiApplication.class,
+   AutoConversation.class })
 public abstract class WicketCdiTestCase extends WicketTestCase
 {
@Inject



git commit: Upgrade Weld to fix the CDI wicket examples

2013-11-26 Thread mgrigorov
Updated Branches:
  refs/heads/master 8eaceb3df -> 8923bdfa1


Upgrade Weld to fix the CDI wicket examples


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

Branch: refs/heads/master
Commit: 8923bdfa16bc73f488bdeaba451ebbe3c1d29055
Parents: 8eaceb3
Author: Martin Tzvetanov Grigorov 
Authored: Tue Nov 26 11:03:36 2013 +0100
Committer: Martin Tzvetanov Grigorov 
Committed: Tue Nov 26 11:03:36 2013 +0100

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/8923bdfa/wicket-examples/pom.xml
--
diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml
index 183abc7..b1f2631 100644
--- a/wicket-examples/pom.xml
+++ b/wicket-examples/pom.xml
@@ -134,7 +134,7 @@

org.jboss.weld.servlet
weld-servlet
-   2.0.0.SP1
+   2.1.0.Final


org.apache.wicket



Git Push Summary

2013-11-26 Thread papegaaij
Updated Branches:
  refs/heads/wicket-cdi-1.1-rewrite [deleted] df4b33636


[jira] [Resolved] (WICKET-5084) ClassNotFoundException with Atmosphere on Bookmarkable pages

2013-11-26 Thread Emond Papegaaij (JIRA)

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

Emond Papegaaij resolved WICKET-5084.
-

   Resolution: Fixed
Fix Version/s: 7.0.0
   6.13.0

Both issues (Atmosphere 1002 and WICKET-4997) have been fixed. Therefore, I'm 
closing this issue.

> ClassNotFoundException with Atmosphere on Bookmarkable pages
> 
>
> Key: WICKET-5084
> URL: https://issues.apache.org/jira/browse/WICKET-5084
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket, wicket-atmosphere
>Affects Versions: 6.6.0
>Reporter: Vojtěch Krása
>Assignee: Emond Papegaaij
> Fix For: 6.13.0, 7.0.0
>
>
> https://github.com/krasa/wicket-atmosphere-quickstart
> run, go to second page, click on link.
> from some reason, it makes requests to 
> http://localhost:8080/wicket/bookmarkable/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-ver-1362607904693.js
>   
> instead of: 
> http://localhost:8080/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-ver-1362607904693.js
>
>  =>java.lang.ClassNotFoundException: page
> I noticed few things:
> 1) Form cannot be updated, crashes on NPE
> 2) ugly crash when updated component has not setOutputMarkupId(true);
> 3) otherwise it seems to work



--
This message was sent by Atlassian JIRA
(v6.1#6144)


buildbot success in ASF Buildbot on wicket-master

2013-11-26 Thread buildbot
The Buildbot has detected a restored build on builder wicket-master while 
building wicket.
Full details are available at:
 http://ci.apache.org/builders/wicket-master/builds/1517

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

Buildslave for this Build: hemera_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch master] 8eaceb3df42291ebf306e9eb51920d6f670720fb
Blamelist: Emond Papegaaij 

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Resolved] (WICKET-4997) Mounted bookmarkable Page not recreated on Session Expiry

2013-11-26 Thread Emond Papegaaij (JIRA)

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

Emond Papegaaij resolved WICKET-4997.
-

   Resolution: Fixed
Fix Version/s: 7.0.0
   6.13.0
 Assignee: Emond Papegaaij  (was: Pedro Santos)

We now use the following condition to render bookmarkable urls:
getApplication().getPageSettings().getRecreateMountedPagesAfterExpiry() && 
((page.isBookmarkable() && page.wasCreatedBookmarkable()) || 
page.isPageStateless())

This results in bookmarkable urls for pages that are bookmarkable and were 
created bookmarkable. These pages can be recreated after session expiry.

> Mounted bookmarkable Page not recreated on Session Expiry
> -
>
> Key: WICKET-4997
> URL: https://issues.apache.org/jira/browse/WICKET-4997
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.4.0
> Environment: JDK 7, GlassFish 3.1.2.2
>Reporter: bernard
>Assignee: Emond Papegaaij
> Fix For: 6.13.0, 7.0.0
>
> Attachments: TestCase.zip, WICKET-4997-bernard-sources.zip
>
>
> With the default true of 
> org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry() 
> PageExpiryException is thrown when a Link on a page is clicked.
> I find it very useful and in fact indispensible to rely on 
> RecreateMountedPagesAfterExpiry especially on logout links.
> But it doesn't seem to work for me in 6.4.0. I think this is because 
> Link#getUrl() calls Component#utlFor() which requires a stateless page for 
> this to work:
>   if (page.isPageStateless())
>   {
>   handler = new 
> BookmarkableListenerInterfaceRequestHandler(provider, listener);
>   }
>   else
>   {
>   handler = new ListenerInterfaceRequestHandler(provider, 
> listener);
>   }
> With a stateless page a url is:
> http://localhost:8080/wicket/HomePage?-1.ILinkListener-toolBar-signout
> With a non stateless but bookmarkable page a url is:
> http://localhost:8080/wicket/page?1-1.ILinkListener-toolBar-signout
> So I guess that a stateful page cannot be recovered because after session 
> expiry Wicket cannot find out what the page is. It is not coded in the URL.
> Looking at the semantics of UrlFor(), I thought this might be a bug and I 
> copied and changed the code in my Link subclass from
> //if (page.isPageStateless()) {
> to:
> if (page.isBookmarkable()) {
>   
> It works as expected but I don't know whether it would break other things if 
> implemented in Wicket.
> I guess I am not the only one who needs recovery for bookmarkable pages in 
> this way. Would it be possible to change Wicket to fix this so it becomes 
> possible?



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Resolved] (WICKET-5367) migrate Wicket-Atmosphere to Atmosphere 2

2013-11-26 Thread Emond Papegaaij (JIRA)

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

Emond Papegaaij resolved WICKET-5367.
-

   Resolution: Fixed
Fix Version/s: 7.0.0
   6.13.0

Atmosphere is upgraded to 2.0.4 and the JS to 2.0.8.

> migrate Wicket-Atmosphere to Atmosphere 2
> -
>
> Key: WICKET-5367
> URL: https://issues.apache.org/jira/browse/WICKET-5367
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-atmosphere
>Affects Versions: 6.10.0
>Reporter: Zala Goupil
>Assignee: Emond Papegaaij
>  Labels: features
> Fix For: 6.13.0, 7.0.0
>
>
> As Atmosphere 2 provides lots of performance & memory-management improvements 
> (as JF Arcand says),  amongst other things, I think it would be great to 
> migrate Wicket-Atmosphere to the last Atmosphere stable version.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


git commit: Upgrade atmosphere to 2.0.4 and js to 2.0.8

2013-11-26 Thread papegaaij
Updated Branches:
  refs/heads/master 3dd165249 -> 8eaceb3df


Upgrade atmosphere to 2.0.4 and js to 2.0.8


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

Branch: refs/heads/master
Commit: 8eaceb3df42291ebf306e9eb51920d6f670720fb
Parents: 3dd1652
Author: Emond Papegaaij 
Authored: Tue Nov 26 09:08:59 2013 +0100
Committer: Emond Papegaaij 
Committed: Tue Nov 26 09:11:26 2013 +0100

--
 wicket-experimental/wicket-atmosphere/pom.xml   |   2 +-
 .../wicket/atmosphere/jquery.atmosphere.js  | 134 ++-
 2 files changed, 99 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/8eaceb3d/wicket-experimental/wicket-atmosphere/pom.xml
--
diff --git a/wicket-experimental/wicket-atmosphere/pom.xml 
b/wicket-experimental/wicket-atmosphere/pom.xml
index 5fdf6ef..c375b42 100644
--- a/wicket-experimental/wicket-atmosphere/pom.xml
+++ b/wicket-experimental/wicket-atmosphere/pom.xml
@@ -27,7 +27,7 @@
0.10-SNAPSHOT
jar

-   2.0.0
+   2.0.4

Wicket-Atmosphere
Wicket-Atmosphere provides integration of the Atmosphere 
Framework in Wicket.

http://git-wip-us.apache.org/repos/asf/wicket/blob/8eaceb3d/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
--
diff --git 
a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
 
b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
index b909609..701a586 100644
--- 
a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
+++ 
b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
@@ -1,5 +1,5 @@
 /**
- * Copyright 2012 Jeanfrancois Arcand
+ * Copyright 2013 Jeanfrancois Arcand
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,8 @@ jQuery.atmosphere = function () {
 };
 
 return {
-version: "2.0.3-jquery",
+version: "2.0.8-jquery",
+uuid : 0,
 requests: [],
 callbacks: [],
 
@@ -166,7 +167,7 @@ jQuery.atmosphere = function () {
 request: null,
 partialMessage: "",
 errorHandled: false,
-id: 0
+closedByClientTimeout: false
 };
 
 /**
@@ -256,6 +257,9 @@ jQuery.atmosphere = function () {
 /** Trace time */
 var _traceTimer;
 
+/** Key for connection sharing */
+var _sharingKey;
+
 // Automatic call to subscribe
 _subscribe(options);
 
@@ -352,9 +356,11 @@ jQuery.atmosphere = function () {
 }
 
 // Protocol
-_request.firstMessage = true;
+_request.firstMessage = jQuery.atmosphere.uuid == 0 ? true : 
false;
 _request.isOpen = false;
 _request.ctime = jQuery.now();
+_request.uuid = jQuery.atmosphere.uuid;
+_request.closedByClientTimeout = false;
 
 if (_request.transport !== 'websocket' && _request.transport 
!== 'sse') {
 _executeRequest(_request);
@@ -679,13 +685,13 @@ jQuery.atmosphere = function () {
 };
 
 function leaveTrace() {
-document.cookie = encodeURIComponent(name) + "=" +
+document.cookie = _sharingKey + "=" +
 // Opera's JSON implementation ignores a number whose 
a last digit of 0 strangely
 // but has no problem with a number whose a last digit 
of 9 + 1
 encodeURIComponent(jQuery.stringifyJSON({
 ts: jQuery.now() + 1,
 heir: (storageService.get("children") || [])[0]
-}));
+})) + "; path=/";
 }
 
 // Chooses a storageService
@@ -704,6 +710,7 @@ jQuery.atmosphere = function () {
 storageService.set("opened", false);
 }
 // Leaves traces
+_sharingKey = encodeURIComponent(name);
 leaveTrace();
 _traceTimer = setInterval(leaveTrace, 1000);
 
@@ -780,8 +787,17 @@ jQuery.atmosphere = fu

[2/4] git commit: Updated the cdi example to wicket-cdi-1.1

2013-11-26 Thread papegaaij
Updated the cdi example to wicket-cdi-1.1


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

Branch: refs/heads/wicket-6.x
Commit: a742c6e598f54b31c5cdfdf4be98ca14397a54f8
Parents: 5133c75
Author: Emond Papegaaij 
Authored: Tue Nov 26 07:51:10 2013 +0100
Committer: Emond Papegaaij 
Committed: Tue Nov 26 09:09:16 2013 +0100

--
 pom.xml | 37 +
 wicket-examples/pom.xml | 46 ++--
 wicket-examples/src/main/java/log4j.properties  |  1 +
 .../examples/cdi/AutoConversationPage1.html | 19 +++
 .../examples/cdi/AutoConversationPage1.java | 57 
 .../examples/cdi/AutoConversationPage2.html | 17 ++
 .../examples/cdi/AutoConversationPage2.java | 43 +++
 .../wicket/examples/cdi/CdiApplication.java |  6 +--
 .../apache/wicket/examples/cdi/CdiHomePage.html |  3 ++
 9 files changed, 181 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 55ea42b..44ae648 100644
--- a/pom.xml
+++ b/pom.xml
@@ -341,6 +341,11 @@
0.15-SNAPSHOT


+   org.apache.wicket
+   wicket-cdi-1.1
+   0.2-SNAPSHOT
+   
+   
junit
junit
4.10
@@ -860,6 +865,38 @@



+   
+   
+   
+   org.eclipse.m2e
+   
lifecycle-mapping
+   1.0.0
+   
+   
+   
+   

+   

+   

+   
org.apache.felix
+   

+   

+   
maven-bundle-plugin
+   

+   

+   
[2.3.7,)
+   

+   

+   
manifest
+   

+   

+   
+   

+   

+   

+   
+   
+   
+   




http://git-wip-us.apache.org/repos/asf/wicket/blob/a742c6e5/wicket-examples/pom.xml
--
diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml
index 07747fb..0763a80 100644
--- a/wicket-examples/pom.xml
+++ b/wicket-examples/pom.xml
@@ -124,21 +124,16 @@

org.jboss.weld
weld-core
-   1.1.9.Final
+   2.1.0.Final


org.jboss.weld.servlet
weld-servlet-core
-   1.1.9.Final
-   
-  

[3/4] git commit: formatting

2013-11-26 Thread papegaaij
formatting


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

Branch: refs/heads/wicket-6.x
Commit: 4e161cbcc7890de4587de178b64cdc073f3389e4
Parents: a742c6e
Author: Emond Papegaaij 
Authored: Tue Nov 26 07:51:57 2013 +0100
Committer: Emond Papegaaij 
Committed: Tue Nov 26 09:09:16 2013 +0100

--
 .../java/org/apache/wicket/cdi/AutoConversation.java|  8 
 .../java/org/apache/wicket/cdi/BeanManagerLookup.java   |  3 ++-
 .../apache/wicket/cdi/ConversationExpiredException.java |  2 +-
 .../apache/wicket/cdi/ConversationExpiryChecker.java| 12 +++-
 .../org/apache/wicket/cdi/ConversationPropagator.java   |  2 +-
 .../org/apache/wicket/cdi/ConversationalComponent.java  | 10 ++
 6 files changed, 21 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
index 6138ac2..b4186f9 100644
--- 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
+++ 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversation.java
@@ -21,9 +21,9 @@ import javax.enterprise.context.ConversationScoped;
 import org.apache.wicket.util.io.IClusterable;
 
 /**
- * A bean that can be used to override whether the lifecycle of the 
conversation should be managed
- * automatically or not. See {@link 
CdiConfiguration#setAutoConversationManagement(boolean)} for
- * details.
+ * A bean that can be used to override whether the lifecycle of the 
conversation
+ * should be managed automatically or not. See
+ * {@link CdiConfiguration#setAutoConversationManagement(boolean)} for details.
  * 
  * @author igor
  */
@@ -31,7 +31,7 @@ import org.apache.wicket.util.io.IClusterable;
 public class AutoConversation implements IClusterable
 {
private static final long serialVersionUID = 1L;
-   
+
private boolean automatic;
 
public AutoConversation()

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
index d9051ba..9220718 100644
--- 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
+++ 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/BeanManagerLookup.java
@@ -27,7 +27,8 @@ public final class BeanManagerLookup
{
}
 
-   public static BeanManager lookup() {
+   public static BeanManager lookup()
+   {
try
{
return InitialContext.doLookup("java:comp/BeanManager");

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
index a9c7eb1..16df7b1 100644
--- 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
+++ 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiredException.java
@@ -27,7 +27,7 @@ public class ConversationExpiredException extends 
RuntimeException
private IRequestHandler handler;
 
public ConversationExpiredException(Throwable cause, String cid, Page 
page,
-   IRequestHandler handler)
+   IRequestHandler handler)
{
super(cause);
this.cid = cid;

http://git-wip-us.apache.org/repos/asf/wicket/blob/4e161cbc/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/ConversationExpiryChecker.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/Conversati

[4/4] git commit: Fixed auto conversations

2013-11-26 Thread papegaaij
Fixed auto conversations


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

Branch: refs/heads/wicket-6.x
Commit: 5133c7587143d53d3228ddb77f28f21d64810dfe
Parents: 6189a89
Author: Emond Papegaaij 
Authored: Tue Nov 26 07:50:37 2013 +0100
Committer: Emond Papegaaij 
Committed: Tue Nov 26 09:09:16 2013 +0100

--
 .../wicket/cdi/AutoConversationManager.java | 120 +++
 .../org/apache/wicket/cdi/CdiConfiguration.java |   6 +-
 .../wicket/cdi/ConversationPropagator.java  |  81 +
 3 files changed, 128 insertions(+), 79 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/5133c758/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
--
diff --git 
a/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
new file mode 100644
index 000..5b88365
--- /dev/null
+++ 
b/wicket-experimental/wicket-cdi-1.1/src/main/java/org/apache/wicket/cdi/AutoConversationManager.java
@@ -0,0 +1,120 @@
+/*
+ * 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.cdi;
+
+import javax.enterprise.context.Conversation;
+import javax.inject.Inject;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.application.IComponentOnBeforeRenderListener;
+import org.apache.wicket.request.IRequestHandler;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.util.visit.IVisit;
+import org.apache.wicket.util.visit.IVisitor;
+import org.apache.wicket.util.visit.Visits;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Automatically starts and ends conversations for pages with a
+ * {@link ConversationalComponent}.
+ * 
+ * @author papegaaij
+ */
+public class AutoConversationManager implements 
IComponentOnBeforeRenderListener
+{
+   private static final Logger logger = 
LoggerFactory.getLogger(AutoConversationManager.class);
+
+   @Inject
+   private Conversation conversation;
+
+   @Inject
+   private AutoConversation autoConversation;
+
+   private IConversationPropagation propagation;
+
+   public AutoConversationManager(IConversationPropagation propagation)
+   {
+   NonContextual.of(AutoConversationManager.class).inject(this);
+   this.propagation = propagation;
+   }
+
+   @Override
+   public void onBeforeRender(Component component)
+   {
+   if (component instanceof Page)
+   {
+   Page page = (Page)component;
+   autoEndIfNecessary(page, 
RequestCycle.get().getActiveRequestHandler());
+   autoBeginIfNecessary(page, 
RequestCycle.get().getActiveRequestHandler());
+   }
+   }
+
+   protected void autoBeginIfNecessary(Page page, IRequestHandler handler)
+   {
+   if (conversation == null || !conversation.isTransient() || page 
== null
+   || !hasConversationalComponent(page) || 
!propagation.propagatesVia(handler, page))
+   {
+   return;
+   }
+
+   // auto activate conversation
+
+   conversation.begin();
+   autoConversation.setAutomatic(true);
+
+   logger.debug("Auto-began conversation {} for page {}", 
conversation.getId(), page);
+   }
+
+   protected void autoEndIfNecessary(Page page, IRequestHandler handler)
+   {
+   if (conversation == null || conversation.isTransient() || page 
== null
+   || hasConversationalComponent(page) || 
!propagation.propagatesVia(handler,

[1/4] git commit: Upgrade atmosphere to 2.0.4 and js to 2.0.8

2013-11-26 Thread papegaaij
Updated Branches:
  refs/heads/wicket-6.x 6189a89d0 -> 3239c8d00


Upgrade atmosphere to 2.0.4 and js to 2.0.8


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

Branch: refs/heads/wicket-6.x
Commit: 3239c8d0096045c3d3faeab724ec9b4769e829aa
Parents: 4e161cb
Author: Emond Papegaaij 
Authored: Tue Nov 26 09:08:59 2013 +0100
Committer: Emond Papegaaij 
Committed: Tue Nov 26 09:09:16 2013 +0100

--
 wicket-experimental/wicket-atmosphere/pom.xml   |   2 +-
 .../wicket/atmosphere/jquery.atmosphere.js  | 134 ++-
 2 files changed, 99 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/3239c8d0/wicket-experimental/wicket-atmosphere/pom.xml
--
diff --git a/wicket-experimental/wicket-atmosphere/pom.xml 
b/wicket-experimental/wicket-atmosphere/pom.xml
index 2be87d5..fb412e7 100644
--- a/wicket-experimental/wicket-atmosphere/pom.xml
+++ b/wicket-experimental/wicket-atmosphere/pom.xml
@@ -27,7 +27,7 @@
0.16-SNAPSHOT
jar

-   2.0.0
+   2.0.4

Wicket-Atmosphere
Wicket-Atmosphere provides integration of the Atmosphere 
Framework in Wicket.

http://git-wip-us.apache.org/repos/asf/wicket/blob/3239c8d0/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
--
diff --git 
a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
 
b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
index b909609..701a586 100644
--- 
a/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
+++ 
b/wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.atmosphere.js
@@ -1,5 +1,5 @@
 /**
- * Copyright 2012 Jeanfrancois Arcand
+ * Copyright 2013 Jeanfrancois Arcand
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,8 @@ jQuery.atmosphere = function () {
 };
 
 return {
-version: "2.0.3-jquery",
+version: "2.0.8-jquery",
+uuid : 0,
 requests: [],
 callbacks: [],
 
@@ -166,7 +167,7 @@ jQuery.atmosphere = function () {
 request: null,
 partialMessage: "",
 errorHandled: false,
-id: 0
+closedByClientTimeout: false
 };
 
 /**
@@ -256,6 +257,9 @@ jQuery.atmosphere = function () {
 /** Trace time */
 var _traceTimer;
 
+/** Key for connection sharing */
+var _sharingKey;
+
 // Automatic call to subscribe
 _subscribe(options);
 
@@ -352,9 +356,11 @@ jQuery.atmosphere = function () {
 }
 
 // Protocol
-_request.firstMessage = true;
+_request.firstMessage = jQuery.atmosphere.uuid == 0 ? true : 
false;
 _request.isOpen = false;
 _request.ctime = jQuery.now();
+_request.uuid = jQuery.atmosphere.uuid;
+_request.closedByClientTimeout = false;
 
 if (_request.transport !== 'websocket' && _request.transport 
!== 'sse') {
 _executeRequest(_request);
@@ -679,13 +685,13 @@ jQuery.atmosphere = function () {
 };
 
 function leaveTrace() {
-document.cookie = encodeURIComponent(name) + "=" +
+document.cookie = _sharingKey + "=" +
 // Opera's JSON implementation ignores a number whose 
a last digit of 0 strangely
 // but has no problem with a number whose a last digit 
of 9 + 1
 encodeURIComponent(jQuery.stringifyJSON({
 ts: jQuery.now() + 1,
 heir: (storageService.get("children") || [])[0]
-}));
+})) + "; path=/";
 }
 
 // Chooses a storageService
@@ -704,6 +710,7 @@ jQuery.atmosphere = function () {
 storageService.set("opened", false);
 }
 // Leaves traces
+_sharingKey = encodeURIComponent(name);
 leaveTrace();
 _traceTimer = setInterval(leaveTrace, 1000);
 
@@ -780,8 +787,17 @@ jQuery.atmosph