[jira] [Created] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Emond Papegaaij (Created) (JIRA)
Rerendering a page with WicketTester after you loose permission does not give 
access-denied
---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij


Since WICKET-4256 WicketTester does not give an access-denied page when you try 
to rerender a page instance after loosing permission to render that page. A 
testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate the 
problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: WICKET-4340: testcase that rerenders a page after loosing permission, should give access-denied

2012-01-17 Thread papegaaij
Updated Branches:
  refs/heads/master bb10af303 - 85fc48604


WICKET-4340: testcase that rerenders a page after loosing permission, should 
give access-denied


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

Branch: refs/heads/master
Commit: 85fc48604359d1e1cb2aada21eb5a851d9214ceb
Parents: bb10af3
Author: Emond Papegaaij papega...@apache.org
Authored: Tue Jan 17 08:59:27 2012 +0100
Committer: Emond Papegaaij papega...@apache.org
Committed: Tue Jan 17 08:59:40 2012 +0100

--
 .../wicket/util/tester/WicketTesterTest.java   |   43 +++
 1 files changed, 43 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/85fc4860/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
index ff87989..93dd40e 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
@@ -23,6 +23,7 @@ import java.util.Locale;
 import javax.servlet.http.Cookie;
 
 import junit.framework.AssertionFailedError;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.MockPageParametersAware;
 import org.apache.wicket.MockPageWithLink;
@@ -34,6 +35,9 @@ import org.apache.wicket.WicketTestCase;
 import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authorization.Action;
+import org.apache.wicket.authorization.IAuthorizationStrategy;
+import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.FormComponent;
@@ -44,6 +48,7 @@ import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestParameters;
 import org.apache.wicket.request.Url;
+import org.apache.wicket.request.component.IRequestableComponent;
 import org.apache.wicket.request.handler.BookmarkablePageRequestHandler;
 import org.apache.wicket.request.handler.IPageProvider;
 import org.apache.wicket.request.handler.PageProvider;
@@ -62,6 +67,7 @@ import org.apache.wicket.util.tester.apps_1.ViewBook;
 import org.apache.wicket.util.tester.apps_6.LinkPage;
 import org.apache.wicket.util.tester.apps_6.ResultPage;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -1120,4 +1126,41 @@ public class WicketTesterTest extends WicketTestCase
// assert that the cookie is not preserved for the next request 
cycle
assertNull(tester.getRequest().getCookies());
}
+
+
+   /**
+* Tests if the access-denied-page is rendered if a page is rerendered 
for which you don't have
+* permission anymore
+*/
+   @Test
+   @Ignore
+   public void rerenderNotAllowed()
+   {
+   class YesNoPageAuthorizationStrategy implements 
IAuthorizationStrategy
+   {
+   private boolean allowed = true;
+
+   @Override
+   public T extends IRequestableComponent boolean 
isInstantiationAuthorized(
+   ClassT componentClass)
+   {
+   return allowed || 
!WebPage.class.isAssignableFrom(componentClass);
+   }
+
+   @Override
+   public boolean isActionAuthorized(Component component, 
Action action)
+   {
+   return allowed || !(component instanceof 
WebPage);
+   }
+   }
+   YesNoPageAuthorizationStrategy strategy = new 
YesNoPageAuthorizationStrategy();
+   
tester.getApplication().getSecuritySettings().setAuthorizationStrategy(strategy);
+   DummyHomePage start = tester.startPage(DummyHomePage.class);
+   tester.assertRenderedPage(DummyHomePage.class);
+   strategy.allowed = false;
+   tester.startPage(start);
+   tester.assertRenderedPage(tester.getApplication()
+   .getApplicationSettings()
+   .getAccessDeniedPage());
+   }
 }



[jira] [Updated] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Emond Papegaaij (Updated) (JIRA)

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

Emond Papegaaij updated WICKET-4340:


Attachment: quickstart-4340.tar.bz2

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij
 Attachments: quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Martin Grigorov (Updated) (JIRA)

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

Martin Grigorov updated WICKET-4340:


Attachment: WICKET-4340.patch

A patch that fixes the problem.
It moves the check for isActionAuthorized(RENDER) to Page#onConfigure() 
instead of #onBeforeRender() because the latter is not called anymore in such 
cases.

Igor, please review.

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij
 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Emond Papegaaij (Updated) (JIRA)

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

Emond Papegaaij updated WICKET-4340:


Affects Version/s: 1.4.20

Probably applies to 1.4 as well. I did not test it on 1.4, but the patch for 
WICKET-4256 got backported to 1.4.

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.4.20, 1.5.4, 6.0.0
Reporter: Emond Papegaaij
 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[2/2] git commit: WICKET-4340: move render allowed check to onConfigure, onBeforeRender is not called

2012-01-17 Thread papegaaij
WICKET-4340: move render allowed check to onConfigure, onBeforeRender is not 
called


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

Branch: refs/heads/master
Commit: 565ea73efd0634fb4cc24e0a22396a6a2d907293
Parents: 85fc486
Author: Emond Papegaaij papega...@apache.org
Authored: Tue Jan 17 10:07:16 2012 +0100
Committer: Emond Papegaaij papega...@apache.org
Committed: Tue Jan 17 10:07:16 2012 +0100

--
 .../src/main/java/org/apache/wicket/Page.java  |   18 ++-
 1 files changed, 12 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/565ea73e/wicket-core/src/main/java/org/apache/wicket/Page.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Page.java 
b/wicket-core/src/main/java/org/apache/wicket/Page.java
index 57d2b45..34399c0 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Page.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Page.java
@@ -770,13 +770,11 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
});
}
 
-   /**
-* 
-* @see org.apache.wicket.Component#onBeforeRender()
-*/
@Override
-   protected void onBeforeRender()
+   protected void onConfigure()
{
+   super.onConfigure();
+
// first try to check if the page can be rendered:
if (!isActionAuthorized(RENDER))
{
@@ -786,7 +784,15 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
}
throw new UnauthorizedActionException(this, 
Component.RENDER);
}
-
+   }
+
+   /**
+* 
+* @see org.apache.wicket.Component#onBeforeRender()
+*/
+   @Override
+   protected void onBeforeRender()
+   {
// Make sure it is really empty
renderedComponents = null;
 



[1/2] git commit: WICKET-4340: fix testcase to actually pass with ticket fixed

2012-01-17 Thread papegaaij
Updated Branches:
  refs/heads/master 85fc48604 - f7955440c


WICKET-4340: fix testcase to actually pass with ticket fixed


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

Branch: refs/heads/master
Commit: f7955440cc8fc9d240a95c23ef23cb24c304aace
Parents: 565ea73
Author: Emond Papegaaij papega...@apache.org
Authored: Tue Jan 17 10:07:40 2012 +0100
Committer: Emond Papegaaij papega...@apache.org
Committed: Tue Jan 17 10:07:40 2012 +0100

--
 .../wicket/util/tester/WicketTesterTest.java   |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f7955440/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
index 93dd40e..c539a52 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
@@ -43,6 +43,7 @@ import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.pages.AccessDeniedPage;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.request.IRequestHandler;
@@ -67,7 +68,6 @@ import org.apache.wicket.util.tester.apps_1.ViewBook;
 import org.apache.wicket.util.tester.apps_6.LinkPage;
 import org.apache.wicket.util.tester.apps_6.ResultPage;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -1133,9 +1133,9 @@ public class WicketTesterTest extends WicketTestCase
 * permission anymore
 */
@Test
-   @Ignore
public void rerenderNotAllowed()
{
+   tester.setExposeExceptions(false);
class YesNoPageAuthorizationStrategy implements 
IAuthorizationStrategy
{
private boolean allowed = true;
@@ -1144,12 +1144,16 @@ public class WicketTesterTest extends WicketTestCase
public T extends IRequestableComponent boolean 
isInstantiationAuthorized(
ClassT componentClass)
{
+   if (componentClass == AccessDeniedPage.class)
+   return true;
return allowed || 
!WebPage.class.isAssignableFrom(componentClass);
}
 
@Override
public boolean isActionAuthorized(Component component, 
Action action)
{
+   if (component instanceof AccessDeniedPage)
+   return true;
return allowed || !(component instanceof 
WebPage);
}
}



[1/2] git commit: Merge remote-tracking branch 'origin/master'

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master f7955440c - 0e119b2db


Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/master
Commit: 0e119b2dbe452f4a130739af768880748f14bdf0
Parents: b29dbc0 f795544
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 10:25:03 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 10:25:03 2012 +0100

--
 .../src/main/java/org/apache/wicket/Page.java  |   18 ++-
 .../wicket/util/tester/WicketTesterTest.java   |8 +-
 2 files changed, 18 insertions(+), 8 deletions(-)
--




[2/2] git commit: WICKET-4337 deprecate start panel in 1.5.x

2012-01-17 Thread mgrigorov
WICKET-4337
deprecate start panel in 1.5.x

Remove BaseWicketTester#startPanel(Class) in 6.0


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

Branch: refs/heads/master
Commit: b29dbc0f95cd53dac6c006b1e4119139440d9dc5
Parents: 85fc486
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 10:24:50 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 10:24:50 2012 +0100

--
 .../wicket/util/tester/BaseWicketTester.java   |   19 ---
 .../wicket/markup/html/panel/FragmentTestCase.java |2 +-
 .../apache/wicket/markup/html/panel/PanelTest.java |2 +-
 3 files changed, 2 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b29dbc0f/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 94f4b50..1ace0d4 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
@@ -1152,25 +1152,6 @@ public class BaseWicketTester
}
 
/**
-* Renders a codePanel/code from a codePanel(String id)/code 
constructor.
-* p
-* Note that when try to access a component, e.g. via accessLabel(), 
the 'path' parameter must
-* be relative to the panel. Not relative to the Page which will 
automatically be added for you.
-* 
-* @param C
-*the type of the component
-* @param panelClass
-*a test codePanel/code class with codePanel(String 
id)/code constructor
-* @return a rendered codePanel/code
-*/
-   public final C extends Panel C startPanel(final ClassC panelClass)
-   {
-   Args.notNull(panelClass, panelClass);
-
-   return startComponentInPage(panelClass, null);
-   }
-
-   /**
 * Process a component. A web page will be automatically created with 
the markup created in
 * {@link #createPageMarkup(String)}.
 * 

http://git-wip-us.apache.org/repos/asf/wicket/blob/b29dbc0f/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/FragmentTestCase.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/FragmentTestCase.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/FragmentTestCase.java
index c9f69cc..7ea378b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/FragmentTestCase.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/FragmentTestCase.java
@@ -28,6 +28,6 @@ public class FragmentTestCase extends WicketTestCase
 */
public void testFragments()
{
-   tester.startPanel(FragmentTestPanel.class);
+   tester.startComponentInPage(FragmentTestPanel.class);
}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/b29dbc0f/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/PanelTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/PanelTest.java 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/PanelTest.java
index 1f6314b..50a4301 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/PanelTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/PanelTest.java
@@ -189,7 +189,7 @@ public class PanelTest extends WicketTestCase
@Test
public void startPanel()
{
-   tester.startPanel(MyPanel.class);
+   tester.startComponentInPage(MyPanel.class);
tester.assertLabel(label, Hello, World!);
}
 }



