[jira] Updated: (WICKET-1630) memory leak with IE 6

2008-05-19 Thread Vincent MATHON (JIRA)

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

Vincent MATHON updated WICKET-1630:
---

Attachment: AmdmDatePicker.java

AmdmDatePicker is a behavior providing similar features compared to DatePicker. 
It is a melting pot of DatePicker and AbtractCalendar that I provide as is. 
This implementation does not use yuiloader in order to correct the IE 6 memory 
leak.

With this implementation:
- All css, gif and js files must be in the AmdmDatePicker directory.
- I have withdrawn joda-time reference in getDatePattern since I do not need it 
in my project.
- appendNavigationConfiguration method should be enhanced to support full 
localization. of the calendar navigation.

I hope this helps
Vincent MATHON



 memory leak with IE 6
 -

 Key: WICKET-1630
 URL: https://issues.apache.org/jira/browse/WICKET-1630
 Project: Wicket
  Issue Type: Bug
  Components: wicket-datetime
Affects Versions: 1.3.3
 Environment: IE 6.0-2800-1106
Reporter: Vincent MATHON
 Attachments: AmdmDatePicker.java


 I used Drip (http://www.outofhanwell.com/ieleak/index.php?title=Main_Page) to 
 test the latest wicket date example  (I suppose it is the 1.3.3 version) and 
 I found several memory leaks with with IE 6. I reproduce the same behaviour 
 with my own project using wicket-date-time 1.3.1.
 sincerly,
 Vincent MATHON

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r657775 [5/5] - in /wicket/releases/wicket-1.4-m2: ./ archetypes/quickstart/ archetypes/quickstart/src/main/resources/archetype-resources/ testing/wicket-threadtest/ testing/wicket-threadt

2008-05-19 Thread frankbille
Modified: 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_7.java
URL: 
http://svn.apache.org/viewvc/wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_7.java?rev=657775r1=657774r2=657775view=diff
==
--- 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_7.java
 (original)
+++ 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_7.java
 Mon May 19 03:00:29 2008
@@ -25,7 +25,7 @@
  * 
  * @author Chris Turner
  */
-public class HeaderSectionPage_7 extends WebPage
+public class HeaderSectionPage_7 extends WebPageVoid
 {
private static final long serialVersionUID = 1L;
 

Modified: 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_8.java
URL: 
http://svn.apache.org/viewvc/wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_8.java?rev=657775r1=657774r2=657775view=diff
==
--- 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_8.java
 (original)
+++ 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_8.java
 Mon May 19 03:00:29 2008
@@ -25,7 +25,7 @@
  * 
  * @author Chris Turner
  */
-public class HeaderSectionPage_8 extends WebPage
+public class HeaderSectionPage_8 extends WebPageVoid
 {
private static final long serialVersionUID = 1L;
 

Modified: 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9.java
URL: 
http://svn.apache.org/viewvc/wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9.java?rev=657775r1=657774r2=657775view=diff
==
--- 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9.java
 (original)
+++ 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9.java
 Mon May 19 03:00:29 2008
@@ -24,7 +24,7 @@
  * 
  * @author Chris Turner
  */
-public class HeaderSectionPage_9 extends WebPage
+public class HeaderSectionPage_9 extends WebPageVoid
 {
private static final long serialVersionUID = 1L;
 

Modified: 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9a.java
URL: 
http://svn.apache.org/viewvc/wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9a.java?rev=657775r1=657774r2=657775view=diff
==
--- 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9a.java
 (original)
+++ 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_9a.java
 Mon May 19 03:00:29 2008
@@ -26,7 +26,7 @@
  * 
  * @author Chris Turner
  */
-public class HeaderSectionPage_9a extends WebPage
+public class HeaderSectionPage_9a extends WebPageVoid
 {
private static final long serialVersionUID = 1L;
 

Modified: 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.java
URL: 
http://svn.apache.org/viewvc/wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.java?rev=657775r1=657774r2=657775view=diff
==
--- 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.java
 (original)
+++ 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_1.java
 Mon May 19 03:00:29 2008
@@ -25,7 +25,7 @@
  * 
  * @author Chris Turner
  */
-public class SimplePage_1 extends WebPage
+public class SimplePage_1 extends WebPageVoid
 {
private static final long serialVersionUID = 1L;
 

Modified: 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.java
URL: 
http://svn.apache.org/viewvc/wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.java?rev=657775r1=657774r2=657775view=diff
==
--- 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.java
 (original)
+++ 
wicket/releases/wicket-1.4-m2/wicket/src/test/java/org/apache/wicket/markup/resolver/SimplePage_2.java
 

[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Attachment: wicket-1428-patch-with-test-cases.patch

wicket-1428-patch-with-test-cases attached

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: wicket-1428-patch-with-test-cases.patch, 
 WICKET-1428.patch, wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Attachment: wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch

wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch attached

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Attachment: (was: 
wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch)

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Attachment: (was: wicket-1428-patch-with-test-cases.patch)

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Attachment: wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Attachment: wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

Peter Ertl updated WICKET-1428:
---

Comment: was deleted

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

pete edited comment on WICKET-1428 at 5/19/08 5:50 AM:
-

Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. this should be more reliable and robust and 
various browsers. anyway, you can change that sequence using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter


  was (Author: pete):
wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch attached
  
 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

pete edited comment on WICKET-1428 at 5/19/08 5:53 AM:
-

Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. This should be more reliable and robust in the 
100.000 browsers that currently exist. anyway, you can change that sequence 
using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.Class/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter


  was (Author: pete):
Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. this should be more reliable and robust and 
various browsers. anyway, you can change that sequence using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.Class/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter

  
 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

pete edited comment on WICKET-1428 at 5/19/08 5:52 AM:
-

Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. this should be more reliable and robust and 
various browsers. anyway, you can change that sequence using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.Class/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter


  was (Author: pete):
Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. this should be more reliable and robust and 
various browsers. anyway, you can change that sequence using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter

  
 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[CONF] Apache Wicket: Wicket and SEO (page created)

2008-05-19 Thread confluence










Page Created :
WICKET :
Wicket and SEO



 
Wicket and SEO
has been created by Michael Sparer
(May 19, 2008).
 

Content:
Table of contents


  

  Some SEO Tricks

  The Project
  Using Nice Looking URLs
  Removing The jessionid
  Making Paging Stateless
  A Describing Page Title For Your Pages
  Creating a Dynamic Sitemap





Some SEO Tricks

The Project
I'd like to take a recent project as an example to guide you through this entry.
The project is a smaller one that doesn't require any user input, it's called isport.eu and aggregates football news (for you americans out there: soccer) from various RSS feeds. A slightly more detailed description can be found in the corresponding blog post.

Using Nice Looking URLs
Using nice URL that describe the content of the site will not only improve your ranking but also look more appealling to the users on a SERP (search engine result page). In our case a common URL looks like that:

http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html

where /en is the language, /premier-league is the currently selected league, /liverpool-fc is the club the page is about, /news are on the page, 19-2008 is the week and 0 is the current page. 

Removing The jessionid
As discussed on the mailinglist, jesession-ids in the url are generally considered as a bad thing for search engines. so the easiest way is to remove the jsession id for bots. 
In the mentioned post on the mailinglist, Dan Kaplan and Arthur W. had some nice approaches there, I used the following combination of both approaches to check if the user-agent is a bot:


private static final String[] botAgents = {	
			"googlebot", "msnbot", "slurp", "jeeves"
	/*
	 * "appie", "architext", "jeeves", "bjaaland", "ferret", "gulliver",
	 * "harvest", "htdig", "linkwalker", "lycos_", "moget", "muscatferret",
	 * "myweb", "nomad", "scooter", "yahoo!\\sslurp\\schina", "slurp",
	 * "weblayers", "antibot", "bruinbot", "digout4u", "echo!", "ia_archiver",
	 * "jennybot", "mercator", "netcraft", "msnbot", "petersnews",
	 * "unlost_web_crawler", "voila", "webbase", "webcollage", "cfetch",
	 * "zyborg", "wisenutbot", "robot", "crawl", "spider"
	 */};	


public static boolean isAgent(final String agent) {
	if (agent != null) {
		final String lowerAgent = agent.toLowerCase();
		for (final String bot : botAgents) {
			if (lowerAgent.indexOf(bot) != -1) {
return true;
			}
		}
	}
	return false;
}


and then strip the session id in your custom web response. In your application class add the following:


@Override
protected WebResponse newWebResponse(final HttpServletResponse servletResponse) {
	return new BufferedWebResponse(servletResponse) {
		@Override
		public CharSequence encodeURL(final CharSequence url) {
			final String agent = ((WebRequest) RequestCycle.get().getRequest()).getHttpServletRequest().getHeader("User-Agent");

			return isAgent(agent) ? url : super.encodeURL(url);
		}
	}
}


This way a new session gets created every time a User-Agent with the filtered names visits the page.

Making Paging Stateless
As paging in wicket is generally bound to sessions (the pagestate is saved in the pagemap which in turn lies in the session) we have to do something to make our pages pageable for someone who doesn't have a session like our bot.
So the trick was to put the desired pagenumber into the pageparameters (the "0" in the above example) and to implement a custom pagingnavigator. The navigator has to return BookmarkablePageLinks instead of the usual link. Therefore it was necessary to override the following methods


@Override
protected Link newPagingNavigationIncrementLink(final String id, final IPageable pageable, final int increment) {
	// return your bookmarkable increment (and decrement) link here
}

@Override
protected Link newPagingNavigationLink(final String id, final IPageable pageable, final int pageNumber) {
	// return your bookmarkable link here
}

@Override
protected PagingNavigation newNavigation(final IPageable pageable, final IPagingLabelProvider labelProvider) {
	return new PagingNavigation("navigation", pageable, labelProvider) {

		private static final long serialVersionUID = 1L;

		@Override
		protected Link newPagingNavigationLink(final String id, final IPageable pageable, final int pageIndex) {
			// return your bookmarkable link here
		}
	};
}


A Describing Page Title For Your Pages
As you certainly know, the title tag of your page is the one that gets shown on the SERPs, so it should be different for all your pages. If your using a BasePage that holds the layout and use markup inheritance for you SubPages a abstract method 


public abstract IModel getPageTitle();


is an easy way to force all of your pages to provide a pagetitle. Most commonly the page title depends on your model objects that are going to be displayed on page. E.g. Liverpool FC in the above example. As 

[CONF] Apache Wicket: Wicket and SEO (page edited)

2008-05-19 Thread confluence










Page Edited :
WICKET :
Wicket and SEO



 
Wicket and SEO
has been edited by Michael Sparer
(May 19, 2008).
 

 
 (View changes)
 

Content:
Table of contents


  

  Some SEO Tricks

  The Project
  Using Nice Looking URLs
  Removing The jessionid
  Making Paging Stateless
  A Describing Page Title For Your Pages
  Creating a Dynamic Sitemap





Some SEO Tricks

The Project
I'd like to take a recent project as an example to guide you through this entry.
The project is a smaller one that doesn't require any user input, it's called isport.eu and aggregates football news (for you americans out there: soccer) from various RSS feeds. A slightly more detailed description can be found in the corresponding blog post.

Using Nice Looking URLs
Using nice URL that describe the content of the site will not only improve your ranking but also look more appealling to the users on a SERP (search engine result page). In our case a common URL looks like that:

http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html

where /en is the language, /premier-league is the currently selected league, /liverpool-fc is the club the page is about, /news are on the page, 19-2008 is the week and 0 is the current page. 

Removing The jessionid
As discussed on the mailinglist, jesession-ids in the url are generally considered as a bad thing for search engines. so the easiest way is to remove the jsession id for bots. 
In the mentioned post on the mailinglist, Dan Kaplan and Arthur W. had some nice approaches there, I used the following combination of both approaches to check if the user-agent is a bot:


private static final String[] botAgents = {	
			"googlebot", "msnbot", "slurp", "jeeves"
	/*
	 * "appie", "architext", "jeeves", "bjaaland", "ferret", "gulliver",
	 * "harvest", "htdig", "linkwalker", "lycos_", "moget", "muscatferret",
	 * "myweb", "nomad", "scooter", "yahoo!\\sslurp\\schina", "slurp",
	 * "weblayers", "antibot", "bruinbot", "digout4u", "echo!", "ia_archiver",
	 * "jennybot", "mercator", "netcraft", "msnbot", "petersnews",
	 * "unlost_web_crawler", "voila", "webbase", "webcollage", "cfetch",
	 * "zyborg", "wisenutbot", "robot", "crawl", "spider"
	 */};	


public static boolean isAgent(final String agent) {
	if (agent != null) {
		final String lowerAgent = agent.toLowerCase();
		for (final String bot : botAgents) {
			if (lowerAgent.indexOf(bot) != -1) {
return true;
			}
		}
	}
	return false;
}


and then strip the session id in your custom web response. In your application class add the following:


@Override
protected WebResponse newWebResponse(final HttpServletResponse servletResponse) {
	return new BufferedWebResponse(servletResponse) {
		@Override
		public CharSequence encodeURL(final CharSequence url) {
			final String agent = ((WebRequest) RequestCycle.get().getRequest()).getHttpServletRequest().getHeader("User-Agent");

			return isAgent(agent) ? url : super.encodeURL(url);
		}
	}
}


This way a new session gets created every time a User-Agent with the filtered names visits the page.

Making Paging Stateless
As paging in wicket is generally bound to sessions (the pagestate is saved in the pagemap which in turn lies in the session) we have to do something to make our pages pageable for someone who doesn't have a session like our bot.
So the trick was to put the desired pagenumber into the pageparameters (the "0" in the above example) and to implement a custom pagingnavigator. The navigator has to return BookmarkablePageLinks instead of the usual link. Therefore it was necessary to override the following methods


@Override
protected Link newPagingNavigationIncrementLink(final String id, final IPageable pageable, final int increment) {
	// return your bookmarkable increment (and decrement) link here
}

@Override
protected Link newPagingNavigationLink(final String id, final IPageable pageable, final int pageNumber) {
	// return your bookmarkable link here
}

@Override
protected PagingNavigation newNavigation(final IPageable pageable, final IPagingLabelProvider labelProvider) {
	return new PagingNavigation("navigation", pageable, labelProvider) {

		private static final long serialVersionUID = 1L;

		@Override
		protected Link newPagingNavigationLink(final String id, final IPageable pageable, final int pageIndex) {
			// return your bookmarkable link here
		}
	};
}


A Describing Page Title For Your Pages
As you certainly know, the title tag of your page is the one that gets shown on the SERPs, so it should be different for all your pages. If your using a BasePage that holds the layout and use markup inheritance for you SubPages a abstract method 


public abstract IModel getPageTitle();


is an easy way to force all of your pages to provide a pagetitle. Most commonly the page title depends on your model objects that are going to be displayed on 

[CONF] Apache Wicket: SEO - Search Engine Optimization (page edited)

2008-05-19 Thread confluence










Page Edited :
WICKET :
SEO - Search Engine Optimization



 
SEO - Search Engine Optimization
has been edited by Michael Sparer
(May 19, 2008).
 

 
 (View changes)
 

Content:

Table of contents


  

  Some SEO Tricks

  The Project
  Using Nice Looking URLs
  Removing The jessionid
  Making Paging Stateless
  A Describing Page Title For Your Pages
  Creating a Dynamic Sitemap





Some SEO Tricks

The Project
I'd like to take a recent project as an example to guide you through this entry.
The project is a smaller one that doesn't require any user input, it's called isport.eu and aggregates football news (for you americans out there: soccer) from various RSS feeds. A slightly more detailed description can be found in the corresponding blog post.

Using Nice Looking URLs
Using nice URL that describe the content of the site will not only improve your ranking but also look more appealling to the users on a SERP (search engine result page). In our case a common URL looks like that:

http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html

where /en is the language, /premier-league is the currently selected league, /liverpool-fc is the club the page is about, /news are on the page, 19-2008 is the week and 0 is the current page. 

Removing The jessionid
As discussed on the mailinglist, jesession-ids in the url are generally considered as a bad thing for search engines. so the easiest way is to remove the jsession id for bots. 
In the mentioned post on the mailinglist, Dan Kaplan and Arthur W. had some nice approaches there, I used the following combination of both approaches to check if the user-agent is a bot:


private static final String[] botAgents = {	
			"googlebot", "msnbot", "slurp", "jeeves"
	/*
	 * "appie", "architext", "jeeves", "bjaaland", "ferret", "gulliver",
	 * "harvest", "htdig", "linkwalker", "lycos_", "moget", "muscatferret",
	 * "myweb", "nomad", "scooter", "yahoo!\\sslurp\\schina", "slurp",
	 * "weblayers", "antibot", "bruinbot", "digout4u", "echo!", "ia_archiver",
	 * "jennybot", "mercator", "netcraft", "msnbot", "petersnews",
	 * "unlost_web_crawler", "voila", "webbase", "webcollage", "cfetch",
	 * "zyborg", "wisenutbot", "robot", "crawl", "spider"
	 */};	


public static boolean isAgent(final String agent) {
	if (agent != null) {
		final String lowerAgent = agent.toLowerCase();
		for (final String bot : botAgents) {
			if (lowerAgent.indexOf(bot) != -1) {
return true;
			}
		}
	}
	return false;
}


and then strip the session id in your custom web response. In your application class add the following:


@Override
protected WebResponse newWebResponse(final HttpServletResponse servletResponse) {
	return new BufferedWebResponse(servletResponse) {
		@Override
		public CharSequence encodeURL(final CharSequence url) {
			final String agent = ((WebRequest) RequestCycle.get().getRequest()).getHttpServletRequest().getHeader("User-Agent");

			return isAgent(agent) ? url : super.encodeURL(url);
		}
	}
}


This way a new session gets created every time a User-Agent with the filtered names visits the page.

Making Paging Stateless
As paging in wicket is generally bound to sessions (the pagestate is saved in the pagemap which in turn lies in the session) we have to do something to make our pages pageable for someone who doesn't have a session like our bot.
So the trick was to put the desired pagenumber into the pageparameters (the "0" in the above example) and to implement a custom pagingnavigator. The navigator has to return BookmarkablePageLinks instead of the usual link. Therefore it was necessary to override the following methods


@Override
protected Link newPagingNavigationIncrementLink(final String id, final IPageable pageable, final int increment) {
	// return your bookmarkable increment (and decrement) link here
}

@Override
protected Link newPagingNavigationLink(final String id, final IPageable pageable, final int pageNumber) {
	// return your bookmarkable link here
}

@Override
protected PagingNavigation newNavigation(final IPageable pageable, final IPagingLabelProvider labelProvider) {
	return new PagingNavigation("navigation", pageable, labelProvider) {

		private static final long serialVersionUID = 1L;

		@Override
		protected Link newPagingNavigationLink(final String id, final IPageable pageable, final int pageIndex) {
			// return your bookmarkable link here
		}
	};
}


A Describing Page Title For Your Pages
As you certainly know, the title tag of your page is the one that gets shown on the SERPs, so it should be different for all your pages. If your using a BasePage that holds the layout and use markup inheritance for you SubPages a abstract method 


public abstract IModel getPageTitle();


is an easy way to force all of your pages to provide a pagetitle. Most commonly the page title depends on your model objects 

[jira] Issue Comment Edited: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

pete edited comment on WICKET-1428 at 5/19/08 6:02 AM:
-

Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. This should be more reliable and robust in the 
100.000 browsers that currently exist. anyway, you can change that sequence 
using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.and.wonderful.Class/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter


  was (Author: pete):
Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. This should be more reliable and robust in the 
100.000 browsers that currently exist. anyway, you can change that sequence 
using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.Class/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter

  
 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Peter Ertl (JIRA)

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

pete edited comment on WICKET-1428 at 5/19/08 6:05 AM:
-

Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. This should be more reliable and robust in the 
100.000 browsers that currently exist. anyway, you can change that sequence 
using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.and.wonderful.AnchorClass/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter


  was (Author: pete):
Attachments:

* wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch
* wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch

I decided to pick

 $up$

as a replacement string for '..' because based on RFC 1738 (Uniform Resource 
Locators) it needs no url encoding at all. The previous suggestion $^ was 
converted into $%5E in Firefox which is kind of ugly for my taste and would 
need explicit url encoding and decoding. I wanted to avoid this unnecessary 
encoding/decoding stuff at all to not bother with different character sets or 
browser quirks of whatever kind. This should be more reliable and robust in the 
100.000 browsers that currently exist. anyway, you can change that sequence 
using

  
Application.getResourceSettings().setParentFolderPlaceholder(my-favorite-escape-sequence)

I did check the patch with ms explorer 6, ms explorer 7, opera 2 and safari 3 
which worked well.

An example url could now look like

  /resources/my.great.and.wonderful.Class/$up$/$up$/base.css

and not be garbled by some browser anymore...

There's also a bunch of test cases included in the uploaded patches to test 
this behavior during regression tests.

Would be great if this stuff would make it into 1.4 and 1.3 soon :-)

Regards
Peter

  
 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (WICKET-1644) Add IChoiceRenderer to RadioGroup CheckGroup

2008-05-19 Thread Will Hoover (JIRA)
Add IChoiceRenderer to RadioGroup CheckGroup


 Key: WICKET-1644
 URL: https://issues.apache.org/jira/browse/WICKET-1644
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.3.3
 Environment: N/A
Reporter: Will Hoover
Priority: Minor


Other components (i.e. DropDownChoice, CheckBoxMultipleChoice, etc.) that deal 
with choices have the ability to use an IChoiceRenderer in order to implement 
getDisplayValue(...) and getIdValue(...)
It is sometimes a requirement  to supply the ID value when making a selection 
using RadioGroup/CheckGroup. For example:

class MyObject {
private Long id;
private MyObjectOption myObjectOption;

public MyObject(final Long id){
setId(id);
...
}
...
}

class MyObjectOption {
private Long id;
private String name;

public MyObjectOption(final Long id){
setId(id);
...
}
...
}

// in the WebPage
final MyObject myObject = new MyObject(1L);
...
myObject.setMyObjectOption(new MyObjectOption(200L));

final ListMyObjectOption myObjectOptionList = new
ArrayListMyObjectOption();
myObjectOptionList.add(new MyObjectOption(100L));
myObjectOptionList.add(new MyObjectOption(200L));
myObjectOptionList.add(new MyObjectOption(300L));

final Form myForm = new Form(form-myobject, new
CompoundPropertyModel(myObject));
...
final RadioGroup group = new RadioGroup(myObjectOption);
group.add(new ListView(div-myobject-options-view, myObjectList) {
protected final void populateItem(final ListItem item) {
final MyObjectOption myObjectOption = (MyObjectOption)
item.getModelObject();
item.add(new Label(label-myobject-option-name,
myObjectOption.getName()));
item.add(new Radio(input-radio-myobject-option, new
Model(myObjectOption)));
}
});
myForm.add(group);
add(myForm);


form wicket:id=form-myobject
div wicket:id=myObjectOption
div wicket:id=div-myobject-options-view
label wicket:id=label-myobject-option-name
[MyObjectOption Name]
/label
input wicket:id=input-radio-myobject-option
type=radio /
/div
/div
/form

In the example above myObjectOption would never be selected because it
is not the same instance of the MyObjectOption that is in
myObjectOptionList (index 1) even though they share the same ID. If an
IChoiceRenderer was provided to the RadioGroup the following could
accomplish the task of making the selection work:

final IChoiceRenderer myObjectOptionRenderer = new ChoiceRenderer() {
...
public final String getIdValue(final Object object, final int
index) {
final Object id = ((MyObjectOption) object).getId();
return (id != null) ? id.toString() :
super.getIdValue(object, index);
}
...
};

An easy solution to the above example is to ensure that equals and hashcode are 
overridden, but if MyObject and MyObjectOption are not within the developers 
namespace then this will not be possible. Also, for consistency sake, if other 
components that deal with choices have the capability to use an IChoiceRenderer 
then RadioGroup/CheckGroup should also have that option.

Full forum thread: http://www.mail-archive.com/[EMAIL PROTECTED]/msg18283.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-1520) JavaScriptStripper breaks prototype.js

2008-05-19 Thread Marat Radchenko (JIRA)

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

Marat Radchenko commented on WICKET-1520:
-

Get the same error here.

 JavaScriptStripper breaks prototype.js 
 ---

 Key: WICKET-1520
 URL: https://issues.apache.org/jira/browse/WICKET-1520
 Project: Wicket
  Issue Type: Bug
Affects Versions: 1.3.2, 1.3.3
Reporter: Juliano Viana
 Fix For: 1.3.4


 JavaScriptStripper is used to strip whitespace and comments from JavaScript 
 files if the resource settings for the application enable that behavior.
 The problem is it breaks prototype.js version 1.6.0  (a heavily used 
 JavaScript library, used by many components like wicketstuff-scriptaculous ). 
 It changes the library so that the line that reads:
   document.write(script id=__onDOMContentLoaded defer src=//:\/script);
 becomes:
  document.write(script id=__onDOMContentLoaded defer src=
 This is enough to render useless any application that relies on scriptaculous 
 . The funny part is that it only happen if the application mode is 
 DEPLOYMENT, as in DEVELOPMENT this code is not active.
 I suggest dropping this functionality altogether - the logic for doing the 
 stripping  is extremely complicated and what is the point of stripping 
 whitespace and comments  from something that is going to be gzip compressed 
 anyway?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r657864 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ wicket-examples/src/main/java/org/apache/wicket/examples/compref/ wicket-extensions/src/m

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 10:08:52 2008
New Revision: 657864

URL: http://svn.apache.org/viewvc?rev=657864view=rev
Log:
undo generification of ITabT

Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/AbstractTab.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/ITab.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java?rev=657864r1=657863r2=657864view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java
 Mon May 19 10:08:52 2008
@@ -39,8 +39,8 @@
public TabbedPanelPage()
{
// create a list of ITab objects used to feed the tabbed panel
-   ListITab? tabs = new ArrayListITab?();
-   tabs.add(new AbstractTabVoid(new ModelString(first tab))
+   ListITab tabs = new ArrayListITab();
+   tabs.add(new AbstractTab(new ModelString(first tab))
{
@Override
public PanelVoid getPanel(String panelId)
@@ -49,7 +49,7 @@
}
});
 
-   tabs.add(new AbstractTabVoid(new ModelString(second tab))
+   tabs.add(new AbstractTab(new ModelString(second tab))
{
@Override
public PanelVoid getPanel(String panelId)
@@ -58,7 +58,7 @@
}
});
 
-   tabs.add(new AbstractTabVoid(new ModelString(third tab))
+   tabs.add(new AbstractTab(new ModelString(third tab))
{
@Override
public PanelVoid getPanel(String panelId)

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java?rev=657864r1=657863r2=657864view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java
 Mon May 19 10:08:52 2008
@@ -50,8 +50,8 @@
addCssSwitchingLinks();
 
// create a list of ITab objects used to feed the tabbed panel
-   ListITab? tabs = new ArrayListITab?();
-   tabs.add(new AbstractTabVoid(new ModelString(first tab))
+   ListITab tabs = new ArrayListITab();
+   tabs.add(new AbstractTab(new ModelString(first tab))
{
 
@Override
@@ -62,7 +62,7 @@
 
});
 
-   tabs.add(new AbstractTabVoid(new ModelString(second tab))
+   tabs.add(new AbstractTab(new ModelString(second tab))
{
 
@Override
@@ -73,7 +73,7 @@
 
});
 
-   tabs.add(new AbstractTabVoid(new ModelString(third tab))
+   tabs.add(new AbstractTab(new ModelString(third tab))
{
 
@Override

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java?rev=657864r1=657863r2=657864view=diff
==
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java
 Mon May 19 10:08:52 2008
@@ -42,7 +42,7 @@
 * @param id
 * @param tabs
 */
-   public AjaxTabbedPanel(String id, ListITab? tabs)
+   public 

svn commit: r657865 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java

2008-05-19 Thread ivaynberg
Author: ivaynberg
Date: Mon May 19 10:08:55 2008
New Revision: 657865

URL: http://svn.apache.org/viewvc?rev=657865view=rev
Log:
missing generification

Modified:

wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java?rev=657865r1=657864r2=657865view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java
 Mon May 19 10:08:55 2008
@@ -142,9 +142,9 @@
 * 
 * @param object
 *The object that will be used when setting a value on the 
model object
-* @see IModel#setObject(Object)
+* @see IModel#setObject(T)
 */
-   public void setObject(Object object)
+   public void setObject(T object)
{
final String expression = propertyExpression();
if (Strings.isEmpty(expression))




svn commit: r657867 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/request/target/resource/ main/java/org/apache/wicket/settings/ test/java/ test/java/org/apac

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 10:13:18 2008
New Revision: 657867

URL: http://svn.apache.org/viewvc?rev=657867view=rev
Log:
WICKET-1428

Added:
wicket/trunk/wicket/src/test/java/ParentResourceTest.js   (with props)

wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
   (with props)

wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.html
   (with props)

wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
   (with props)
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=657867r1=657866r2=657867view=diff
==
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java 
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java 
Mon May 19 10:13:18 2008
@@ -41,7 +41,7 @@
/** Logger */
private static final Logger log = 
LoggerFactory.getLogger(SharedResources.class);
 
-   /**
+  /**
 * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. 
Inserts _[locale] and
 * _[style] into path just before any extension that might exist.
 * 
@@ -55,8 +55,12 @@
 */
public static String resourceKey(final String path, final Locale 
locale, final String style)
{
-   final String extension = Files.extension(path);
-   final String basePath = Files.basePath(path, extension);
+// escape sequence for '..' (prevents crippled urls in browser)
+final CharSequence parentEscape = 
Application.get().getResourceSettings().getParentFolderPlaceholder();
+
+final String extension = Files.extension(path);
+// get relative path to resource, replace '..' with escape sequence
+final String basePath = Files.basePath(path, extension).replace(../, 
parentEscape + /);
final AppendingStringBuffer buffer = new 
AppendingStringBuffer(basePath.length() + 16);
buffer.append(basePath);
 

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java?rev=657867r1=657866r2=657867view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java
 Mon May 19 10:13:18 2008
@@ -35,7 +35,7 @@
 /**
  * Default implementation of [EMAIL PROTECTED] ISharedResourceRequestTarget}. 
Target that denotes a shared
  * [EMAIL PROTECTED] org.apache.wicket.Resource}.
- * 
+ *
  * @author Eelco Hillenius
  */
 public class SharedResourceRequestTarget implements 
ISharedResourceRequestTarget
@@ -47,7 +47,7 @@
 
/**
 * Construct.
-* 
+*
 * @param requestParameters
 *the request parameters
 */
@@ -115,7 +115,7 @@
/**
 * Respond by looking up the shared resource and delegating the actual 
response to that
 * resource.
-* 
+*
 * @see 
org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle)
 */
public void respond(RequestCycle requestCycle)
@@ -145,7 +145,9 @@
{
scope = 
resolver.resolveClass(className);
}
-   String path = resourceKey.substring(ix 
+ 1);
+  final CharSequence escapeString = 
application.getResourceSettings().getParentFolderPlaceholder();
+  // get path component of resource key, replace '..' with escape 
sequence to prevent crippled urls in browser 
+  String path = resourceKey.substring(ix + 1).replace(escapeString, 
..);
 
if (PackageResource.exists(scope, path, 
null, null))
{

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java
URL: 

svn commit: r657871 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/request/target/resource/ main/java/org/apache/wicket/settings/ test/

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 10:21:55 2008
New Revision: 657871

URL: http://svn.apache.org/viewvc?rev=657871view=rev
Log:
WICKET-1428

Added:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/ParentResourceTest.js 
  (with props)

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
   (with props)

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.html
   (with props)

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
   (with props)
Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=657871r1=657870r2=657871view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java
 Mon May 19 10:21:55 2008
@@ -46,17 +46,23 @@
 * _[style] into path just before any extension that might exist.
 * 
 * @param path
-*The resource path
+*  The resource path
 * @param locale
-*The locale
+*  The locale
 * @param style
-*The style (see [EMAIL PROTECTED] 
org.apache.wicket.Session})
+*  The style (see [EMAIL PROTECTED] 
org.apache.wicket.Session})
 * @return The localized path
 */
public static String resourceKey(final String path, final Locale 
locale, final String style)
{
+   // escape sequence for' ..' (prevents crippled urls in browser)
+   final CharSequence parentEscape = Application.get()
+   .getResourceSettings()
+   .getParentFolderPlaceholder();
+
final String extension = Files.extension(path);
-   final String basePath = Files.basePath(path, extension);
+   // get relative path to resource, replace' ..' with escape 
sequence
+   final String basePath = Files.basePath(path, 
extension).replace(../, parentEscape + /);
final AppendingStringBuffer buffer = new 
AppendingStringBuffer(basePath.length() + 16);
buffer.append(basePath);
 
@@ -104,7 +110,7 @@
 * Construct.
 * 
 * @param application
-*The application
+*  The application
 */
SharedResources(Application application)
{
@@ -114,18 +120,18 @@
 * Adds a resource.
 * 
 * @param scope
-*Scope of resource
+*  Scope of resource
 * @param name
-*Logical name of resource
+*  Logical name of resource
 * @param locale
-*The locale of the resource
+*  The locale of the resource
 * @param style
-*The resource style (see [EMAIL PROTECTED] 
org.apache.wicket.Session})
+*  The resource style (see [EMAIL PROTECTED] 
org.apache.wicket.Session})
 * @param resource
-*Resource to store
+*  Resource to store
 */
public final void add(final Class scope, final String name, final 
Locale locale,
-   final String style, final Resource resource)
+   final String style, final Resource resource)
{
// Store resource
final String key = resourceKey(scope, name, locale, style);
@@ -147,11 +153,11 @@
 * Adds a resource.
 * 
 * @param name
-*Logical name of resource
+*  Logical name of resource
 * @param locale
-*The locale of the resource
+*  The locale of the resource
 * @param resource
-*Resource to store
+*  Resource to store
 */
public final void add(final String name, final Locale locale, final 
Resource resource)
{
@@ -162,9 +168,9 @@
 * Adds a 

[jira] Resolved: (WICKET-1428) AutoLinkResolver and Parent-Relative (../) Links

2008-05-19 Thread Gerolf Seitz (JIRA)

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

Gerolf Seitz resolved WICKET-1428.
--

   Resolution: Fixed
Fix Version/s: 1.3.4

thanks

 AutoLinkResolver and Parent-Relative (../) Links
 

 Key: WICKET-1428
 URL: https://issues.apache.org/jira/browse/WICKET-1428
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.2
Reporter: James Carman
Assignee: Gerolf Seitz
 Fix For: 1.3.4, 1.4-M3

 Attachments: 
 wicket-1428-patch-with-test-cases-for-wicket-1.3.x.patch, 
 wicket-1428-patch-with-test-cases-for-wicket-1.4.x.patch, WICKET-1428.patch, 
 wicket-link-outside-of-package.zip


 Suppose I have a package structure like this:
 com.mycompany.myproject
 --- module1
 --- page
 - Page1.html
 --- module2
 --- page
 - Page2.html
 If I want to autolink from Page1.html to Page2.html, it would look like:
 wicket:link
  a href=../../module2/page/Page2.htmlClick Here!/a
 /wicket:link
 This is not working, however.  The AutoLinkResolver spits out a warning 
 message:
 WARN  - AutoLinkResolver   - Did not find corresponding java class: 
 .module2.page.Page2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r657872 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java

2008-05-19 Thread ivaynberg
Author: ivaynberg
Date: Mon May 19 10:27:46 2008
New Revision: 657872

URL: http://svn.apache.org/viewvc?rev=657872view=rev
Log:
making public to try to solve a very weird error: [Compiler] 
wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java:[37,92]
 org.apache.wicket.examples.compref.CheckBoxMultipleChoicePage.Input has 
private access in org.apache.wicket.examples.compref.CheckBoxMultipleChoicePage

Modified:

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java?rev=657872r1=657871r2=657872view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 Mon May 19 10:27:46 2008
@@ -43,13 +43,13 @@
  * @param E
  *class of a single element in the choices list
  */
-abstract class AbstractChoiceT, E extends FormComponentT
+public abstract class AbstractChoiceT, E extends FormComponentT
 {
/** */
private static final long serialVersionUID = 1L;
 
/** The list of objects. */
-   private IModelList ? extends E choices;
+   private IModelList? extends E choices;
 
/** The renderer used to generate display/id values for the objects. */
private IChoiceRendererE renderer;
@@ -75,7 +75,7 @@
 *The collection of choices in the dropdown
 * @see org.apache.wicket.Component#Component(String)
 */
-   public AbstractChoice(final String id, final List ? extends E choices)
+   public AbstractChoice(final String id, final List? extends E choices)
{
this(id, new Model((Serializable)choices), new 
ChoiceRendererE());
}
@@ -91,7 +91,7 @@
 *The collection of choices in the dropdown
 * @see org.apache.wicket.Component#Component(String)
 */
-   public AbstractChoice(final String id, final List ? extends E choices,
+   public AbstractChoice(final String id, final List? extends E choices,
final IChoiceRendererE renderer)
{
this(id, new Model((Serializable)choices), renderer);
@@ -108,7 +108,7 @@
 *The collection of choices in the dropdown
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
-   public AbstractChoice(final String id, IModelT model, final List ? 
extends E choices)
+   public AbstractChoice(final String id, IModelT model, final List? 
extends E choices)
{
this(id, model, new Model((Serializable)choices), new 
ChoiceRendererE());
}
@@ -126,7 +126,7 @@
 *The rendering engine
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
-   public AbstractChoice(final String id, IModelT model, final List ? 
extends E choices,
+   public AbstractChoice(final String id, IModelT model, final List? 
extends E choices,
final IChoiceRendererE renderer)
{
this(id, model, new Model((Serializable)choices), renderer);
@@ -141,7 +141,7 @@
 *The collection of choices in the dropdown
 * @see org.apache.wicket.Component#Component(String)
 */
-   public AbstractChoice(final String id, final IModelList ? extends E 
choices)
+   public AbstractChoice(final String id, final IModelList? extends E 
choices)
{
this(id, choices, new ChoiceRendererE());
}
@@ -157,7 +157,7 @@
 *The collection of choices in the dropdown
 * @see org.apache.wicket.Component#Component(String)
 */
-   public AbstractChoice(final String id, final IModelList ? extends E 
choices,
+   public AbstractChoice(final String id, final IModelList? extends E 
choices,
final IChoiceRendererE renderer)
{
super(id);
@@ -176,7 +176,7 @@
 *The collection of choices in the dropdown
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
-   public AbstractChoice(final String id, IModelT model, final 
IModelList ? extends E choices)
+   public AbstractChoice(final String id, IModelT model, final 
IModelList? extends E choices)
{
this(id, model, choices, new ChoiceRendererE());
}
@@ -195,7 +195,7 @@
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
public AbstractChoice(final String id, IModelT model,
-   final IModelList ? extends E choices, final 
IChoiceRendererE renderer)

svn commit: r657879 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket: SharedResources.java request/target/resource/SharedResourceRequestTarget.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 10:38:36 2008
New Revision: 657879

URL: http://svn.apache.org/viewvc?rev=657879view=rev
Log:
WICKET-1428: use Strings.replaceAll instead of String.replace (Java5+)

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=657879r1=657878r2=657879view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java
 Mon May 19 10:38:36 2008
@@ -24,6 +24,7 @@
 
 import org.apache.wicket.util.file.Files;
 import org.apache.wicket.util.string.AppendingStringBuffer;
+import org.apache.wicket.util.string.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,7 +63,8 @@
 
final String extension = Files.extension(path);
// get relative path to resource, replace' ..' with escape 
sequence
-   final String basePath = Files.basePath(path, 
extension).replace(../, parentEscape + /);
+   String basePath = Files.basePath(path, extension);
+   basePath = Strings.replaceAll(basePath, ../, parentEscape + 
/).toString();
final AppendingStringBuffer buffer = new 
AppendingStringBuffer(basePath.length() + 16);
buffer.append(basePath);
 

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java?rev=657879r1=657878r2=657879view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java
 Mon May 19 10:38:36 2008
@@ -28,6 +28,7 @@
 import org.apache.wicket.markup.html.PackageResource;
 import org.apache.wicket.protocol.http.WebResponse;
 import org.apache.wicket.request.RequestParameters;
+import org.apache.wicket.util.string.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -151,7 +152,8 @@
.getParentFolderPlaceholder();
// get path component of resource key, 
replace' ..' with escape sequence to
// prevent crippled urls in browser
-   String path = resourceKey.substring(ix 
+ 1).replace(escapeString, ..);
+   String path = resourceKey.substring(ix 
+ 1);
+   path = Strings.replaceAll(path, 
escapeString, ..).toString();
 
if (PackageResource.exists(scope, path, 
null, null))
{




[jira] Created: (WICKET-1645) Syntactic errors in the manifest OSGi headers

2008-05-19 Thread Jawher Moussa (JIRA)
Syntactic errors in the manifest OSGi headers
-

 Key: WICKET-1645
 URL: https://issues.apache.org/jira/browse/WICKET-1645
 Project: Wicket
  Issue Type: Bug
  Components: wicket-datetime
Affects Versions: 1.4-M2
Reporter: Jawher Moussa


Hello,
  Not exactly sure about the error location, but upon deployment on a OSGi 
container (SpringSource Application Context, based on Equinox), I get the 
following trace:


[2008-05-19 19:39:26.041] fs-watcher   SPOP0004W The bundle 
'/home/djo/Java/servers/springsource-ap-1.0.0.beta3/repository/bundles/usr/wicket-datetime-1.4-m2.jar'
 could not be provisioned is its manifest is malformed. The error encountered 
whilst parsing the manifest was: The manifest identified by Name 'Wicket 
Date/Time', Symbolic Name 'org.apache.wicket.wicket-datetime', and Version 
'1.4.0.m2' has the following errors [org.antlr.runtime.NoViableAltException on 
'Package Header [Import]' at Char: 768,org.antlr.runtime.NoViableAltException 
on 'Package Header [Export]' at Char: 101]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r657887 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 10:53:49 2008
New Revision: 657887

URL: http://svn.apache.org/viewvc?rev=657887view=rev
Log:
WICKET-1428: StringBuilder - StringBuffer

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657887r1=657886r2=657887view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 Mon May 19 10:53:49 2008
@@ -21,7 +21,7 @@

tester.assertRenderedPage(ParentResourceEscapePathTestPage.class);
tester.assertNoErrorMessage();
 
-   final StringBuilder expectedHtml = new StringBuilder();
+   final StringBuffer expectedHtml = new StringBuffer();
expectedHtml.append(htmlheadwicket:linkscript src=\);
expectedHtml.append(expectedResourceUrl());
expectedHtml.append(\ 
type=\text/javascript\/script/wicket:link/head/html);
@@ -73,7 +73,7 @@
.getResourceSettings()
.getParentFolderPlaceholder();
 
-   final StringBuilder url = new StringBuilder();
+   final StringBuffer url = new StringBuffer();

url.append(resources/org.apache.wicket.ParentResourceEscapePathTestPage/);
 
for (int i = 0; i  3; i++)




svn commit: r657899 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java

2008-05-19 Thread ivaynberg
Author: ivaynberg
Date: Mon May 19 11:31:00 2008
New Revision: 657899

URL: http://svn.apache.org/viewvc?rev=657899view=rev
Log:
lets see if this fixes the compilation error

Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java?rev=657899r1=657898r2=657899view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxMultipleChoicePage.java
 Mon May 19 11:31:00 2008
@@ -78,7 +78,7 @@
}
 
/** Simple data class that acts as a model for the input fields. */
-   private static class Input implements IClusterable
+   public static class Input implements IClusterable
{
/** the selected sites. */
public ListString sites = new ArrayListString();




svn commit: r657905 - in /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples: compref/ library/

2008-05-19 Thread ivaynberg
Author: ivaynberg
Date: Mon May 19 11:40:10 2008
New Revision: 657905

URL: http://svn.apache.org/viewvc?rev=657905view=rev
Log:
fixing gerolf's mess :)

Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/DropDownChoicePage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListChoicePage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListMultipleChoicePage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/RadioChoicePage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/SelectPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TextAreaPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TextFieldPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/library/LibraryApplication.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxPage.java?rev=657905r1=657904r2=657905view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckBoxPage.java
 Mon May 19 11:40:10 2008
@@ -67,7 +67,7 @@
}
 
/** Simple data class that acts as a model for the input fields. */
-   private static class Input implements IClusterable
+   public static class Input implements IClusterable
{
/** a boolean. */
public Boolean bool = Boolean.TRUE;

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/DropDownChoicePage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/DropDownChoicePage.java?rev=657905r1=657904r2=657905view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/DropDownChoicePage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/DropDownChoicePage.java
 Mon May 19 11:40:10 2008
@@ -136,7 +136,7 @@
}
 
/** Simple data class that acts as a model for the input fields. */
-   private static class Input implements IClusterable
+   public static class Input implements IClusterable
{
/** the selected site. */
public String site;

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListChoicePage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListChoicePage.java?rev=657905r1=657904r2=657905view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListChoicePage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListChoicePage.java
 Mon May 19 11:40:10 2008
@@ -71,7 +71,7 @@
}
 
/** Simple data class that acts as a model for the input fields. */
-   private static class Input implements IClusterable
+   public static class Input implements IClusterable
{
/** the selected site. */
public String site = SITES.get(0);

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListMultipleChoicePage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListMultipleChoicePage.java?rev=657905r1=657904r2=657905view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListMultipleChoicePage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/ListMultipleChoicePage.java
 Mon May 19 11:40:10 2008
@@ -91,7 +91,7 @@
}
 
/** Simple data class that acts as a model for the input fields. */
-   private static class Input implements IClusterable
+   public static class Input implements IClusterable
{
/** the selected sites. */
public ListString sites = new ArrayListString();

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/RadioChoicePage.java
URL: 

svn commit: r657940 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket: ParentResourceEscapePathTest.java ParentResourceEscapePathTestPage.java markup/html/link/Autolink

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 12:49:30 2008
New Revision: 657940

URL: http://svn.apache.org/viewvc?rev=657940view=rev
Log:
fix failing tests

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657940r1=657939r2=657940view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 Mon May 19 12:49:30 2008
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.wicket;
 
 import org.apache.wicket.protocol.http.MockHttpServletRequest;

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java?rev=657940r1=657939r2=657940view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
 Mon May 19 12:49:30 2008
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.wicket;
 
 import org.apache.wicket.markup.html.WebPage;

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html?rev=657940r1=657939r2=657940view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html
 Mon May 19 12:49:30 2008
@@ -27,7 +27,7 @@
 link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test_myStyle.css/
 link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test2_myStyle.css/
 link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test3_myStyle_de_DE.css/
-link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/../../html/link/test2_myStyle.css/
+link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/$up$/$up$/html/link/test2_myStyle.css/
 a href=/root/test.htmlHome/a
 a 

svn commit: r657949 - /wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 12:58:07 2008
New Revision: 657949

URL: http://svn.apache.org/viewvc?rev=657949view=rev
Log:
workaround for javac not able to compile this class

Modified:

wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java?rev=657949r1=657948r2=657949view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java
 Mon May 19 12:58:07 2008
@@ -59,7 +59,7 @@
 
add(new FeedbackPanel(feedback));
add(new LabelObject(naam));
-   add(new SignInForm(signInForm));
+   add(new SignInForm(signInForm, this));
}
 
/**
@@ -76,7 +76,7 @@
/**
 * Sign in form.
 */
-   public final class SignInForm extends StatelessFormIValueMap
+   public static final class SignInForm extends StatelessFormIValueMap
{
/** Voor serializatie. */
private static final long serialVersionUID = 1L;
@@ -84,15 +84,19 @@
/** Moeten de inlog waarden bewaard blijven? */
private boolean rememberMe = true;
 
+   private final UsernamePasswordSignInPanel? panel;
+
/**
 * Constructor.
 * 
 * @param id
 *id of the form component
+* @param panel
 */
-   public SignInForm(final String id)
+   public SignInForm(final String id, 
UsernamePasswordSignInPanel? panel)
{
super(id, new CompoundPropertyModelIValueMap(new 
ValueMap()));
+   this.panel = panel;
 
// only save username, not passwords
add(new 
TextFieldString(username).setPersistent(rememberMe));
@@ -123,7 +127,7 @@
String username = values.getString(username);
String password = values.getString(password);
 
-   if (signIn(username, password))
+   if (panel.signIn(username, password))
{
if (!getPage().continueToOriginalDestination())
{
@@ -157,7 +161,7 @@
public void setRememberMe(boolean rememberMe)
{
this.rememberMe = rememberMe;
-   ((FormComponent ? 
)get(username)).setPersistent(rememberMe);
+   
((FormComponent?)get(username)).setPersistent(rememberMe);
}
}
 }




svn commit: r657948 - in /wicket/trunk/wicket/src/test/java/org/apache/wicket: ParentResourceEscapePathTest.java ParentResourceEscapePathTestPage.java markup/html/link/AutolinkPageExpectedResult_1.htm

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 12:57:05 2008
New Revision: 657948

URL: http://svn.apache.org/viewvc?rev=657948view=rev
Log:
WICKET-1428: fix license header and failing unit test

Modified:

wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657948r1=657947r2=657948view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 Mon May 19 12:57:05 2008
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.wicket;
 
 import org.apache.wicket.protocol.http.MockHttpServletRequest;

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java?rev=657948r1=657947r2=657948view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java
 Mon May 19 12:57:05 2008
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.wicket;
 
 import org.apache.wicket.markup.html.WebPage;

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html?rev=657948r1=657947r2=657948view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html
 Mon May 19 12:57:05 2008
@@ -27,7 +27,7 @@
 link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test_myStyle.css/
 link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test2_myStyle.css/
 link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test3_myStyle_de_DE.css/
-link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/../../html/link/test2_myStyle.css/
+link 
href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/$up$/$up$/html/link/test2_myStyle.css/
 a href=/root/test.htmlHome/a
 a 
href=?wicket:bookmarkablePage=%3Aorg.apache.wicket.markup.html.link.Page1Home/a
   a href=http://www.google.com;Google/a




svn commit: r657955 - /wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 13:07:21 2008
New Revision: 657955

URL: http://svn.apache.org/viewvc?rev=657955view=rev
Log:
WICKET-1428: incorrect order of attribute in unit test

Modified:

wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657955r1=657954r2=657955view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 Mon May 19 13:07:21 2008
@@ -38,9 +38,9 @@
tester.assertNoErrorMessage();
 
final StringBuilder expectedHtml = new StringBuilder();
-   expectedHtml.append(htmlheadwicket:linkscript src=\);
+   expectedHtml.append(htmlheadwicket:linkscript 
type=\text/javascript\ src=\);
expectedHtml.append(expectedResourceUrl());
-   expectedHtml.append(\ 
type=\text/javascript\/script/wicket:link/head/html);
+   expectedHtml.append(\/script/wicket:link/head/html);
 
assertEquals(expectedHtml.toString(), 
tester.getServletResponse().getDocument());
}




svn commit: r657958 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 13:10:14 2008
New Revision: 657958

URL: http://svn.apache.org/viewvc?rev=657958view=rev
Log:
WICKET-1428: wrong order of attributes in unit test

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657958r1=657957r2=657958view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
 Mon May 19 13:10:14 2008
@@ -38,9 +38,9 @@
tester.assertNoErrorMessage();
 
final StringBuffer expectedHtml = new StringBuffer();
-   expectedHtml.append(htmlheadwicket:linkscript src=\);
+   expectedHtml.append(htmlheadwicket:linkscript 
type=\text/javascript\ src=\);
expectedHtml.append(expectedResourceUrl());
-   expectedHtml.append(\ 
type=\text/javascript\/script/wicket:link/head/html);
+   expectedHtml.append(\/script/wicket:link/head/html);
 
assertEquals(expectedHtml.toString(), 
tester.getServletResponse().getDocument());
}




[jira] Assigned: (WICKET-1643) Bookmarkable / Stateless form submit bug

2008-05-19 Thread Johan Compagner (JIRA)

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

Johan Compagner reassigned WICKET-1643:
---

Assignee: Johan Compagner

 Bookmarkable / Stateless form submit bug
 

 Key: WICKET-1643
 URL: https://issues.apache.org/jira/browse/WICKET-1643
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.3, 1.4-M1
 Environment: Any
Reporter: Doug Donohoe
Assignee: Johan Compagner
 Fix For: 1.4-M3

 Attachments: 1643.patch


 A stateless bookmarkable form submission isn't working correctly for 
 submissions after reboot or session expiration.  This may be due to the use 
 of MixedParamUrlCodingStrategy:
  believe I've tracked down the problem to this code in 
 BookmarkablePageRequestTargetUrlCodingStrategy: 
 // do some extra work for checking whether this is a normal 
 request to a 
 // bookmarkable page, or a request to a stateless page (in 
 which case a 
 // wicket:interface parameter should be available 
 final String interfaceParameter = (String)parameters 
 
 .remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME); 
 if (interfaceParameter != null) 
 { 
 
 WebRequestCodingStrategy.addInterfaceParameters(interfaceParameter, 
 requestParameters); 
 return new 
 BookmarkableListenerInterfaceRequestTarget(pageMapName, 
 
 (Class)bookmarkablePageClassRef.get(), parameters, requestParameters 
 .getComponentPath(), 
 requestParameters.getInterfaceName(), 
 
 requestParameters.getVersionNumber()); 
 } 
 The issue is that the 'parameters' will never contain the 
 INTERFACE_PARAMETER_NAME because it would have been removed in 
 WebRequestCodingStrategy:decode:215 which as far as I can tell is always 
 called first (from RequestCycle.step.RESOLVE_TARGET:1233). 
 The 'requestParameters' should already have the interface parameters, so it 
 isn't clear why the addInterfaceParameters() logic is being called again (it 
 is already called in WebRequestCodingStrategy:decode:200). 
 I've got a patch forthcoming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r657973 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 14:01:31 2008
New Revision: 657973

URL: http://svn.apache.org/viewvc?rev=657973view=rev
Log:
move initialization code from constructor to init()

Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java?rev=657973r1=657972r2=657973view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
 Mon May 19 14:01:31 2008
@@ -28,19 +28,12 @@
  */
 public class LinkomaticApplication extends WicketExampleApplication
 {
-   /**
-* Constructor
-*/
-   public LinkomaticApplication()
-   {
-   getSharedResources().add(cancelButton, new 
DefaultButtonImageResource(Cancel));
-   }
 
/**
 * @see org.apache.wicket.Application#getHomePage()
 */
@Override
-   public Class ? extends Page ?  getHomePage()
+   public Class? extends Page? getHomePage()
{
return Home.class;
}
@@ -51,6 +44,7 @@
@Override
protected void init()
{
+   getSharedResources().add(cancelButton, new 
DefaultButtonImageResource(Cancel));
// log host name and server time in the browser's status bar
getRequestCycleSettings().addResponseFilter(new 
ServerHostNameAndTimeFilter());
}




svn commit: r657975 - /wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 14:02:54 2008
New Revision: 657975

URL: http://svn.apache.org/viewvc?rev=657975view=rev
Log:
WICKET-1428: move initialization code from constructor to init()

Modified:

wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java?rev=657975r1=657974r2=657975view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
 Mon May 19 14:02:54 2008
@@ -28,16 +28,9 @@
 public class LinkomaticApplication extends WicketExampleApplication
 {
/**
-* Constructor
-*/
-   public LinkomaticApplication()
-   {
-   getSharedResources().add(cancelButton, new 
DefaultButtonImageResource(Cancel));
-   }
-
-   /**
 * @see org.apache.wicket.Application#getHomePage()
 */
+   @Override
public Class getHomePage()
{
return Home.class;
@@ -46,8 +39,10 @@
/**
 * @see org.apache.wicket.protocol.http.WebApplication#init()
 */
+   @Override
protected void init()
{
+   getSharedResources().add(cancelButton, new 
DefaultButtonImageResource(Cancel));
// log host name and server time in the browser's status bar
getRequestCycleSettings().addResponseFilter(new 
ServerHostNameAndTimeFilter());
}




svn commit: r657977 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 14:06:36 2008
New Revision: 657977

URL: http://svn.apache.org/viewvc?rev=657977view=rev
Log:
comment the uncommented code again

Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java?rev=657977r1=657976r2=657977view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
 Mon May 19 14:06:36 2008
@@ -167,31 +167,31 @@
if (resources.isEmpty())
{
get(page);
-   PackageName name = PackageName.forClass(page);
-   ClassLoader loader = page.getClassLoader();
-   String path = 
Strings.replaceAll(name.getName(), ., /).toString();
-   try
-   {
-   // gives the urls for each place where 
the package
-   // path could be found. There could be 
multiple
-   // jar files containing the same 
package, so each
-   // jar file has its own url.
-
-   EnumerationURL urls = 
loader.getResources(path);
-   while (urls.hasMoreElements())
-   {
-   URL url = urls.nextElement();
-
-   // the url points to the 
directory structure
-   // embedded in the classpath.
-
-   getPackageContents(url);
-   }
-   }
-   catch (IOException e)
-   {
-   log.error(Unable to read resource for: 
 + path, e);
-   }
+// PackageName name = PackageName.forClass(page);
+// ClassLoader loader = page.getClassLoader();
+// String path = Strings.replaceAll(name.getName(), ., /).toString();
+// try
+// {
+// // gives the urls for each place where the package
+// // path could be found. There could be multiple
+// // jar files containing the same package, so each
+// // jar file has its own url.
+//
+// EnumerationURL urls = loader.getResources(path);
+// while (urls.hasMoreElements())
+// {
+// URL url = urls.nextElement();
+//
+// // the url points to the directory structure
+// // embedded in the classpath.
+//
+// getPackageContents(url);
+// }
+// }
+// catch (IOException e)
+// {
+// log.error(Unable to read resource for:  + path, e);
+// }
}
return resources;
}




svn commit: r657980 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/BookmarkablePageRequestTargetUrlCodingStrategy.java

2008-05-19 Thread jcompagner
Author: jcompagner
Date: Mon May 19 14:08:31 2008
New Revision: 657980

URL: http://svn.apache.org/viewvc?rev=657980view=rev
Log:
WICKET-1643 Bookmarkable / Stateless form submit bug
Fix when the stateless form is mounted then the interface paramters can come in 
differently

Modified:

wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/BookmarkablePageRequestTargetUrlCodingStrategy.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/BookmarkablePageRequestTargetUrlCodingStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/BookmarkablePageRequestTargetUrlCodingStrategy.java?rev=657980r1=657979r2=657980view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/BookmarkablePageRequestTargetUrlCodingStrategy.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/BookmarkablePageRequestTargetUrlCodingStrategy.java
 Mon May 19 14:08:31 2008
@@ -32,9 +32,8 @@
  * 
  * @author Eelco Hillenius
  */
-public class BookmarkablePageRequestTargetUrlCodingStrategy
-   extends
-   AbstractRequestTargetUrlCodingStrategy
+public class BookmarkablePageRequestTargetUrlCodingStrategy extends
+   AbstractRequestTargetUrlCodingStrategy
 {
/** bookmarkable page class. */
protected final WeakReference/* Class */bookmarkablePageClassRef;
@@ -53,7 +52,7 @@
 *the page map name if any
 */
public BookmarkablePageRequestTargetUrlCodingStrategy(final String 
mountPath,
-   final Class bookmarkablePageClass, String pageMapName)
+   final Class bookmarkablePageClass, String pageMapName)
{
super(mountPath);
 
@@ -72,38 +71,48 @@
public IRequestTarget decode(RequestParameters requestParameters)
{
final String parametersFragment = 
requestParameters.getPath().substring(
-   getMountPath().length());
+   getMountPath().length());
final PageParameters parameters = new 
PageParameters(decodeParameters(parametersFragment,
-   requestParameters.getParameters()));
-   String pageMapName = 
WebRequestCodingStrategy.decodePageMapName((String)parameters
-   .remove(WebRequestCodingStrategy.PAGEMAP));
-   if (requestParameters.getPageMapName() == null)
-   {
-   requestParameters.setPageMapName(pageMapName);
-   }
-   else
-   {
-   pageMapName = requestParameters.getPageMapName();
-   }
+   requestParameters.getParameters()));
 
// do some extra work for checking whether this is a normal 
request to a
// bookmarkable page, or a request to a stateless page (in 
which case a
// wicket:interface parameter should be available
-   final String interfaceParameter = (String)parameters
-   
.remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME);
 
-   if (interfaceParameter != null)
+   // the page map name can be defined already by logic done in
+   // WebRequestCodingStrategy.decode(),
+   // but it could also be done by the decodeParameters() call
+   // So we always remove the pagemap parameter just in case.
+   String pageMapNameEncoded = 
(String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
+   if (requestParameters.getPageMapName() == null)
+   {
+   requestParameters.setPageMapName(pageMapNameEncoded);
+   }
+
+   // the interface can be defined already by logic done in
+   // WebRequestCodingStrategy.decode(),
+   // but it could also be done by the decodeParameters() call
+   // So we always remove the interface parameter just in case.
+   String interfaceParameter = 
(String)parameters.remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME);
+   if (requestParameters.getInterfaceName() == null)
{

WebRequestCodingStrategy.addInterfaceParameters(interfaceParameter, 
requestParameters);
-   return new 
BookmarkableListenerInterfaceRequestTarget(pageMapName,
-   (Class)bookmarkablePageClassRef.get(), 
parameters, requestParameters
-   .getComponentPath(), 
requestParameters.getInterfaceName(),
-   requestParameters.getVersionNumber());
}
+
+ 

svn commit: r657981 - in /wicket/trunk/wicket-auth-roles/src: main/java/org/apache/wicket/authorization/strategies/role/metadata/ test/java/org/apache/wicket/authorization/strategies/role/metadata/

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 14:09:43 2008
New Revision: 657981

URL: http://svn.apache.org/viewvc?rev=657981view=rev
Log:
losen generics to fix compilation errors with javac

Modified:

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java

wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java

Modified: 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java?rev=657981r1=657980r2=657981view=diff
==
--- 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java
 (original)
+++ 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java
 Mon May 19 14:09:43 2008
@@ -38,7 +38,7 @@
private static final long serialVersionUID = 1L;
 
/** Holds roles objects for component classes */
-   private final MapClass? extends Component?, Roles 
rolesForComponentClass = new HashMapClass? extends Component?, Roles();
+   private final MapClass? extends Component, Roles 
rolesForComponentClass = new HashMapClass? extends Component, Roles();
 
/**
 * Gives the given role permission to instantiate the given class.
@@ -48,7 +48,7 @@
 * @param rolesToAdd
 *The roles to add
 */
-   public final void authorize(final Class? extends Component? 
componentClass,
+   public final void authorize(final Class? extends Component 
componentClass,
final Roles rolesToAdd)
{
if (componentClass == null)
@@ -78,7 +78,7 @@
 * @param componentClass
 *The component class
 */
-   public final void authorizeAll(final Class? extends Component? 
componentClass)
+   public final void authorizeAll(final Class? extends Component 
componentClass)
{
if (componentClass == null)
{
@@ -96,7 +96,7 @@
 * @return the roles that have a binding with the given component 
class, or null if no entries
 * are found
 */
-   public Roles authorizedRoles(final Class? extends Component? 
componentClass)
+   public Roles authorizedRoles(final Class? extends Component 
componentClass)
{
if (componentClass == null)
{
@@ -114,7 +114,7 @@
 * @param rolesToRemove
 *The role to deny
 */
-   public final void unauthorize(final Class? extends Component? 
componentClass,
+   public final void unauthorize(final Class? extends Component 
componentClass,
final Roles rolesToRemove)
{
if (componentClass == null)
@@ -150,7 +150,7 @@
/**
 * @return gets map with roles objects for a component classes
 */
-   protected final MapClass? extends Component?, Roles 
getRolesForComponentClass()
+   protected final MapClass? extends Component, Roles 
getRolesForComponentClass()
{
return rolesForComponentClass;
}

Modified: 
wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java?rev=657981r1=657980r2=657981view=diff
==
--- 
wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java
 (original)
+++ 
wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java
 Mon May 19 14:09:43 2008
@@ -55,18 +55,17 @@
 * 
 * @throws Exception
 */
-   @SuppressWarnings(unchecked)
public void testAdd1() throws Exception
{
InstantiationPermissions permissions = new 
InstantiationPermissions();
-   permissions.authorize((Class? extends 
Component?)Page.class, new Roles(jonathan));
-   permissions.authorize((Class? extends 
Component?)Page.class, new Roles(johan));
-   permissions.authorize((Class? extends 
Component?)Page.class, new Roles(maurice));
-   permissions.authorize((Class? extends 
Component?)Page.class, new Roles(eelco));
+   permissions.authorize(Page.class, 

[jira] Commented: (WICKET-1643) Bookmarkable / Stateless form submit bug

2008-05-19 Thread Johan Compagner (JIRA)

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

Johan Compagner commented on WICKET-1643:
-

applied (still need to backport to 1.3)

 Bookmarkable / Stateless form submit bug
 

 Key: WICKET-1643
 URL: https://issues.apache.org/jira/browse/WICKET-1643
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.3, 1.4-M1
 Environment: Any
Reporter: Doug Donohoe
Assignee: Johan Compagner
 Fix For: 1.4-M3

 Attachments: 1643.patch


 A stateless bookmarkable form submission isn't working correctly for 
 submissions after reboot or session expiration.  This may be due to the use 
 of MixedParamUrlCodingStrategy:
  believe I've tracked down the problem to this code in 
 BookmarkablePageRequestTargetUrlCodingStrategy: 
 // do some extra work for checking whether this is a normal 
 request to a 
 // bookmarkable page, or a request to a stateless page (in 
 which case a 
 // wicket:interface parameter should be available 
 final String interfaceParameter = (String)parameters 
 
 .remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME); 
 if (interfaceParameter != null) 
 { 
 
 WebRequestCodingStrategy.addInterfaceParameters(interfaceParameter, 
 requestParameters); 
 return new 
 BookmarkableListenerInterfaceRequestTarget(pageMapName, 
 
 (Class)bookmarkablePageClassRef.get(), parameters, requestParameters 
 .getComponentPath(), 
 requestParameters.getInterfaceName(), 
 
 requestParameters.getVersionNumber()); 
 } 
 The issue is that the 'parameters' will never contain the 
 INTERFACE_PARAMETER_NAME because it would have been removed in 
 WebRequestCodingStrategy:decode:215 which as far as I can tell is always 
 called first (from RequestCycle.step.RESOLVE_TARGET:1233). 
 The 'requestParameters' should already have the interface parameters, so it 
 isn't clear why the addInterfaceParameters() logic is being called again (it 
 is already called in WebRequestCodingStrategy:decode:200). 
 I've got a patch forthcoming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Assigned: (WICKET-1645) Syntactic errors in the manifest OSGi headers

2008-05-19 Thread Johan Compagner (JIRA)

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

Johan Compagner reassigned WICKET-1645:
---

Assignee: Gerolf Seitz

i think you also where busy with other stuff for this right?

 Syntactic errors in the manifest OSGi headers
 -

 Key: WICKET-1645
 URL: https://issues.apache.org/jira/browse/WICKET-1645
 Project: Wicket
  Issue Type: Bug
  Components: wicket-datetime
Affects Versions: 1.4-M2
Reporter: Jawher Moussa
Assignee: Gerolf Seitz

 Hello,
   Not exactly sure about the error location, but upon deployment on a OSGi 
 container (SpringSource Application Context, based on Equinox), I get the 
 following trace:
 [2008-05-19 19:39:26.041] fs-watcher   SPOP0004W The bundle 
 '/home/djo/Java/servers/springsource-ap-1.0.0.beta3/repository/bundles/usr/wicket-datetime-1.4-m2.jar'
  could not be provisioned is its manifest is malformed. The error encountered 
 whilst parsing the manifest was: The manifest identified by Name 'Wicket 
 Date/Time', Symbolic Name 'org.apache.wicket.wicket-datetime', and Version 
 '1.4.0.m2' has the following errors [org.antlr.runtime.NoViableAltException 
 on 'Package Header [Import]' at Char: 
 768,org.antlr.runtime.NoViableAltException on 'Package Header [Export]' at 
 Char: 101]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-1645) Syntactic errors in the manifest OSGi headers

2008-05-19 Thread Gerolf Seitz (JIRA)

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

Gerolf Seitz commented on WICKET-1645:
--

i think this is because we have a folder (not package) called yahoo-dom-event 
and in the osgi manifest, this is in the import and export package header.

 Syntactic errors in the manifest OSGi headers
 -

 Key: WICKET-1645
 URL: https://issues.apache.org/jira/browse/WICKET-1645
 Project: Wicket
  Issue Type: Bug
  Components: wicket-datetime
Affects Versions: 1.4-M2
Reporter: Jawher Moussa
Assignee: Gerolf Seitz

 Hello,
   Not exactly sure about the error location, but upon deployment on a OSGi 
 container (SpringSource Application Context, based on Equinox), I get the 
 following trace:
 [2008-05-19 19:39:26.041] fs-watcher   SPOP0004W The bundle 
 '/home/djo/Java/servers/springsource-ap-1.0.0.beta3/repository/bundles/usr/wicket-datetime-1.4-m2.jar'
  could not be provisioned is its manifest is malformed. The error encountered 
 whilst parsing the manifest was: The manifest identified by Name 'Wicket 
 Date/Time', Symbolic Name 'org.apache.wicket.wicket-datetime', and Version 
 '1.4.0.m2' has the following errors [org.antlr.runtime.NoViableAltException 
 on 'Package Header [Import]' at Char: 
 768,org.antlr.runtime.NoViableAltException on 'Package Header [Export]' at 
 Char: 101]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r658001 - in /wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role: annotations/ metadata/

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 14:58:35 2008
New Revision: 658001

URL: http://svn.apache.org/viewvc?rev=658001view=rev
Log:
take this, javac! (aka another shot at generics that javac is able to process)

Modified:

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/MetaDataRoleAuthorizationStrategy.java

Modified: 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java?rev=658001r1=658000r2=658001view=diff
==
--- 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
 (original)
+++ 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
 Mon May 19 14:58:35 2008
@@ -46,8 +46,7 @@
/**
 * @see 
org.apache.wicket.authorization.IAuthorizationStrategy#isInstantiationAuthorized(java.lang.Class)
 */
-   @SuppressWarnings(unchecked)
-   public boolean isInstantiationAuthorized(final Class componentClass)
+   public T extends Component? boolean isInstantiationAuthorized(final 
ClassT componentClass)
{
// We are authorized unless we are found not to be
boolean authorized = true;
@@ -64,7 +63,7 @@
}
 
// Check class annotation
-   final AuthorizeInstantiation classAnnotation = 
(AuthorizeInstantiation)componentClass.getAnnotation(AuthorizeInstantiation.class);
+   final AuthorizeInstantiation classAnnotation = 
componentClass.getAnnotation(AuthorizeInstantiation.class);
if (classAnnotation != null)
{
// If roles are defined for the class, that overrides 
the package
@@ -78,11 +77,10 @@
 * @see 
org.apache.wicket.authorization.IAuthorizationStrategy#isActionAuthorized(org.apache.wicket.Component,
 *  org.apache.wicket.authorization.Action)
 */
-   @SuppressWarnings(unchecked)
public boolean isActionAuthorized(final Component? component, final 
Action action)
{
// Get component's class
-   final Class? extends Component? componentClass = (Class? 
extends Component?)component.getClass();
+   final Class? componentClass = component.getClass();
 
// Check for a single action
if (!check(action, 
componentClass.getAnnotation(AuthorizeAction.class)))

Modified: 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java?rev=658001r1=658000r2=658001view=diff
==
--- 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java
 (original)
+++ 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java
 Mon May 19 14:58:35 2008
@@ -38,17 +38,18 @@
private static final long serialVersionUID = 1L;
 
/** Holds roles objects for component classes */
-   private final MapClass? extends Component, Roles 
rolesForComponentClass = new HashMapClass? extends Component, Roles();
+   private final MapClass? extends Component?, Roles 
rolesForComponentClass = new HashMapClass? extends Component?, Roles();
 
/**
 * Gives the given role permission to instantiate the given class.
 * 
+* @param T
 * @param componentClass
 *The component class
 * @param rolesToAdd
 *The roles to add
 */
-   public final void authorize(final Class? extends Component 
componentClass,
+   public final T extends Component? void authorize(final ClassT 
componentClass,
final Roles rolesToAdd)
{
if (componentClass == null)
@@ -75,10 +76,11 @@
 * a role was previously authorized for that class. If no roles where 
previously authorized the
 * effect of the unauthorize 

svn commit: r658004 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/signin/ wicket-examples/src/main/java/org/apache/wicket/examples/signin2/ wicket/src/main/java/org/apac

2008-05-19 Thread gseitz
Author: gseitz
Date: Mon May 19 15:19:46 2008
New Revision: 658004

URL: http://svn.apache.org/viewvc?rev=658004view=rev
Log:
apply changes due to different IAuthorizationStrategy signature

Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/CompoundAuthorizationStrategy.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/action/ActionAuthorizationStrategy.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/AbstractPageAuthorizationStrategy.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/AjaxBehaviorEnabledTest.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/intercept/InterceptTest.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java?rev=658004r1=658003r2=658004view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java
 Mon May 19 15:19:46 2008
@@ -72,7 +72,8 @@
return true;
}
 
-   public boolean isInstantiationAuthorized(Class? 
extends Component? componentClass)
+   public T extends Component? boolean 
isInstantiationAuthorized(
+   ClassT componentClass)
{
if 
(AuthenticatedWebPage.class.isAssignableFrom(componentClass))
{

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java?rev=658004r1=658003r2=658004view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java
 Mon May 19 15:19:46 2008
@@ -80,7 +80,8 @@
return true;
}
 
-   public boolean isInstantiationAuthorized(Class? 
extends Component? componentClass)
+   public T extends Component? boolean 
isInstantiationAuthorized(
+   ClassT componentClass)
{
if 
(AuthenticatedWebPage.class.isAssignableFrom(componentClass))
{

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java?rev=658004r1=658003r2=658004view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java
 Mon May 19 15:19:46 2008
@@ -40,7 +40,7 @@
/**
 * @see 
org.apache.wicket.authorization.IAuthorizationStrategy#isInstantiationAuthorized(java.lang.Class)
 */
-   public boolean isInstantiationAuthorized(final Class? extends 
Component? c)
+   public T extends Component? boolean 
isInstantiationAuthorized(final ClassT c)
{
return true;
}
@@ -66,11 +66,13 @@
 * [EMAIL PROTECTED] 
org.apache.wicket.RestartResponseAtInterceptPageException} in your 
implementation of
 * this method.
 * 
+* @param T
+* 
 * @param componentClass
 *The component class to check
 * @return Whether the given component may be created
 */
-   boolean isInstantiationAuthorized(Class? extends Component? 
componentClass);
+   T extends Component? boolean isInstantiationAuthorized(ClassT 
componentClass);
 
/**

svn commit: r658018 - in /wicket/trunk/wicket-examples: ./ src/main/java/org/apache/wicket/examples/stateless/

2008-05-19 Thread jcompagner
Author: jcompagner
Date: Mon May 19 15:51:20 2008
New Revision: 658018

URL: http://svn.apache.org/viewvc?rev=658018view=rev
Log:
added more mount examples for stateless form pages

Added:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessPage1.html

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessPage1.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessPage2.html

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessPage2.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessPage3.html

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessPage3.java
Modified:
wicket/trunk/wicket-examples/.tomcatplugin

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.html

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/StatelessApplication.java

Modified: wicket/trunk/wicket-examples/.tomcatplugin
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/.tomcatplugin?rev=658018r1=658017r2=658018view=diff
==
Binary files - no diff available.

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.html
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.html?rev=658018r1=658017r2=658018view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.html
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.html
 Mon May 19 15:51:20 2008
@@ -10,10 +10,16 @@
body
span wicket:id=message id=messageMessage goes here/span
br /
-   a wicket:id=linkToStatelessPage href=#go to another
-   stateless page/a
+   a wicket:id=linkToStatelessPage href=#go to another 
default stateless page/a
br /
-   a wicket:id=linkToStatefulPage href=#go to a stateful page
-   (triggers session creation if not already done so)/a
+   a wicket:id=linkToStatelessPage1 href=#go to another 
query strategy mounted stateless page/a
+   br /
+   a wicket:id=linkToStatelessPage2 href=#go to another 
mixed strategy mounted stateless page/a
+   br /
+   a wicket:id=linkToStatelessPage3 href=#go to another 
index strategy mounted stateless page/a
+   br /
+   a wicket:id=linkToStatefulPage href=#go to a stateful 
page (triggers session creation if not already done so)/a
+   br /
+   a wicket:id=invalidatesession href=#Invalidate the 
session/a
/body
 /html

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.java?rev=658018r1=658017r2=658018view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stateless/Index.java
 Mon May 19 15:51:20 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.wicket.examples.stateless;
 
+import org.apache.wicket.Session;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
@@ -37,6 +38,9 @@
add(new LabelString(message, new SessionModel()));
// First a normal bookmarkable link (which is stateless by 
default)
add(new BookmarkablePageLink(linkToStatelessPage, 
StatelessPage.class));
+   add(new BookmarkablePageLink(linkToStatelessPage1, 
StatelessPage1.class));
+   add(new BookmarkablePageLink(linkToStatelessPage2, 
StatelessPage2.class));
+   add(new BookmarkablePageLink(linkToStatelessPage3, 
StatelessPage3.class));
// The second with a stateless link, so the onclick will be 
called but
// on a stateless page.
add(new StatelessLinkVoid(linkToStatefulPage)
@@ -50,5 +54,17 @@
setResponsePage(StatefulPage.class);
}
});
+   add(new StatelessLinkVoid(invalidatesession)
+   {
+
+   

[jira] Commented: (WICKET-1627) AbstractRequestTargetUrlCodingStrategy improper user of URLEncoder.encode

2008-05-19 Thread Johan Compagner (JIRA)

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

Johan Compagner commented on WICKET-1627:
-

i applied the patch. what i still find strange is that we still have places 
where we dont encode stuff like at least 2 encode methods of 
WebRequestCodingStrategy, i guess we also need to look at that a bit more

 AbstractRequestTargetUrlCodingStrategy improper user of URLEncoder.encode
 -

 Key: WICKET-1627
 URL: https://issues.apache.org/jira/browse/WICKET-1627
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.1, 1.3.2, 1.3.3, 1.4-M1
 Environment: Tomcat or Jetty (probably others)
Reporter: Doug Donohoe
Assignee: Johan Compagner
 Fix For: 1.4-M3

 Attachments: 1627and1624.v4.patch


 The use of URLEncoder.encode is incorrect in this scenario.  The URLEncoder 
 is meant for encoding query string values - not values that appear in the 
 path portion of a URI.
 Because the AbstractRequestTargetUrlCodingStrategy is used by other classes 
 to encode values that appear in the path, problems can occur when that path 
 has spaces.   For example, the parameter message with spaces 
 and+some+pluses is encoded as follows in a URL:
 http://localhost:8080/bugs/home/message/message+with+spaces+and%2Bsome%2Bpluses/
 However, the resulting request.getServletPath() call returns this:
 /home/message/message+with+spaces+and+some+plusses=bug/ 
 Note that the + in the path are not turned back into spaces.  This is the 
 correct behavior and is seen in both Tomcat and Jetty.
 See the RFC (http://www.ietf.org/rfc/rfc2396.txt) for a full description of 
 what should or should not be encoded.
   /**
* Url encodes a string
* 
* @param string
*string to be encoded
* @return encoded string
*/
   protected String urlEncode(String string)
   {
   try
   {
   return URLEncoder.encode(string, 
 Application.get().getRequestCycleSettings()
   .getResponseRequestEncoding());
   }
   catch (UnsupportedEncodingException e)
   {
   log.error(e.getMessage(), e);
   return string;
   }
   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-1627) AbstractRequestTargetUrlCodingStrategy improper user of URLEncoder.encode

2008-05-19 Thread Doug Donohoe (JIRA)

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

Doug Donohoe commented on WICKET-1627:
--

Thanks Johan.  I'll take a look at that class to see if I can offer any insight.

 AbstractRequestTargetUrlCodingStrategy improper user of URLEncoder.encode
 -

 Key: WICKET-1627
 URL: https://issues.apache.org/jira/browse/WICKET-1627
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.1, 1.3.2, 1.3.3, 1.4-M1
 Environment: Tomcat or Jetty (probably others)
Reporter: Doug Donohoe
Assignee: Johan Compagner
 Fix For: 1.4-M3

 Attachments: 1627and1624.v4.patch


 The use of URLEncoder.encode is incorrect in this scenario.  The URLEncoder 
 is meant for encoding query string values - not values that appear in the 
 path portion of a URI.
 Because the AbstractRequestTargetUrlCodingStrategy is used by other classes 
 to encode values that appear in the path, problems can occur when that path 
 has spaces.   For example, the parameter message with spaces 
 and+some+pluses is encoded as follows in a URL:
 http://localhost:8080/bugs/home/message/message+with+spaces+and%2Bsome%2Bpluses/
 However, the resulting request.getServletPath() call returns this:
 /home/message/message+with+spaces+and+some+plusses=bug/ 
 Note that the + in the path are not turned back into spaces.  This is the 
 correct behavior and is seen in both Tomcat and Jetty.
 See the RFC (http://www.ietf.org/rfc/rfc2396.txt) for a full description of 
 what should or should not be encoded.
   /**
* Url encodes a string
* 
* @param string
*string to be encoded
* @return encoded string
*/
   protected String urlEncode(String string)
   {
   try
   {
   return URLEncoder.encode(string, 
 Application.get().getRequestCycleSettings()
   .getResponseRequestEncoding());
   }
   catch (UnsupportedEncodingException e)
   {
   log.error(e.getMessage(), e);
   return string;
   }
   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.