[jira] Commented: (WICKET-1795) Make it possible for to encode unicode strings in component

2008-09-28 Thread Timo Rantalaiho (JIRA)

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

Timo Rantalaiho commented on WICKET-1795:
-

Martijn, surely you can have non-ASCII characters in the markup file as long as 
you ensure that the markup file will be read with the correct encoding (for 
example, by setting the file.encoding system property to utf-8). In many 
minor languages, such as Finnish, this makes a lot of sense -- for example, 
instructions of use in Finnish would be Käyttöohje written with a common 
encoding that has more than just ASCII (such as UTF-8 or ISO-Latin-1 or 
ISO-Latin-9 or cp1252), but Kauml;yttouml;ohje in the escaped form. It's 
very handy to have the readable form everywhere, these character entity 
encodings are a thing of the past century to me :)

Nino, can this issue be closed?

 Make it possible for to encode unicode strings in component
 ---

 Key: WICKET-1795
 URL: https://issues.apache.org/jira/browse/WICKET-1795
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.3.4
Reporter: Nino Martinez
Priority: Minor
 Fix For: 1.3.5

 Attachments: wicketComponentEncoding.patch

   Original Estimate: 0.33h
  Remaining Estimate: 0.33h

 It would be very nice to be able to tell a component for example label that 
 it had to encode unicode chars into equalent html encoding, I've supplied a 
 patch aswell. 
 Additionally im not sure what goes for the wicket:message tag? It would be 
 very nice to have a switch in markupsettings to decide all encoding.

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



svn commit: r699973 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src: main/java/org/apache/wicket/util/tester/ test/java/org/apache/wicket/util/tester/

2008-09-28 Thread thrantal
Author: thrantal
Date: Sun Sep 28 20:30:01 2008
New Revision: 699973

URL: http://svn.apache.org/viewvc?rev=699973view=rev
Log:
WICKET-1582: Allowed surpassing the existing RequestCycle reuse in 
executeAjaxEvent() as a more cleaner workaround for the problem. See 
http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561
 for discussion.

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?rev=699973r1=699972r2=699973view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
 Sun Sep 28 20:30:01 2008
@@ -1128,19 +1128,8 @@
failMessage = No AjaxEventBehavior found on component:  + 
component.getId() +
 which matches the event:  + event;
notNull(failMessage, ajaxEventBehavior);
+   WebRequestCycle requestCycle = resolveRequestCycle();
 
-   // initialize the request only if needed to allow the user to 
pass
-   // request parameters, see
-   // WICKET-254
-   WebRequestCycle requestCycle;
-   if (RequestCycle.get() == null)
-   {
-   requestCycle = setupRequestAndResponse(true);
-   }
-   else
-   {
-   requestCycle = (WebRequestCycle)RequestCycle.get();
-   }
// when the requestcycle is not created via 
setupRequestAndResponse(true), it can happen
// that the request is not an ajax request - we have to set 
the header manually
if (!requestCycle.getWebRequest().isAjax())
@@ -1165,6 +1154,23 @@
processRequestCycle(requestCycle);
}
 