git commit: WICKET-4340: move render allowed check to onConfigure, onBeforeRender is not called

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master 0e119b2db - 7dca2f7ce


WICKET-4340: move render allowed check to onConfigure, onBeforeRender is not 
called

Fix indenting - use tabs.


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

Branch: refs/heads/master
Commit: 7dca2f7ce4309cd5bb367ff5dbeacddd1cb06698
Parents: 0e119b2
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 10:28:16 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 10:28:16 2012 +0100

--
 .../src/main/java/org/apache/wicket/Page.java  |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/7dca2f7c/wicket-core/src/main/java/org/apache/wicket/Page.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Page.java 
b/wicket-core/src/main/java/org/apache/wicket/Page.java
index 34399c0..24845dd 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Page.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Page.java
@@ -771,9 +771,9 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
}
 
@Override
-   protected void onConfigure()
+   protected void onConfigure()
{
-   super.onConfigure();
+   super.onConfigure();
 
// first try to check if the page can be rendered:
if (!isActionAuthorized(RENDER))
@@ -784,15 +784,15 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
}
throw new UnauthorizedActionException(this, 
Component.RENDER);
}
-   }
-
-   /**
-* 
-* @see org.apache.wicket.Component#onBeforeRender()
-*/
-   @Override
-   protected void onBeforeRender()
-   {
+   }
+
+   /**
+*
+* @see org.apache.wicket.Component#onBeforeRender()
+*/
+   @Override
+   protected void onBeforeRender()
+   {
// Make sure it is really empty
renderedComponents = null;
 



[1/2] git commit: Merge remote-tracking branch 'origin/wicket-1.5.x' into wicket-1.5.x

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-1.5.x a66d71026 - 87245722e


Merge remote-tracking branch 'origin/wicket-1.5.x' into wicket-1.5.x


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

Branch: refs/heads/wicket-1.5.x
Commit: 87245722e79902b055762e00316044549c8262eb
Parents: b589220 a66d710
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 10:31:09 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 10:31:09 2012 +0100

--
 CHANGELOG-1.5 |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)
--




[2/2] git commit: WICKET-4337 deprecate start panel in 1.5.x

2012-01-17 Thread mgrigorov
WICKET-4337
deprecate start panel in 1.5.x


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

Branch: refs/heads/wicket-1.5.x
Commit: b589220db4f212b9f14cd1513472b5e1eda53e16
Parents: d1a75e4
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 10:31:05 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 10:31:05 2012 +0100

--
 .../wicket/util/tester/BaseWicketTester.java   |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b589220d/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 6b6f56a..5cf67ff 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
@@ -1257,7 +1257,9 @@ public class BaseWicketTester
 * @param panelClass
 *a test codePanel/code class with codePanel(String 
id)/code constructor
 * @return a rendered codePanel/code
+* @deprecated Use startComponentInPage(Class) instead
 */
+   @Deprecated
public final C extends Panel C startPanel(final ClassC panelClass)
{
Args.notNull(panelClass, panelClass);



[jira] [Resolved] (WICKET-4337) deprecate start panel in 1.5.x

2012-01-17 Thread Martin Grigorov (Resolved) (JIRA)

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

Martin Grigorov resolved WICKET-4337.
-

   Resolution: Fixed
Fix Version/s: 1.5.4
   6.0.0
 Assignee: Martin Grigorov

 deprecate start panel in 1.5.x
 --

 Key: WICKET-4337
 URL: https://issues.apache.org/jira/browse/WICKET-4337
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.5.4
Reporter: vineet semwal
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 6.0.0, 1.5.4

 Attachments: deprecate-startpanel.patch


 wickettester.startpanel(*) should be completely deprecated as we have 
 tester.startcomponentinpage(*),startpanel kind of confuses users as they 
 start thinking panel should be treated differently ,martin-g also feels that 
 it should be deprecated,i am providing the patch.
 thanks 
 Vineet Semwal

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4334) Prevent Wicket from causing redundant download of stateless resources (.js, .css etc.,) on browser with cookies enabled

2012-01-17 Thread Chris Colman (Commented) (JIRA)

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

Chris Colman commented on WICKET-4334:
--

While it's great wicket now renders static resource links without jsessionidS 
when such a resource is requested Wicket still attempts to establish a session 
when servicing requests for such a static resource according to the stack trace.

I analyzed the stack trace and there is no direct attempt to explicitly 
establish a session but there is an implicit session establishment via a call 
to getSessionId. I doubt that call is needed to service a request for static 
resource.

I wasn't sure if this should be entered as a separate issue or a continuance of 
this one.

 Prevent Wicket from causing redundant download of stateless resources (.js, 
 .css etc.,) on browser with cookies enabled
 ---

 Key: WICKET-4334
 URL: https://issues.apache.org/jira/browse/WICKET-4334
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.4.19, 1.5.4
 Environment: Client browser with cookies enabled.
Reporter: Chris Colman
Assignee: Martin Grigorov
  Labels: performance, wicket
 Fix For: 1.5.4, 6.0.0


 A jsessionid is added to package resource links of the first page visited, 
 most of which are static and don't need session info for them to be rendered. 
 For a new session in a browser with cookies enabled this causes a 'double 
 load' of every package resource: once for the initial page (with jsessionid 
 added) and again for the subsequent page (with no jsessionid added).
 Each time the user revisits the site with their previous session expired 
 another (redundant) download of the package resources will occur (because 
 they have a different jsessionid suffix)
 Examining the IE cache we can see that both the jsessionid suffixed version 
 and the version without the jsessionid suffix have both been cached as it 
 treats each as individual resources.
 This will cause a performance hit for users visiting a Wicket site for the 
 first and subsequent times (after cookie expiration) on most average ADSL 
 connections and might have an impact on bandwidth demand/cost on extremely 
 busy Wicket powered web servers.
 Possible solution:
 Wicket always renders stateless resources without any jsessionid regardless 
 of whether the page is stateful or stateless. When servicing a request for a 
 resource without a jsessionid Wicket does not attempt to establish a session 
 which avoids creating a Session on every stateless resource request.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (WICKET-4338) POST params ignored by IPageParametersEncoder#decodePageParameters()

2012-01-17 Thread Martin Grigorov (Assigned) (JIRA)

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

Martin Grigorov reassigned WICKET-4338:
---

Assignee: Martin Grigorov

 POST params ignored by IPageParametersEncoder#decodePageParameters()
 

 Key: WICKET-4338
 URL: https://issues.apache.org/jira/browse/WICKET-4338
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.3
 Environment: JDK 1.6.0_29, Mac OSX
Reporter: George Armhold
Assignee: Martin Grigorov
Priority: Minor
 Attachments: missing-params.tar.gz


 As per this conversation: 
 http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-td4295139.html
 it seems that POST params are not properly processed and made available as 
 PageParameters. Can anyone say whether this is intended behavior or not? I 
 will attach a Quickstart to demonstrate.
 Martin's proposed fix is straightforward, but I am not comfortable enough 
 with Wicket internals to say whether or not this would break something.
 Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4334) Prevent Wicket from causing redundant download of stateless resources (.js, .css etc.,) on browser with cookies enabled