+   protected WebRequestCycle resolveRequestCycle()
+   {
+   // initialize the request only if needed to allow the user to 
pass
+   // request parameters, see
+   // WICKET-254
+   WebRequestCycle requestCycle;
+   if (RequestCycle.get() == null)
+   {
+   requestCycle = setupRequestAndResponse(true);
+   }
+   else
+   {
+   requestCycle = (WebRequestCycle)RequestCycle.get();
+   }
+   return requestCycle;
+   }
+
/**
 * Retrieves a codeTagTester/code based on a 
codewicket:id/code. If more
 * codeComponent/codes exist with the same codewicket:id/code 
in the markup, only

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java?rev=699973r1=699972r2=699973view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java
 Sun Sep 28 20:30:01 2008
@@ -61,6 +61,7 @@
 
protected void onSubmit(AjaxRequestTarget target, Form 
form)
{
+   target.addComponent(this);
}
});
}

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java?rev=699973r1=699972r2=699973view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
 Sun Sep 28 20:30:01 2008
@@ -20,11 +20,8 @@
 
 import junit.framework.TestCase;
 
-import 

[jira] Assigned: (WICKET-1582) WicketTester executeAjaxEvent onclick generating non-AJAX response

2008-09-28 Thread Timo Rantalaiho (JIRA)

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

Timo Rantalaiho reassigned WICKET-1582:
---

Assignee: Timo Rantalaiho  (was: Maurice Marrink)

 WicketTester executeAjaxEvent onclick generating non-AJAX response
 --

 Key: WICKET-1582
 URL: https://issues.apache.org/jira/browse/WICKET-1582
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.4
 Environment: Wicket 1.3-SNAPSHOT as of today
Reporter: Nick Johnson
Assignee: Timo Rantalaiho
 Fix For: 1.3.5

 Attachments: wicket1582.jar


 Executing: 
   tester.executeAjaxEvent(linky, onclick);
   tester.assertComponentOnAjaxResponse(component);
 throws an exception saying The Previous response was not an AJAX response. 
 You need to execute an AJAX event, using clickLink, before using this assert 
 although executeAjaxEvent should be resulting in an AJAX response (and prior 
 to 1.3.3 it did).
 Executing tester.clickLink(linky), which probably should be equivalent to 
 the above executeAjaxEvent, does work.
 I'll attach a simple testcase demonstrating this behaviour.

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



svn commit: r699976 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/util/tester/BaseWicketTester.java test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java test/java/or

2008-09-28 Thread thrantal
Author: thrantal
Date: Sun Sep 28 20:41:11 2008
New Revision: 699976

URL: http://svn.apache.org/viewvc?rev=699976view=rev
Log:
WICKET-1582: Allowed surpassing the existing RequestCycle reuse in 
executeAjaxEvent() as a cleaner workaround for the problem. See 
http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561
 for discussion.

Modified:

wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?rev=699976r1=699975r2=699976view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
 Sun Sep 28 20:41:11 2008
@@ -1147,19 +1147,8 @@
failMessage = No AjaxEventBehavior found on component:  + 
component.getId() +
 which matches the event:  + event;
notNull(failMessage, ajaxEventBehavior);
+   WebRequestCycle requestCycle = resolveRequestCycle();
 
-   // initialize the request only if needed to allow the user to 
pass
-   // request parameters, see
-   // WICKET-254
-   WebRequestCycle requestCycle;
-   if (RequestCycle.get() == null)
-   {
-   requestCycle = setupRequestAndResponse(true);
-   }
-   else
-   {
-   requestCycle = (WebRequestCycle)RequestCycle.get();
-   }
// when the requestcycle is not created via 
setupRequestAndResponse(true), it can happen
// that the request is not an ajax request - we have to set 
the header manually
if (!requestCycle.getWebRequest().isAjax())
@@ -1184,6 +1173,23 @@
processRequestCycle(requestCycle);
}
 
+   protected WebRequestCycle resolveRequestCycle()
+   {
+   // initialize the request only if needed to allow the user to 
pass
+   // request parameters, see
+   // WICKET-254
+   WebRequestCycle requestCycle;
+   if (RequestCycle.get() == null)
+   {
+   requestCycle = setupRequestAndResponse(true);
+   }
+   else
+   {
+   requestCycle = (WebRequestCycle)RequestCycle.get();
+   }
+   return requestCycle;
+   }
+
/**
 * Retrieves a codeTagTester/code based on a 
codewicket:id/code. If more
 * codeComponent/codes exist with the same codewicket:id/code 
in the markup, only the

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java?rev=699976r1=699975r2=699976view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/MockPageWithFormAndCheckGroup.java
 Sun Sep 28 20:41:11 2008
@@ -46,7 +46,7 @@
 */
public MockPageWithFormAndCheckGroup()
{
-   Form? form = new Form(form);
+   Form? form = new FormVoid(form);
add(form);
 
 
@@ -64,6 +64,7 @@
@Override
protected void onSubmit(AjaxRequestTarget target, 
Form? form)
{
+   target.addComponent(this);
}
});
}

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java?rev=699976r1=699975r2=699976view=diff
==
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java
 Sun Sep 28 20:41:11 2008
@@ -20,11 +20,8 @@
 
 import junit.framework.TestCase;
 