2012-01-17 Thread Martin Grigorov (Commented) (JIRA)

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

Martin Grigorov commented on WICKET-4334:
-

What's the stacktrace ?

 Prevent Wicket from causing redundant download of stateless resources (.js, 
 .css etc.,) on browser with cookies enabled
 ---

 Key: WICKET-4334
 URL: https://issues.apache.org/jira/browse/WICKET-4334
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.4.19, 1.5.4
 Environment: Client browser with cookies enabled.
Reporter: Chris Colman
Assignee: Martin Grigorov
  Labels: performance, wicket
 Fix For: 1.5.4, 6.0.0


 A jsessionid is added to package resource links of the first page visited, 
 most of which are static and don't need session info for them to be rendered. 
 For a new session in a browser with cookies enabled this causes a 'double 
 load' of every package resource: once for the initial page (with jsessionid 
 added) and again for the subsequent page (with no jsessionid added).
 Each time the user revisits the site with their previous session expired 
 another (redundant) download of the package resources will occur (because 
 they have a different jsessionid suffix)
 Examining the IE cache we can see that both the jsessionid suffixed version 
 and the version without the jsessionid suffix have both been cached as it 
 treats each as individual resources.
 This will cause a performance hit for users visiting a Wicket site for the 
 first and subsequent times (after cookie expiration) on most average ADSL 
 connections and might have an impact on bandwidth demand/cost on extremely 
 busy Wicket powered web servers.
 Possible solution:
 Wicket always renders stateless resources without any jsessionid regardless 
 of whether the page is stateful or stateless. When servicing a request for a 
 resource without a jsessionid Wicket does not attempt to establish a session 
 which avoids creating a Session on every stateless resource request.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: WICKET-4338 POST params ignored by IPageParametersEncoder#decodePageParameters()

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-1.5.x 87245722e - 426d0f708


WICKET-4338
POST params ignored by IPageParametersEncoder#decodePageParameters()


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

Branch: refs/heads/wicket-1.5.x
Commit: 426d0f708f0a8b9fcf8701bda26a6609631b230b
Parents: 8724572
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 11:12:35 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 11:12:35 2012 +0100

--
 .../mapper/parameter/PageParametersEncoder.java|   15 ++-
 .../parameter/UrlPathPageParametersEncoder.java|3 +
 .../CombinedRequestParametersAdapter.java  |   10 +-
 .../parameter/UrlRequestParametersAdapter.java |4 +-
 .../parameter/PageParametersEncoderTest.java   |  126 +++
 5 files changed, 147 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/426d0f70/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
index 2312995..5687a71 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
@@ -16,9 +16,13 @@
  */
 package org.apache.wicket.request.mapper.parameter;
 
+import java.util.List;
+
+import org.apache.wicket.request.IRequestParameters;
 import org.apache.wicket.request.Request;
 import org.apache.wicket.request.Url;
 import org.apache.wicket.request.Url.QueryParameter;
+import org.apache.wicket.util.string.StringValue;
 
 /**
  * Simple encoder with direct indexed/named parameters mapping.
@@ -47,10 +51,15 @@ public class PageParametersEncoder implements 
IPageParametersEncoder
parameters.set(i, s);
++i;
}
-
-   for (QueryParameter p : request.getUrl().getQueryParameters())
+   
+   IRequestParameters requestParameters = 
request.getRequestParameters();
+   for (String paramName : requestParameters.getParameterNames())
{
-   parameters.add(p.getName(), p.getValue());
+   ListStringValue parameterValues = 
requestParameters.getParameterValues(paramName);
+   for (StringValue paramValue : parameterValues)
+   {
+   parameters.add(paramName, paramValue);
+   }
}
 
return parameters.isEmpty() ? null : parameters;

http://git-wip-us.apache.org/repos/asf/wicket/blob/426d0f70/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
index db3ea51..f31f5c1 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
@@ -25,9 +25,12 @@ import org.apache.wicket.util.string.Strings;
 
 
 /**
+ * p
  * Encodes page parameters into Url path fragments instead of the query string 
like the default
  * {@link PageParametersEncoder}. The parameters are encoded in the following 
format:
  * {@code /param1Name/param1Value/param2Name/param2Value}.
+ * /p
+ * strongNote/strong: Because of the nature of the encoder it doesn't 
support POST request parameters.
  * p
  * This used to be the default way of encoding page parameters in 1.4.x 
applications. Newer 1.5.x+
  * applications use the query string, by default. This class facilitates 
backwards compatibility and

http://git-wip-us.apache.org/repos/asf/wicket/blob/426d0f70/wicket-request/src/main/java/org/apache/wicket/request/parameter/CombinedRequestParametersAdapter.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/parameter/CombinedRequestParametersAdapter.java
 

git commit: WICKET-4338 POST params ignored by IPageParametersEncoder#decodePageParameters()

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master 7dca2f7ce - 9decad35f


WICKET-4338
POST params ignored by IPageParametersEncoder#decodePageParameters()


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

Branch: refs/heads/master
Commit: 9decad35f38f778517473c08d713985ca8bf6d7c
Parents: 7dca2f7
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 11:12:35 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 11:13:24 2012 +0100

--
 .../mapper/parameter/PageParametersEncoder.java|   15 ++-
 .../parameter/UrlPathPageParametersEncoder.java|3 +
 .../CombinedRequestParametersAdapter.java  |   10 +-
 .../parameter/UrlRequestParametersAdapter.java |4 +-
 .../parameter/PageParametersEncoderTest.java   |  126 +++
 5 files changed, 147 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9decad35/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
index 2312995..5687a71 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/PageParametersEncoder.java
@@ -16,9 +16,13 @@
  */
 package org.apache.wicket.request.mapper.parameter;
 
+import java.util.List;
+
+import org.apache.wicket.request.IRequestParameters;
 import org.apache.wicket.request.Request;
 import org.apache.wicket.request.Url;
 import org.apache.wicket.request.Url.QueryParameter;