-import org.apache.wicket.Component;
-import org.apache.wicket.MockPageWithLink;
-import org.apache.wicket.MockPageWithOneComponent;

[jira] Commented: (WICKET-1582) WicketTester executeAjaxEvent onclick generating non-AJAX response

2008-09-28 Thread Timo Rantalaiho (JIRA)

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

Timo Rantalaiho commented on WICKET-1582:
-

Nick,

Thanks for reporting!

I now fixed this in 1.3.x and trunk by making this possible

{code:java}
@Test
public void testClickingAjaxLinkWithOnclick() {
final WicketTester tester = new WicketTester() {
@Override
protected WebRequestCycle resolveRequestCycle() {
return setupRequestAndResponse(true);
}
};
tester.startPage(MyPage.class);

final Component component = 
tester.getComponentFromLastRenderedPage(spanny);
assertNotNull(component);

tester.executeAjaxEvent(linky, onclick);
tester.assertComponentOnAjaxResponse(component);
{code}

The reasoning can be found in this thread

http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561

Theoretically, the default could be the other way around, but then it would 
change the current behaviour and make existing tests fail :/ Anyway I think 
that in big projects you tend to have common places where WicketTester gets 
initialised and where you can change this if you want it in all your tests.

Are you happy with this solution and can the issue be closed? Or do you have 
better ideas?

 WicketTester executeAjaxEvent onclick generating non-AJAX response
 --

 Key: WICKET-1582
 URL: https://issues.apache.org/jira/browse/WICKET-1582
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.4
 Environment: Wicket 1.3-SNAPSHOT as of today
Reporter: Nick Johnson
Assignee: Timo Rantalaiho
 Fix For: 1.3.5

 Attachments: wicket1582.jar


 Executing: 
   tester.executeAjaxEvent(linky, onclick);
   tester.assertComponentOnAjaxResponse(component);
 throws an exception saying The Previous response was not an AJAX response. 
 You need to execute an AJAX event, using clickLink, before using this assert 
 although executeAjaxEvent should be resulting in an AJAX response (and prior 
 to 1.3.3 it did).
 Executing tester.clickLink(linky), which probably should be equivalent to 
 the above executeAjaxEvent, does work.
 I'll attach a simple testcase demonstrating this behaviour.

-- 
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-1582) WicketTester executeAjaxEvent onclick generating non-AJAX response

2008-09-28 Thread Timo Rantalaiho (JIRA)

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

thrantal edited comment on WICKET-1582 at 9/28/08 8:47 PM:
--

Nick,

Thanks for reporting!

I now fixed this in 1.3.x and trunk by making this possible

{code:java}
@Test
public void testClickingAjaxLinkWithOnclick() {
final WicketTester tester = new WicketTester() {
@Override
protected WebRequestCycle resolveRequestCycle() {
return setupRequestAndResponse(true);
}
};
tester.startPage(MyPage.class);

final Component component = 
tester.getComponentFromLastRenderedPage(spanny);
assertNotNull(component);

tester.executeAjaxEvent(linky, onclick);
tester.assertComponentOnAjaxResponse(component);
{code}

The reasoning can be found in [this 
thread|http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561]

http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561

Theoretically, the default could be the other way around, but then it would 
change the current behaviour and make existing tests fail :/ Anyway I think 
that in big projects you tend to have common places where WicketTester gets 
initialised and where you can change this if you want it in all your tests.

Are you happy with this solution and can the issue be closed? Or do you have 
better ideas?

  was (Author: thrantal):
Nick,

Thanks for reporting!

I now fixed this in 1.3.x and trunk by making this possible

{code:java}
@Test
public void testClickingAjaxLinkWithOnclick() {
final WicketTester tester = new WicketTester() {
@Override
protected WebRequestCycle resolveRequestCycle() {
return setupRequestAndResponse(true);
}
};
tester.startPage(MyPage.class);

final Component component = 
tester.getComponentFromLastRenderedPage(spanny);
assertNotNull(component);

tester.executeAjaxEvent(linky, onclick);
tester.assertComponentOnAjaxResponse(component);
{code}

The reasoning can be found in this thread

http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561

Theoretically, the default could be the other way around, but then it would 
change the current behaviour and make existing tests fail :/ Anyway I think 
that in big projects you tend to have common places where WicketTester gets 
initialised and where you can change this if you want it in all your tests.

Are you happy with this solution and can the issue be closed? Or do you have 
better ideas?
  
 WicketTester executeAjaxEvent onclick generating non-AJAX response
 --

 Key: WICKET-1582
 URL: https://issues.apache.org/jira/browse/WICKET-1582
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.4
 Environment: Wicket 1.3-SNAPSHOT as of today
Reporter: Nick Johnson
Assignee: Timo Rantalaiho
 Fix For: 1.3.5

 Attachments: wicket1582.jar


 Executing: 
   tester.executeAjaxEvent(linky, onclick);
   tester.assertComponentOnAjaxResponse(component);
 throws an exception saying The Previous response was not an AJAX response. 
 You need to execute an AJAX event, using clickLink, before using this assert 
 although executeAjaxEvent should be resulting in an AJAX response (and prior 
 to 1.3.3 it did).
 Executing tester.clickLink(linky), which probably should be equivalent to 
 the above executeAjaxEvent, does work.
 I'll attach a simple testcase demonstrating this behaviour.

-- 
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-1582) WicketTester executeAjaxEvent onclick generating non-AJAX response

2008-09-28 Thread Timo Rantalaiho (JIRA)

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

thrantal edited comment on WICKET-1582 at 9/28/08 8:48 PM:
--

Nick,

Thanks for reporting!

I now fixed this in 1.3.x and trunk by making this possible

{code:java}
@Test
public void testClickingAjaxLinkWithOnclick() {
final WicketTester tester = new WicketTester() {
@Override
protected WebRequestCycle resolveRequestCycle() {
return setupRequestAndResponse(true);
}
};
tester.startPage(MyPage.class);

final Component component = 
tester.getComponentFromLastRenderedPage(spanny);
assertNotNull(component);

tester.executeAjaxEvent(linky, onclick);
tester.assertComponentOnAjaxResponse(component);
{code}

The reasoning can be found in this thread (hard to get the Nabble link right in 
this Jira without Confluence markup)

http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561

Theoretically, the default could be the other way around, but then it would 
change the current behaviour and make existing tests fail :/ Anyway I think 
that in big projects you tend to have common places where WicketTester gets 
initialised and where you can change this if you want it in all your tests.

Are you happy with this solution and can the issue be closed? Or do you have 
better ideas?

  was (Author: thrantal):
Nick,

Thanks for reporting!

I now fixed this in 1.3.x and trunk by making this possible

{code:java}
@Test
public void testClickingAjaxLinkWithOnclick() {
final WicketTester tester = new WicketTester() {
@Override
protected WebRequestCycle resolveRequestCycle() {
return setupRequestAndResponse(true);
}
};
tester.startPage(MyPage.class);

final Component component = 
tester.getComponentFromLastRenderedPage(spanny);
assertNotNull(component);

tester.executeAjaxEvent(linky, onclick);
tester.assertComponentOnAjaxResponse(component);
{code}

The reasoning can be found in [this 
thread|http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561]

http://www.nabble.com/WICKET-1582-blocked-by-WICKET-254-td19521561.html#a19521561

Theoretically, the default could be the other way around, but then it would 
change the current behaviour and make existing tests fail :/ Anyway I think 
that in big projects you tend to have common places where WicketTester gets 
initialised and where you can change this if you want it in all your tests.

Are you happy with this solution and can the issue be closed? Or do you have 
better ideas?
  
 WicketTester executeAjaxEvent onclick generating non-AJAX response
 --

 Key: WICKET-1582
 URL: https://issues.apache.org/jira/browse/WICKET-1582
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.4
 Environment: Wicket 1.3-SNAPSHOT as of today
Reporter: Nick Johnson
Assignee: Timo Rantalaiho
 Fix For: 1.3.5

 Attachments: wicket1582.jar


 Executing: 
   tester.executeAjaxEvent(linky, onclick);
   tester.assertComponentOnAjaxResponse(component);
 throws an exception saying The Previous response was not an AJAX response. 
 You need to execute an AJAX event, using clickLink, before using this assert 
 although executeAjaxEvent should be resulting in an AJAX response (and prior 
 to 1.3.3 it did).
 Executing tester.clickLink(linky), which probably should be equivalent to 
 the above executeAjaxEvent, does work.
 I'll attach a simple testcase demonstrating this behaviour.

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



[jira] Updated: (WICKET-1582) WicketTester executeAjaxEvent onclick generating non-AJAX response

2008-09-28 Thread Timo Rantalaiho (JIRA)

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

Timo Rantalaiho updated WICKET-1582:


Fix Version/s: 1.4-M4
Affects Version/s: 1.4-M3

 WicketTester executeAjaxEvent onclick generating non-AJAX response
 --

 Key: WICKET-1582
 URL: https://issues.apache.org/jira/browse/WICKET-1582
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.4, 1.4-M3
 Environment: Wicket 1.3-SNAPSHOT as of today
Reporter: Nick Johnson
Assignee: Timo Rantalaiho
 Fix For: 1.3.5, 1.4-M4

 Attachments: wicket1582.jar


 Executing: 
   tester.executeAjaxEvent(linky, onclick);
   tester.assertComponentOnAjaxResponse(component);
 throws an exception saying The Previous response was not an AJAX response. 
 You need to execute an AJAX event, using clickLink, before using this assert 
 although executeAjaxEvent should be resulting in an AJAX response (and prior 
 to 1.3.3 it did).
 Executing tester.clickLink(linky), which probably should be equivalent to 
 the above executeAjaxEvent, does work.
 I'll attach a simple testcase demonstrating this behaviour.

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



svn commit: r699982 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java

2008-09-28 Thread ivaynberg
Author: ivaynberg
Date: Sun Sep 28 21:10:42 2008
New Revision: 699982

URL: http://svn.apache.org/viewvc?rev=699982view=rev
Log:
fix unit test

Modified:

wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java

Modified: 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java?rev=699982r1=699981r2=699982view=diff
==
--- 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
 (original)
+++ 
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
 Sun Sep 28 21:10:42 2008
@@ -681,21 +681,21 @@
else
{
final StringBuffer buf = new StringBuffer();
-for (Iterator iterator = parameters.keySet().iterator(); 
iterator.hasNext();)
-{
-final String name = (String)iterator.next();
-final String value = parameters.getString(name);
-if (name != null)
-buf.append(WicketURLEncoder.QUERY_INSTANCE.encode(name));
-buf.append('=');
-if (value != null)
-buf.append(WicketURLEncoder.QUERY_INSTANCE.encode(value));
-if (iterator.hasNext())
-{
-buf.append('');
-}
-}
-return buf.toString();
+   for (Iterator iterator = 
parameters.keySet().iterator(); iterator.hasNext();)
+   {
+   final String name = (String)iterator.next();
+   final String value = parameters.getString(name);
+   if (name != null)
+   
buf.append(WicketURLEncoder.QUERY_INSTANCE.encode(name));
+   buf.append('=');
+   if (value != null)
+   
buf.append(WicketURLEncoder.QUERY_INSTANCE.encode(value));
+   if (iterator.hasNext())
+   {
+   buf.append('');
+   }
+   }
+   return buf.toString();
}
}
 
@@ -1224,6 +1224,16 @@
auto = auto.substring(idx +

WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME.length() + 1);
}
+   else
+   {
+   // additional check for crypted strategy
+   idx = auto.indexOf(x=6*);
+   if (idx = 0)
+   {
+   auto = auto.substring(idx + 4);
+   }
+   }
+
idx = auto.indexOf();
if (idx = 0)
{




svn commit: r699983 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java

2008-09-28 Thread ivaynberg
Author: ivaynberg
Date: Sun Sep 28 21:14:43 2008
New Revision: 699983

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

Modified:

wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java?rev=699983r1=699982r2=699983view=diff
==
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java
 Sun Sep 28 21:14:43 2008
@@ -1230,6 +1230,16 @@
auto = auto.substring(idx +

WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME.length() + 1);
}
+   else
+   {
+   // additional check for crypted strategy
+   idx = auto.indexOf(x=6*);
+   if (idx = 0)
+   {
+   auto = auto.substring(idx + 4);
+   }
+   }
+
idx = auto.indexOf();
if (idx = 0)
{