+import org.apache.wicket.util.string.StringValue;
 
 /**
  * Simple encoder with direct indexed/named parameters mapping.
@@ -47,10 +51,15 @@ public class PageParametersEncoder implements 
IPageParametersEncoder
parameters.set(i, s);
++i;
}
-
-   for (QueryParameter p : request.getUrl().getQueryParameters())
+   
+   IRequestParameters requestParameters = 
request.getRequestParameters();
+   for (String paramName : requestParameters.getParameterNames())
{
-   parameters.add(p.getName(), p.getValue());
+   ListStringValue parameterValues = 
requestParameters.getParameterValues(paramName);
+   for (StringValue paramValue : parameterValues)
+   {
+   parameters.add(paramName, paramValue);
+   }
}
 
return parameters.isEmpty() ? null : parameters;

http://git-wip-us.apache.org/repos/asf/wicket/blob/9decad35/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
index db3ea51..f31f5c1 100644
--- 
a/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
+++ 
b/wicket-request/src/main/java/org/apache/wicket/request/mapper/parameter/UrlPathPageParametersEncoder.java
@@ -25,9 +25,12 @@ import org.apache.wicket.util.string.Strings;
 
 
 /**
+ * p
  * Encodes page parameters into Url path fragments instead of the query string 
like the default
  * {@link PageParametersEncoder}. The parameters are encoded in the following 
format:
  * {@code /param1Name/param1Value/param2Name/param2Value}.
+ * /p
+ * strongNote/strong: Because of the nature of the encoder it doesn't 
support POST request parameters.
  * p
  * This used to be the default way of encoding page parameters in 1.4.x 
applications. Newer 1.5.x+
  * applications use the query string, by default. This class facilitates 
backwards compatibility and

http://git-wip-us.apache.org/repos/asf/wicket/blob/9decad35/wicket-request/src/main/java/org/apache/wicket/request/parameter/CombinedRequestParametersAdapter.java
--
diff --git 
a/wicket-request/src/main/java/org/apache/wicket/request/parameter/CombinedRequestParametersAdapter.java
 

[jira] [Resolved] (WICKET-4338) POST params ignored by IPageParametersEncoder#decodePageParameters()

2012-01-17 Thread Martin Grigorov (Resolved) (JIRA)

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

Martin Grigorov resolved WICKET-4338.
-

   Resolution: Fixed
Fix Version/s: 1.5.4
   6.0.0

 POST params ignored by IPageParametersEncoder#decodePageParameters()
 

 Key: WICKET-4338
 URL: https://issues.apache.org/jira/browse/WICKET-4338
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.3
 Environment: JDK 1.6.0_29, Mac OSX
Reporter: George Armhold
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 6.0.0, 1.5.4

 Attachments: missing-params.tar.gz


 As per this conversation: 
 http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-td4295139.html
 it seems that POST params are not properly processed and made available as 
 PageParameters. Can anyone say whether this is intended behavior or not? I 
 will attach a Quickstart to demonstrate.
 Martin's proposed fix is straightforward, but I am not comfortable enough 
 with Wicket internals to say whether or not this would break something.
 Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (WICKET-4341) Autocomplete dropdown's position is wrong when placed inside scrollable div but with position:static

2012-01-17 Thread Michal Waciega (Created) (JIRA)
Autocomplete dropdown's position is wrong when placed inside scrollable div but 
with position:static


 Key: WICKET-4341
 URL: https://issues.apache.org/jira/browse/WICKET-4341
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.4.19
Reporter: Michal Waciega
Priority: Minor


Function getPosition(obj) of wicket-autocomplete.js takes into account only 
those DOM path elements which are offset parents. Result is wrong when there 
are also elements that arent positioned (not being offset parents), but with 
overflow (scrollbars present). These scrollbar offsets aren't taken into 
account, so final result returned is wrong.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (WICKET-4341) Autocomplete dropdown's position is wrong when placed inside scrollable div but with position:static

2012-01-17 Thread Michal Waciega (Updated) (JIRA)

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

Michal Waciega updated WICKET-4341:
---

Attachment: wicket-autocomplete-positioning-1.4.19.patch

Proposal of change

 Autocomplete dropdown's position is wrong when placed inside scrollable div 
 but with position:static
 

 Key: WICKET-4341
 URL: https://issues.apache.org/jira/browse/WICKET-4341
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.4.19
Reporter: Michal Waciega
Priority: Minor
  Labels: patch
 Attachments: wicket-autocomplete-positioning-1.4.19.patch


 Function getPosition(obj) of wicket-autocomplete.js takes into account only 
 those DOM path elements which are offset parents. Result is wrong when there 
 are also elements that arent positioned (not being offset parents), but with 
 overflow (scrollbars present). These scrollbar offsets aren't taken into 
 account, so final result returned is wrong.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (WICKET-4341) Autocomplete dropdown's position is wrong when placed inside scrollable div but with position:static

2012-01-17 Thread Martin Grigorov (Assigned) (JIRA)

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

Martin Grigorov reassigned WICKET-4341:
---

Assignee: Johan Compagner

Johan, you often fix similar problems in this code. Can you review ?

 Autocomplete dropdown's position is wrong when placed inside scrollable div 
 but with position:static
 

 Key: WICKET-4341
 URL: https://issues.apache.org/jira/browse/WICKET-4341
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.4.19
Reporter: Michal Waciega
Assignee: Johan Compagner
Priority: Minor
  Labels: patch
 Attachments: wicket-autocomplete-positioning-1.4.19.patch


 Function getPosition(obj) of wicket-autocomplete.js takes into account only 
 those DOM path elements which are offset parents. Result is wrong when there 
 are also elements that arent positioned (not being offset parents), but with 
 overflow (scrollbars present). These scrollbar offsets aren't taken into 
 account, so final result returned is wrong.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (WICKET-4341) Autocomplete dropdown's position is wrong when placed inside scrollable div but with position:static

2012-01-17 Thread Michal Waciega (Updated) (JIRA)

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

Michal Waciega updated WICKET-4341:
---

Attachment: mvn-startup-project.zip

Startup maven project for reproducing the issue.

 Autocomplete dropdown's position is wrong when placed inside scrollable div 
 but with position:static
 

 Key: WICKET-4341
 URL: https://issues.apache.org/jira/browse/WICKET-4341
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.4.19
Reporter: Michal Waciega
Assignee: Johan Compagner
Priority: Minor
  Labels: patch
 Attachments: mvn-startup-project.zip, 
 wicket-autocomplete-positioning-1.4.19.patch


 Function getPosition(obj) of wicket-autocomplete.js takes into account only 
 those DOM path elements which are offset parents. Result is wrong when there 
 are also elements that arent positioned (not being offset parents), but with 
 overflow (scrollbars present). These scrollbar offsets aren't taken into 
 account, so final result returned is wrong.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: WICKET-3367 Rewrite all JavaScript inline event handlers to be proper attached event handlers

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master 9decad35f - 16e659316


WICKET-3367
Rewrite all JavaScript inline event handlers to be proper attached event 
handlers

The Ajax calls should be asynchronous by default


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

Branch: refs/heads/master
Commit: 16e659316a38bf5d7b0c6d11909a8ce22d0f2f7f
Parents: 9decad3
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 15:39:48 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 15:39:48 2012 +0100

--
 .../wicket/ajax/res/js/wicket-ajax-jquery.js   |4 ++--
 wicket-core/src/test/js/ajax.js|2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/16e65931/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index c4b2418..c79a10f 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -347,8 +347,8 @@
attrs.m = 'GET';
}
 
-   if (attrs.async !== true) {
-   attrs.async = false;
+   if (attrs.async !== false) {
+   attrs.async = true;
}
 
if (!jQuery.isNumeric(attrs.rt)) {

http://git-wip-us.apache.org/repos/asf/wicket/blob/16e65931/wicket-core/src/test/js/ajax.js
--
diff --git a/wicket-core/src/test/js/ajax.js b/wicket-core/src/test/js/ajax.js
index c877462..d24b092 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -421,7 +421,7 @@ jQuery(document).ready(function() {
deepEqual(attrs.coh, 
attributes.coh, 'complete handlers');
ok(attributes.ep === undefined, 
'extra parameters');
ok(attributes.dep === 
undefined, 'dynamic extra parameters');
-   equal(attributes.async, false, 
'asynchronous');
+   equal(attributes.async, true, 
'asynchronous');
equal(attributes.rt, 0, 
'request timeout');
equal(attributes.ad, false, 
'allow default');
 



[jira] [Created] (WICKET-4342) Allow resources disable the flushing of the response after setting the headers

2012-01-17 Thread Martin Grigorov (Created) (JIRA)
Allow resources disable the flushing of the response after setting the headers
--

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


Currently 
org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() 
flushes the response after setting the headers.
Matej added this with revision da1077e12e690fda9a7f47a745308a156df738bd because:
This is necessary for Firefox if this resource is an image, otherwise it messes 
up other images on page.

In some cases this flush causes troubles because it doesn't allow to reset the 
response in #onWriteCallback().
It will be better if the flushing is configurable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: WICKET-4342 Allow resources disable the flushing of the response after setting the headers

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master 16e659316 - bd11df9eb


WICKET-4342
Allow resources disable the flushing of the response after setting the headers


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

Branch: refs/heads/master
Commit: bd11df9ebb0671eb831679760aab2ff7371361a9
Parents: 16e6593
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 16:34:02 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 16:34:02 2012 +0100

--
 .../wicket/request/resource/AbstractResource.java  |   17 --
 1 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/bd11df9e/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
index daaf541..d0f58b1 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
@@ -607,13 +607,24 @@ public abstract class AbstractResource implements 
IResource
}
 
// 6. Flush the response
-   // This is necessary for firefox if this resource is an 
image, otherwise it messes up
-   // other images on page
-   webResponse.flush();
+   flushResponseAfterHeaders(webResponse);
}
}
 
/**
+* Flushes the response after setting the headers.
+* This is necessary for Firefox if this resource is an image,
+* otherwise it messes up other images on page.
+*
+* @param response
+*  the current web response
+*/
+   protected void flushResponseAfterHeaders(final WebResponse response)
+   {
+   response.flush();
+   }
+
+   /**
 * Callback invoked when resource data needs to be written to response. 
Subclass needs to
 * implement the {@link 
#writeData(org.apache.wicket.request.resource.IResource.Attributes)}
 * method.



git commit: WICKET-4342 Allow resources disable the flushing of the response after setting the headers

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-1.5.x 426d0f708 - ddb89f500


WICKET-4342
Allow resources disable the flushing of the response after setting the headers


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

Branch: refs/heads/wicket-1.5.x
Commit: ddb89f500749ecdb0242894431476076f2cd455f
Parents: 426d0f7
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 16:34:02 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 16:34:38 2012 +0100

--
 .../wicket/request/resource/AbstractResource.java  |   17 --
 1 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ddb89f50/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
index a3ce3da..201e005 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
@@ -606,13 +606,24 @@ public abstract class AbstractResource implements 
IResource
}
 
// 6. Flush the response
-   // This is necessary for firefox if this resource is an 
image, otherwise it messes up
-   // other images on page
-   webResponse.flush();
+   flushResponseAfterHeaders(webResponse);
}
}
 
/**
+* Flushes the response after setting the headers.
+* This is necessary for Firefox if this resource is an image,
+* otherwise it messes up other images on page.
+*
+* @param response
+*  the current web response
+*/
+   protected void flushResponseAfterHeaders(final WebResponse response)
+   {
+   response.flush();
+   }
+
+   /**
 * Callback invoked when resource data needs to be written to response. 
Subclass needs to
 * implement the {@link 
#writeData(org.apache.wicket.request.resource.IResource.Attributes)}
 * method.



[jira] [Resolved] (WICKET-4342) Allow resources disable the flushing of the response after setting the headers

2012-01-17 Thread Martin Grigorov (Resolved) (JIRA)

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

Martin Grigorov resolved WICKET-4342.
-

Resolution: Fixed

 Allow resources disable the flushing of the response after setting the headers
 --

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


 Currently 
 org.apache.wicket.request.resource.AbstractResource#setResponseHeaders() 
 flushes the response after setting the headers.
 Matej added this with revision da1077e12e690fda9a7f47a745308a156df738bd 
 because:
 This is necessary for Firefox if this resource is an image, otherwise it 
 messes up other images on page.
 In some cases this flush causes troubles because it doesn't allow to reset 
 the response in #onWriteCallback().
 It will be better if the flushing is configurable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[CONF] Apache Wicket Wicket Ajax

2012-01-17 Thread confluence







Wicket Ajax
Page edited by Martin Grigorov


Comment:
Explain better the possible ajax request attributes


 Changes (19)
 




...
 The available attributes are: 
- method - the request method to use (GET or POST). Default: GET. - multipart - whether form submittion should use content type: multipart/form-data. Implies POST method. Default: false. 
|| Name || Description || Default value || Short name || | method | the request method to use (GET or POST) | GET | m | | multipart | whether form submittion should use content type: multipart/form-data. Implies POST method | false | mp | 
- | event names - | a list of event names for which the Ajax call will be executed. For example: click, change, keyup, etc. Default: domready. etc.| domready | e | 
- form id - the id of the form which should be submitted with this Ajax call. Default: nothing. - submitting component name - the input name of the component which submits the form. Default: nothing. 
| form id | the id of the form which should be submitted with this Ajax call. | | f | | submitting component name | the input name of the component which submits the form. | | sc | 
- | data type - | what kind of data is expected in the response of the Ajax call (e.g. XML, JSON, HTML, JSONP). Default: xml. | xml | dt | 
- is | wicket ajax response - | a boolean flag which indicates whether the response is ajax-response which is handled by wicket-ajax.js or custom response type which can be handled by applications code (e.g. in IAjaxCallListeners success handler). Default: true. | true | wr | 
- preconditions - a list of _javascript_ function bodies which may abort the Ajax call. Return false from any precondition to abort the call. Default: the element is attached to the document. 
| preconditions | a list of _javascript_ function bodies which may abort the Ajax call. Return false from any precondition to abort the call. | checks that the element is attached to the document | pre | 
- | channel - | the name and type of the Ajax channel to use. Channels are used to queue the Ajax requests at the client side. See org.apache.wicket.ajax.AjaxChannel javadoc for more details. Default: | channel with name 0, and queue behavior. behavior | ch | 
- ajax call listeners - a list of listeners which are called at the most important points of the lifetime of the Ajax call. See below for more information. Default: empty list. 
| ajax call listeners | a list of listeners which are called at the most important points of the lifetime of the Ajax call. See below for more information. | empty list | bh, ah, sh, fh, ch | 
- | extra parameters - | a map of parameters which should be added to the query string/post data of the Ajax call. The name and value of such parameters should be known at the server side. Default: | empty map. map | ep | 
- dynamic extra parameters - parameters which values are calculated at the client side and added dynamically to the query string/post data of the Ajax call. Default: empty list. - request timeout - a timeout to abort the request if there is no response. Default: no timeout. 
| dynamic extra parameters | parameters which values are calculated at the client side and added dynamically to the query string/post data of the Ajax call. | empty list | dep | | request timeout | a timeout to abort the request if there is no response. | 0 (no timeout) | rt | 
- | allow default - | a boolean flag which indicates whether to allow the default behavior of the HTML element which listens for the event. For example: clicking on Ajax checkbox should allow the default behavior to actually check the box. Default: false. | false | ad | 
- async - a flag that indicates whether the Ajax call should be asynchronous or not. Default: true. - throttling settings - settings which define whether the Ajax call should be throttled and for how long. See the javadoc of org.apache.wicket.ajax.attributes.ThrottlingSettings for more information. Default: no throttling. 
| async | a boolean flag that indicates whether the Ajax call should be asynchronous or not. | true | async | | throttling settings | settings which define whether the Ajax call should be throttled and for how long. See the javadoc of org.apache.wicket.ajax.attributes.ThrottlingSettings for more information. | no throttling | tr | 
 
Attributes c (component id) and u (callback url) are automatically set by the Ajax behavior and they are not part of AjaxRequestAttributes. 
 While constructing the _javascript_ that will register the event listener for that Ajax component/behavior these settings are 

git commit: WICKET-3367 Rewrite all JavaScript inline event handlers to be proper attached event handlers

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master bd11df9eb - 972f0dcc0


WICKET-3367
Rewrite all JavaScript inline event handlers to be proper attached event 
handlers

Change flag's value to actually add the separator in the next iteration.


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

Branch: refs/heads/master
Commit: 972f0dcc0a34e3c2f689d9bf5d95ef5db0387b45
Parents: bd11df9
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Tue Jan 17 17:20:30 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Tue Jan 17 17:20:30 2012 +0100

--
 .../wicket/ajax/AbstractDefaultAjaxBehavior.java   |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/972f0dcc/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
index 46702a1..d3b172a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
@@ -465,6 +465,8 @@ public abstract class AbstractDefaultAjaxBehavior extends 
AbstractAjaxBehavior
{
if (!first)
sb.append(,);
+   else
+   first = false;
sb.append(').append(curExtraParameter).append(': 
).append(curExtraParameter);
}
sb.append(};\n);



[jira] [Commented] (WICKET-4334) Prevent Wicket from causing redundant download of stateless resources (.js, .css etc.,) on browser with cookies enabled

2012-01-17 Thread Chris Colman (Commented) (JIRA)

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

Chris Colman commented on WICKET-4334:
--

Found the cause - Everything was working fine in our IDE but problem in 
deployment build meant it pulled old wicket jars!

 Prevent Wicket from causing redundant download of stateless resources (.js, 
 .css etc.,) on browser with cookies enabled
 ---

 Key: WICKET-4334
 URL: https://issues.apache.org/jira/browse/WICKET-4334
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.4.19, 1.5.4
 Environment: Client browser with cookies enabled.
Reporter: Chris Colman
Assignee: Martin Grigorov
  Labels: performance, wicket
 Fix For: 1.5.4, 6.0.0


 A jsessionid is added to package resource links of the first page visited, 
 most of which are static and don't need session info for them to be rendered. 
 For a new session in a browser with cookies enabled this causes a 'double 
 load' of every package resource: once for the initial page (with jsessionid 
 added) and again for the subsequent page (with no jsessionid added).
 Each time the user revisits the site with their previous session expired 
 another (redundant) download of the package resources will occur (because 
 they have a different jsessionid suffix)
 Examining the IE cache we can see that both the jsessionid suffixed version 
 and the version without the jsessionid suffix have both been cached as it 
 treats each as individual resources.
 This will cause a performance hit for users visiting a Wicket site for the 
 first and subsequent times (after cookie expiration) on most average ADSL 
 connections and might have an impact on bandwidth demand/cost on extremely 
 busy Wicket powered web servers.
 Possible solution:
 Wicket always renders stateless resources without any jsessionid regardless 
 of whether the page is stateful or stateless. When servicing a request for a 
 resource without a jsessionid Wicket does not attempt to establish a session 
 which avoids creating a Session on every stateless resource request.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: WICKET-4340

2012-01-17 Thread ivaynberg
Updated Branches:
  refs/heads/master 972f0dcc0 - 2a17dd012


WICKET-4340


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

Branch: refs/heads/master
Commit: 2a17dd012be3ee6447fe7c884d59740cc072b5e9
Parents: 972f0dc
Author: Igor Vaynberg ivaynb...@apache.org
Authored: Tue Jan 17 13:50:40 2012 -0800
Committer: Igor Vaynberg ivaynb...@apache.org
Committed: Tue Jan 17 13:50:40 2012 -0800

--
 .../src/main/java/org/apache/wicket/Component.java |   27 ++
 .../src/main/java/org/apache/wicket/Page.java  |   11 +++---
 2 files changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2a17dd01/wicket-core/src/main/java/org/apache/wicket/Component.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 9363760..ef9cc28 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -105,8 +105,7 @@ import org.slf4j.LoggerFactory;
  * concatenation with colon separators of each id along the way. For example, 
the path a:b:c would
  * refer to the component named c inside the MarkupContainer named b 
inside the container named
  * a. The path to a component can be retrieved by calling {@link 
#getPath()}. To get a Component
- * path relative to the page that contains it, you can call {@link 
#getPageRelativePath()}.
- * /li
+ * path relative to the page that contains it, you can call {@link 
#getPageRelativePath()}./li
  * libLifeCycle /b- Components participate in the following lifecycle 
phases:
  * ul
  * libConstruction /b- A Component is constructed with the Java language 
new operator.
@@ -114,8 +113,7 @@ import org.slf4j.LoggerFactory;
  * {@link IComponentInstantiationListener}s are notified of component 
instantiation.
  * p
  * {@link #onInitialize()} is called on the component as soon as the component 
is part of a page's
- * component tree. At this state the component is able to access its markup.
- * /li
+ * component tree. At this state the component is able to access its 
markup./li
  * libRequest Handling /b- An incoming request is processed by a 
protocol request handler such
  * as {@link WicketFilter}. An associated Application object creates {@link 
Session},
  * {@link Request} and {@link Response} objects for use by a given Component 
in updating its model
@@ -1088,11 +1086,23 @@ public abstract class Component
// check authorization
setRenderAllowed();
 
+   internalOnAfterConfigure();
+
setRequestFlag(RFLAG_CONFIGURED, true);
}
}
 
/**
+* 
+* THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!
+* 
+* Called after the {@link #onConfigure()}, but before {@link 
#onBeforeRender()}
+*/
+   void internalOnAfterConfigure()
+   {
+   }
+
+   /**
 * Redirects to any intercept page previously specified by a call to 
redirectToInterceptPage.
 * The redirect is done by throwing an exception. If there is no 
intercept page no exception
 * will be thrown and the program flow will continue uninterrupted.
@@ -2680,10 +2690,11 @@ public abstract class Component
// to be backward compatible. 
WICKET-3761

getMarkupSourcingStrategy().renderHead(this, container);
CharSequence headerContribution = 
markupHeaderResponse.getBuffer();
-   if (Strings.isEmpty(headerContribution) 
== false) {
+   if (Strings.isEmpty(headerContribution) 
== false)
+   {

response.render(StringHeaderItem.forString(headerContribution));
}
-   } 
+   }
finally
{

RequestCycle.get().setResponse(oldResponse);
@@ -3311,7 +3322,7 @@ public abstract class Component
{
return getRequestCycle().urlFor(pageClass, parameters);
}
-   
+
/**
 * Gets a URL for the listener interface on a behavior (e.g. 
IBehaviorListener on
 * AjaxPagingNavigationBehavior).
@@ -3356,7 +3367,7 @@ 

[2/2] git commit: WICKET-4030 merging new test

2012-01-17 Thread ivaynberg
WICKET-4030 merging new test


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

Branch: refs/heads/wicket-1.5.x
Commit: 9573a74564bdfe50b2baa96431779aaf14bcf700
Parents: ddb89f5
Author: Emond Papegaaij papega...@apache.org
Authored: Tue Jan 17 10:07:40 2012 +0100
Committer: Igor Vaynberg ivaynb...@apache.org
Committed: Tue Jan 17 14:48:35 2012 -0800

--
 .../wicket/util/tester/WicketTesterTest.java   |   43 +++
 1 files changed, 43 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/9573a745/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
--
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
index 4bd40d3..59ce896 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
@@ -36,16 +36,21 @@ import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.WicketAjaxReference;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authorization.Action;
+import org.apache.wicket.authorization.IAuthorizationStrategy;
+import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.pages.AccessDeniedPage;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestParameters;
 import org.apache.wicket.request.Url;
+import org.apache.wicket.request.component.IRequestableComponent;
 import org.apache.wicket.request.handler.BookmarkablePageRequestHandler;
 import org.apache.wicket.request.handler.IPageProvider;
 import org.apache.wicket.request.handler.PageProvider;
@@ -1112,4 +1117,42 @@ public class WicketTesterTest extends WicketTestCase
// assert that the cookie is not preserved for the next request 
cycle
assertNull(tester.getRequest().getCookies());
}
+
+   /**
+* Tests if the access-denied-page is rendered if a page is rerendered 
for which you don't have
+* permission anymore
+*/
+   @Test
+   public void rerenderNotAllowed()
+   {
+   tester.setExposeExceptions(false);
+   class YesNoPageAuthorizationStrategy implements 
IAuthorizationStrategy
+   {
+   private boolean allowed = true;
+
+   public T extends IRequestableComponent boolean 
isInstantiationAuthorized(
+   ClassT componentClass)
+   {
+   if (componentClass == AccessDeniedPage.class)
+   return true;
+   return allowed || 
!WebPage.class.isAssignableFrom(componentClass);
+   }
+
+   public boolean isActionAuthorized(Component component, 
Action action)
+   {
+   if (component instanceof AccessDeniedPage)
+   return true;
+   return allowed || !(component instanceof 
WebPage);
+   }
+   }
+   YesNoPageAuthorizationStrategy strategy = new 
YesNoPageAuthorizationStrategy();
+   
tester.getApplication().getSecuritySettings().setAuthorizationStrategy(strategy);
+   DummyHomePage start = tester.startPage(DummyHomePage.class);
+   tester.assertRenderedPage(DummyHomePage.class);
+   strategy.allowed = false;
+   tester.startPage(start);
+   tester.assertRenderedPage(tester.getApplication()
+   .getApplicationSettings()
+   .getAccessDeniedPage());
+   }
 }



[1/2] git commit: WICKET-4030

2012-01-17 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-1.5.x ddb89f500 - 2f521bda8


WICKET-4030


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

Branch: refs/heads/wicket-1.5.x
Commit: 2f521bda88b3a28e8989af2f373e49a8851aa5e0
Parents: 9573a74
Author: Igor Vaynberg ivaynb...@apache.org
Authored: Tue Jan 17 14:52:23 2012 -0800
Committer: Igor Vaynberg ivaynb...@apache.org
Committed: Tue Jan 17 14:52:23 2012 -0800

--
 .../src/main/java/org/apache/wicket/Component.java |   30 +++
 .../src/main/java/org/apache/wicket/Page.java  |   18 ++---
 2 files changed, 34 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/2f521bda/wicket-core/src/main/java/org/apache/wicket/Component.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 83c05a9..a35e99a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -98,8 +98,8 @@ import org.slf4j.LoggerFactory;
  * given Component is simply the concatenation with colon separators of each 
id along the way. For
  * example, the path a:b:c would refer to the component named c inside the 
MarkupContainer named
  * b inside the container named a. The path to a component can be 
retrieved by calling
- * getPath(). To get a Component path relative to the page that contains it, 
you can
- * call getPageRelativePath().
+ * getPath(). To get a Component path relative to the page that contains it, 
you can call
+ * getPageRelativePath().
  * 
  * libLifeCycle /b- Components participate in the following lifecycle 
phases:
  * ul
@@ -1090,11 +1090,23 @@ public abstract class Component
// check authorization
setRenderAllowed();
 
+   internalOnAfterConfigure();
+
setRequestFlag(RFLAG_CONFIGURED, true);
}
}
 
/**
+* 
+* THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!
+* 
+* Called after the {@link #onConfigure()}, but before {@link 
#onBeforeRender()}
+*/
+   void internalOnAfterConfigure()
+   {
+   }
+
+   /**
 * Redirects to any intercept page previously specified by a call to 
redirectToInterceptPage.
 * 
 * @return True if an original destination was redirected to
@@ -3274,7 +3286,7 @@ public abstract class Component
{
return getRequestCycle().urlFor(pageClass, parameters);
}
-   
+
/**
 * Gets a URL for the listener interface on a behavior (e.g. 
IBehaviorListener on
 * AjaxPagingNavigationBehavior).
@@ -3284,7 +3296,8 @@ public abstract class Component
 * @param listener
 *The listener interface that the URL should call
 * @return The URL
-* @deprecated use {@link #urlFor(Behavior, RequestListenerInterface, 
PageParameters)} with explit parameters
+* @deprecated use {@link #urlFor(Behavior, RequestListenerInterface, 
PageParameters)} with
+* explit parameters
 */
@Deprecated
public final CharSequence urlFor(final Behavior behaviour,
@@ -3292,7 +3305,7 @@ public abstract class Component
{
return urlFor(behaviour, listener, null);
}
-   
+
/**
 * Gets a URL for the listener interface on a behavior (e.g. 
IBehaviorListener on
 * AjaxPagingNavigationBehavior).
@@ -3337,7 +3350,7 @@ public abstract class Component
{
return getRequestCycle().urlFor(requestHandler);
}
-   
+
/**
 * Gets a URL for the listener interface (e.g. ILinkListener).
 * 
@@ -3346,13 +3359,14 @@ public abstract class Component
 * @param listener
 *The listener interface that the URL should call
 * @return The URL
-* @deprecated use {@link #urlFor(RequestListenerInterface, 
PageParameters)} with explicit page parameters
+* @deprecated use {@link #urlFor(RequestListenerInterface, 
PageParameters)} with explicit page
+* parameters
 */
@Deprecated
public final CharSequence urlFor(final RequestListenerInterface 
listener)
{
return urlFor(listener, null);
-   }   
+   }
 
/**
 * Gets a URL for the listener interface (e.g. ILinkListener).


[jira] [Commented] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Igor Vaynberg (Commented) (JIRA)

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

Igor Vaynberg commented on WICKET-4340:
---

blah. 1.5.x fix is committed under WICKET-4030 by mistake :/

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.4.20, 1.5.4, 6.0.0
Reporter: Emond Papegaaij
 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: WICKET-4340

2012-01-17 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-1.4.x d841a285b - 65d5554cb


WICKET-4340


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

Branch: refs/heads/wicket-1.4.x
Commit: 65d5554cbaf8879a4fcdc38a57eabbf463f6f07a
Parents: d841a28
Author: Igor Vaynberg ivaynb...@apache.org
Authored: Tue Jan 17 15:07:54 2012 -0800
Committer: Igor Vaynberg ivaynb...@apache.org
Committed: Tue Jan 17 15:07:54 2012 -0800

--
 .../wicket/util/tester/WicketTesterTest.java   |   39 +++
 1 files changed, 39 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/65d5554c/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
--
diff --git 
a/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java 
b/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
index 241a46b..2679ccc 100644
--- a/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
+++ b/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
@@ -33,12 +33,16 @@ import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authorization.Action;
+import org.apache.wicket.authorization.IAuthorizationStrategy;
 import 
org.apache.wicket.markup.html.PackageResource.PackageResourceBlockedException;
+import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.pages.AccessDeniedPage;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.protocol.http.MockPage;
 import org.apache.wicket.protocol.http.WebRequestCycle;
@@ -829,4 +833,39 @@ public class WicketTesterTest extends TestCase
{
return 
(Button)tester.getComponentFromLastRenderedPage(form:submit);
}
+
+   /**
+* Tests if the access-denied-page is rendered if a page is rerendered 
for which you don't have
+* permission anymore
+*/
+   public void testRenderNotAllowed()
+   {
+   class YesNoPageAuthorizationStrategy implements 
IAuthorizationStrategy
+   {
+   private boolean allowed = true;
+
+   public T extends Component boolean 
isInstantiationAuthorized(ClassT componentClass)
+   {
+   if (componentClass == AccessDeniedPage.class)
+   return true;
+   return allowed || 
!WebPage.class.isAssignableFrom(componentClass);
+   }
+
+   public boolean isActionAuthorized(Component component, 
Action action)
+   {
+   if (component instanceof AccessDeniedPage)
+   return true;
+   return allowed || !(component instanceof 
WebPage);
+   }
+   }
+   YesNoPageAuthorizationStrategy strategy = new 
YesNoPageAuthorizationStrategy();
+   
tester.getApplication().getSecuritySettings().setAuthorizationStrategy(strategy);
+   tester.startPage(DummyHomePage.class);
+   tester.assertRenderedPage(DummyHomePage.class);
+   strategy.allowed = false;
+   tester.startPage(DummyHomePage.class);
+   tester.assertRenderedPage(tester.getApplication()
+   .getApplicationSettings()
+   .getAccessDeniedPage());
+   }
 }



[jira] [Updated] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Igor Vaynberg (Updated) (JIRA)

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

Igor Vaynberg updated WICKET-4340:
--

Affects Version/s: (was: 1.4.20)

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij
 Fix For: 1.5.4, 6.0.0

 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Igor Vaynberg (Resolved) (JIRA)

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

Igor Vaynberg resolved WICKET-4340.
---

   Resolution: Fixed
Fix Version/s: 1.5.4
   6.0.0

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij
Assignee: Igor Vaynberg
 Fix For: 6.0.0, 1.5.4

 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Igor Vaynberg (Commented) (JIRA)

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

Igor Vaynberg commented on WICKET-4340:
---

added the test to 1.4.x, it does not suffer from this problem.

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij
 Fix For: 1.5.4, 6.0.0

 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (WICKET-4340) Rerendering a page with WicketTester after you loose permission does not give access-denied

2012-01-17 Thread Igor Vaynberg (Assigned) (JIRA)

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

Igor Vaynberg reassigned WICKET-4340:
-

Assignee: Igor Vaynberg

 Rerendering a page with WicketTester after you loose permission does not give 
 access-denied
 ---

 Key: WICKET-4340
 URL: https://issues.apache.org/jira/browse/WICKET-4340
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.5.4, 6.0.0
Reporter: Emond Papegaaij
Assignee: Igor Vaynberg
 Fix For: 1.5.4, 6.0.0

 Attachments: WICKET-4340.patch, quickstart-4340.tar.bz2


 Since WICKET-4256 WicketTester does not give an access-denied page when you 
 try to rerender a page instance after loosing permission to render that page. 
 A testcase is added to WicketTesterTest (rerenderNotAllowed) to demonstrate 
 the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: changelog

2012-01-17 Thread ivaynberg
Updated Branches:
  refs/heads/wicket-1.5.x 2f521bda8 - f1eac764f


changelog


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

Branch: refs/heads/wicket-1.5.x
Commit: f1eac764f4154a838ea3c1201c622a5c9a9918ba
Parents: 2f521bd
Author: Igor Vaynberg igor.vaynb...@gmail.com
Authored: Tue Jan 17 15:19:45 2012 -0800
Committer: Igor Vaynberg igor.vaynb...@gmail.com
Committed: Tue Jan 17 15:19:45 2012 -0800

--
 CHANGELOG-1.5 |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/f1eac764/CHANGELOG-1.5
--
diff --git a/CHANGELOG-1.5 b/CHANGELOG-1.5
index b0d0325..39213b2 100644
--- a/CHANGELOG-1.5
+++ b/CHANGELOG-1.5
@@ -1,6 +1,7 @@
 This file contains all changes done on the 1.5 version.
 
-Release Notes - Wicket - Version 1.5.4.1
+
+Release Notes - Wicket - Version 1.5.4
 
 ** Bug
 * [WICKET-4140] - Make CryptoMapper easier to extend
@@ -46,6 +47,8 @@ Release Notes - Wicket - Version 1.5.4.1
 * [WICKET-4332] - FileUpload: Using IE9 in IE8 compatibility mode, 
ajax-response cannot be parsed
 * [WICKET-4333] - BreadCrumbPanelLink should accept subclasses of 
BreadBrumbPanel
 * [WICKET-4336] - One of the stateless examples makes the page stateful 
+* [WICKET-4338] - POST params ignored by 
IPageParametersEncoder#decodePageParameters()
+* [WICKET-4340] - Rerendering a page with WicketTester after you loose 
permission does not give access-denied
 
 ** Improvement
 * [WICKET-3911] - Hungarian localisation for upload component and examples
@@ -65,6 +68,8 @@ Release Notes - Wicket - Version 1.5.4.1
 * [WICKET-4302] - Allow set Ajax settings for AjaxCheckBox 
 * [WICKET-4329] - Optimize consequent usages of MarkupContainer# 
hasAssociatedMarkup() and #getAssociatedMapkup()
 * [WICKET-4334] - Prevent Wicket from causing redundant download of 
stateless resources (.js, .css etc.,) on browser with cookies enabled
+* [WICKET-4337] - deprecate start panel in 1.5.x
+* [WICKET-4342] - Allow resources disable the flushing of the response 
after setting the headers
 
 ** New Feature
 * [WICKET-4162] - Add new StringResourceLoader to allow Wicket extensions 
to provide localization resource bundles



Git Push Summary

2012-01-17 Thread ivaynberg
Updated Branches:
  refs/heads/build/wicket-1.5.4 [deleted] bd9469b3b


[2/2] git commit: changes to notice files

2012-01-17 Thread ivaynberg
changes to notice files


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

Branch: refs/heads/build/wicket-1.5.4
Commit: c39d0b3711e8e436dff3225094aab64b4ab52ad9
Parents: 6dcaade
Author: Igor Vaynberg igor.vaynb...@gmail.com
Authored: Tue Jan 17 16:00:36 2012 -0800
Committer: Igor Vaynberg igor.vaynb...@gmail.com
Committed: Tue Jan 17 16:00:36 2012 -0800

--
 NOTICE |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c39d0b37/NOTICE
--
diff --git a/NOTICE b/NOTICE
index ae9e405..3faa3bb 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Wicket
-Copyright 2006-2011 The Apache Software Foundation
+Copyright 2006-2012 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).



[1/2] git commit: modified poms for release 1.5.4

2012-01-17 Thread ivaynberg
Updated Branches:
  refs/heads/build/wicket-1.5.4 [created] c39d0b371


modified poms for release 1.5.4


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

Branch: refs/heads/build/wicket-1.5.4
Commit: 6dcaadeb9e8bb8aed786a89a8d95b5c47ae72b46
Parents: f1eac76
Author: Igor Vaynberg igor.vaynb...@gmail.com
Authored: Tue Jan 17 16:00:36 2012 -0800
Committer: Igor Vaynberg igor.vaynb...@gmail.com
Committed: Tue Jan 17 16:00:36 2012 -0800

--
 archetypes/quickstart/pom.xml  |2 +-
 .../src/main/resources/archetype-resources/pom.xml |2 +-
 pom.xml|2 +-
 testing/wicket-threadtest/pom.xml  |2 +-
 wicket-auth-roles/pom.xml  |2 +-
 wicket-core/pom.xml|2 +-
 wicket-datetime/pom.xml|2 +-
 wicket-devutils/pom.xml|2 +-
 wicket-examples/pom.xml|2 +-
 wicket-extensions/pom.xml  |2 +-
 wicket-guice/pom.xml   |2 +-
 wicket-ioc/pom.xml |2 +-
 wicket-jmx/pom.xml |2 +-
 wicket-objectssizeof-agent/pom.xml |2 +-
 wicket-request/pom.xml |4 ++--
 wicket-spring/pom.xml  |2 +-
 wicket-util/pom.xml|4 ++--
 wicket-velocity/pom.xml|2 +-
 wicket/pom.xml |2 +-
 19 files changed, 21 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/6dcaadeb/archetypes/quickstart/pom.xml
--
diff --git a/archetypes/quickstart/pom.xml b/archetypes/quickstart/pom.xml
index 727c107..97b900b 100644
--- a/archetypes/quickstart/pom.xml
+++ b/archetypes/quickstart/pom.xml
@@ -3,7 +3,7 @@
   parent
groupIdorg.apache.wicket/groupId
artifactIdwicket-parent/artifactId
-   version1.5-SNAPSHOT/version
+   version1.5.4/version
relativePath../../pom.xml/relativePath
   /parent
   

http://git-wip-us.apache.org/repos/asf/wicket/blob/6dcaadeb/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
--
diff --git 
a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml 
b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index 839b1ec..1826a11 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -20,7 +20,7 @@
/license
/licenses
properties
-   wicket.version1.5-SNAPSHOT/wicket.version
+   wicket.version1.5.4/wicket.version
jetty.version7.5.0.v20110901/jetty.version
/properties
dependencies

http://git-wip-us.apache.org/repos/asf/wicket/blob/6dcaadeb/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 15ee18d..324efbe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
 
groupIdorg.apache.wicket/groupId
artifactIdwicket-parent/artifactId
-   version1.5-SNAPSHOT/version
+   version1.5.4/version
packagingpom/packaging
nameWicket Parent/name
descriptionWicket is a Java-based open source component web 
application framework./description

http://git-wip-us.apache.org/repos/asf/wicket/blob/6dcaadeb/testing/wicket-threadtest/pom.xml
--
diff --git a/testing/wicket-threadtest/pom.xml 
b/testing/wicket-threadtest/pom.xml
index f2ca2e3..39b3856 100644
--- a/testing/wicket-threadtest/pom.xml
+++ b/testing/wicket-threadtest/pom.xml
@@ -23,7 +23,7 @@
parent
groupIdorg.apache.wicket/groupId
artifactIdwicket-parent/artifactId
-   version1.5-SNAPSHOT/version
+   version1.5.4/version
relativePath../../pom.xml/relativePath
/parent
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/6dcaadeb/wicket-auth-roles/pom.xml
--
diff --git a/wicket-auth-roles/pom.xml b/wicket-auth-roles/pom.xml
index 9f5631e..824489f 100644
--- a/wicket-auth-roles/pom.xml
+++ 

[jira] [Created] (WICKET-4343) Add 'static' indicator near start of URL for static resources to allow fast detection by filters

2012-01-17 Thread Chris Colman (Created) (JIRA)
Add 'static' indicator near start of URL for static resources to allow fast 
detection by filters


 Key: WICKET-4343
 URL: https://issues.apache.org/jira/browse/WICKET-4343
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.5.4
 Environment: Any
Reporter: Chris Colman
Priority: Minor


While it is possible to affect the 'prefix' of static package resource URLs 
this prefix appears near the end of the URL, after the namespace, resource 
identifier, full path name and class name. Adding a prefix towards the end of 
the URL that distinguishes static resources so that third party filters can 
detect them and avoid establishing a session means each filter needs to perform 
full scan of every URL it receives to test if the 'prefix' is present.

It's substantially quicker to test the first few chars of a URL string for a 
match with 'startsWith' than it is to iterate through to almost the end of each 
URL string to see if it 'contains' a substring. Any URL will fail to match on 
comparison of the first character if they don't have a 'w' (to match 
wicket/resource) at the beginning which makes startsWith a 'fast fail' test for 
most URLs it processes.

I think that's probably why the Servlet Spec chooses to do filter and servlet 
path matching via a 'starts with' strategy without support for wildcards except 
at the very end of a pattern.

Many of the URLs requested are very long and it would be preferable if wicket 
and third party filters could avoid string parsing of many thousands of super 
long URLs wherever they can - there's already enough of that going on without 
adding to the CPU's work load.

Looking at the code it would probably be easy to do in 
BasicResourceReferenceMapper.java.

Maybe to not disturb the number of segments used for resources it could be less 
invasive to change the start path of resources guaranteed to be 
stateless/static (not requiring a session to service requests for) it could 
simply replace the second segment provided by the getResourceIdentifier() so 
that the path ends up as

/wicket/static-resource 

if static and

/wicket/resource

if not static.

Perhaps getResourceHandler could take boolean static parameter.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: Cleanup.

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/master 2a17dd012 - b947aa27c


Cleanup.

Fixes in javadoc, log messages.
Removal of unused private and package-private methods.


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

Branch: refs/heads/master
Commit: b947aa27cd640bb67c6fe8d0450d1056acc9beb4
Parents: 2a17dd0
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jan 18 08:54:37 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jan 18 08:54:37 2012 +0100

--
 .../src/main/java/org/apache/wicket/Component.java |   71 +++
 .../java/org/apache/wicket/MarkupContainer.java|   14 ++--
 2 files changed, 19 insertions(+), 66 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b947aa27/wicket-core/src/main/java/org/apache/wicket/Component.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index ef9cc28..7a546d1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -756,7 +756,7 @@ public abstract class Component
{
if (log.isDebugEnabled())
{
-   log.debug(Markup available  + toString());
+   log.debug(Markup available {}, toString());
}
}
 
@@ -926,13 +926,11 @@ public abstract class Component
}
 
/**
-* Called on very component after the page is rendered. It will call 
onAfterRender for it self
+* Called on every component after the page is rendered. It will call 
onAfterRender for it self
 * and its children.
 */
public final void afterRender()
{
-   // if the component has been previously attached via attach()
-   // detach it now
try
{
setFlag(FLAG_AFTER_RENDERING, true);
@@ -1154,7 +1152,7 @@ public abstract class Component
throw new 
IllegalStateException(Component.class.getName() +
 has not been properly removed from hierachy. 
Something in the hierarchy of  +
getClass().getName() +
-has not called super.onRemovalFromHierarchy() 
in the override of onRemovalFromHierarchy() method);
+has not called super.onRemove() in the 
override of onRemove() method);
}
removeChildren();
}
@@ -1166,8 +1164,6 @@ public abstract class Component
@Override
public final void detach()
{
-   // if the component has been previously attached via attach()
-   // detach it now
setFlag(FLAG_DETACHING, true);
onDetach();
if (getFlag(FLAG_DETACHING))
@@ -1486,25 +1482,6 @@ public abstract class Component
}
 
/**
-* Find the Page and get net value from an auto-index
-* 
-* @return autoIndex
-*/
-   private final int nextAutoIndex()
-   {
-   Page page = findPage();
-   if (page == null)
-   {
-   throw new WicketRuntimeException(
-   This component is not (yet) coupled to a page. 
It has to be able 
-   + to find the page it is supposed to 
operate in before you can call 
-   + this method 
(Component#getMarkupId));
-   }
-
-   return page.getAutoIndex();
-   }
-
-   /**
 * Retrieves id by which this component is represented within the 
markup. This is either the id
 * attribute set explicitly via a call to {@link #setMarkupId(String)}, 
id attribute defined in
 * the markup, or an automatically generated id - in that order.
@@ -2371,7 +2348,7 @@ public abstract class Component
// Rendering is beginning
if (log.isDebugEnabled())
{
-   log.debug(Begin render  + this);
+   log.debug(Begin render {}, this);
}
 
try
@@ -2390,7 +2367,7 @@ public abstract class Component
 
if (log.isDebugEnabled())
{
-   log.debug(End render  + this);
+  

[1/2] git commit: Merge remote-tracking branch 'origin/wicket-1.5.x' into wicket-1.5.x

2012-01-17 Thread mgrigorov
Updated Branches:
  refs/heads/wicket-1.5.x f1eac764f - 62fe7c8a6


Merge remote-tracking branch 'origin/wicket-1.5.x' into wicket-1.5.x


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

Branch: refs/heads/wicket-1.5.x
Commit: 62fe7c8a6ae969ba1e6b3540ec541be0978d9683
Parents: b083617 f1eac76
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jan 18 08:58:01 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jan 18 08:58:01 2012 +0100

--
 CHANGELOG-1.5  |7 ++-
 .../src/main/java/org/apache/wicket/Component.java |   30 ---
 .../src/main/java/org/apache/wicket/Page.java  |   18 --
 .../wicket/util/tester/WicketTesterTest.java   |   43 +++
 4 files changed, 83 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/62fe7c8a/wicket-core/src/main/java/org/apache/wicket/Component.java
--



[2/2] git commit: Mark Component#locateMarkupStream() as deprecated. It is the same as #findMarkupStream()

2012-01-17 Thread mgrigorov
Mark Component#locateMarkupStream() as deprecated.
It is the same as #findMarkupStream()


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

Branch: refs/heads/wicket-1.5.x
Commit: b0836171217e8b16ed8c77152ffbd568929de6a5
Parents: ddb89f5
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed Jan 18 08:57:56 2012 +0100
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed Jan 18 08:57:56 2012 +0100

--
 .../src/main/java/org/apache/wicket/Component.java |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b0836171/wicket-core/src/main/java/org/apache/wicket/Component.java
--
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 83c05a9..5f41f8c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -3598,7 +3598,6 @@ public abstract class Component
 * 
 * @return The markup stream for this component. Since a Component 
cannot have a markup stream,
 * we ask this component's parent to search for it.
-* @TODO can be removed in 1.5
 */
protected final MarkupStream findMarkupStream()
{
@@ -3782,7 +3781,9 @@ public abstract class Component
 
/**
 * @return Component's markup stream
+* @deprecated Use findMarkupStream() instead.
 */
+   @Deprecated
protected MarkupStream locateMarkupStream()
{
return new MarkupStream(getMarkup());