Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Juergen Donnerstag
sorry, but I do not understand the question. What is the bug?

Juergen

On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 I am having problems with WicketTester.clickLink(..) when the link is
 a BookmarkablePageLink.

 At first, if the link is a bookmarkable one, I don't need to test it,
 since I can test the page alone.

 But I was think in the following: if my link was simple Link subclass,
 and I had a test for it:

 add(new Link(myLink) {
public void onClick() {
setResponsePage(new MyPage());
}
 }

 tester.clickLink(myLink);
 tester.assertRenderedPage(MyPage.class);

 so I choose to replace it for a bookmarkable link, and run the
 regression test. The test will fail, because clickLink(..) doesn't
 work with BookmarkablePageLink. That way, I would have to remove the
 clickLink(..) test.

 Do people agree it is a bug?


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eelco Hillenius
Because bookmarkable page links do not 'post back' to the server but
instead they refer to bookmarkable pages they can't be called as links
from WicketTester, right?

Eelco

On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 sorry, but I do not understand the question. What is the bug?

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  I am having problems with WicketTester.clickLink(..) when the link is
  a BookmarkablePageLink.
 
  At first, if the link is a bookmarkable one, I don't need to test it,
  since I can test the page alone.
 
  But I was think in the following: if my link was simple Link subclass,
  and I had a test for it:
 
  add(new Link(myLink) {
 public void onClick() {
 setResponsePage(new MyPage());
 }
  }
 
  tester.clickLink(myLink);
  tester.assertRenderedPage(MyPage.class);
 
  so I choose to replace it for a bookmarkable link, and run the
  regression test. The test will fail, because clickLink(..) doesn't
  work with BookmarkablePageLink. That way, I would have to remove the
  clickLink(..) test.
 
  Do people agree it is a bug?
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
Sorry for not being clearer. The bug is that the following does not work:

code (HomePage.class):

add(new BookmarkablePageLink(myPageLink, MyPage.class));

test (HomePageTest.class):

tester.clickLink(myPageLink);
assertRenderedPage(MyPage.class);

The assertion fails, because the HomePage.class is rendered again.

I would like to make sure this is a bug, so I could work on a patch.

This happens because WicketTester treats the BookmarkablePageLink as a
ordinary link, and at the end, the onClick method on
BookmarkablePageLink is called, which does nothing.

2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
 Because bookmarkable page links do not 'post back' to the server but
 instead they refer to bookmarkable pages they can't be called as links
 from WicketTester, right?

 Eelco

 On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  sorry, but I do not understand the question. What is the bug?
 
  Juergen
 
  On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
   I am having problems with WicketTester.clickLink(..) when the link is
   a BookmarkablePageLink.
  
   At first, if the link is a bookmarkable one, I don't need to test it,
   since I can test the page alone.
  
   But I was think in the following: if my link was simple Link subclass,
   and I had a test for it:
  
   add(new Link(myLink) {
  public void onClick() {
  setResponsePage(new MyPage());
  }
   }
  
   tester.clickLink(myLink);
   tester.assertRenderedPage(MyPage.class);
  
   so I choose to replace it for a bookmarkable link, and run the
   regression test. The test will fail, because clickLink(..) doesn't
   work with BookmarkablePageLink. That way, I would have to remove the
   clickLink(..) test.
  
   Do people agree it is a bug?
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
   Register for a JBoss Training Course.  Free Certification Exam
   for All Training Attendees Through End of 2005. For more info visit:
   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Ingram Chen
I did some debugging and found that setRequestToComponent() of MockHttpServletRequestdoes not build request parameters for BookmarkablePageLink. It builds interface=ILinkListenerinstead. however, BookmarkablePageLink does nonthing in onLinkClicked() method. 
I think that we can add bookmarkablePage=xxx request parameter in setRequestToComponent() to solve this issue. On 11/24/05, Eduardo Rocha
 [EMAIL PROTECTED] wrote:
Sorry for not being clearer. The bug is that the following does not work:code (HomePage.class):add(new BookmarkablePageLink(myPageLink, MyPage.class));test (HomePageTest.class):
tester.clickLink(myPageLink);assertRenderedPage(MyPage.class);The assertion fails, because the HomePage.class is rendered again.I would like to make sure this is a bug, so I could work on a patch.
This happens because WicketTester treats the BookmarkablePageLink as aordinary link, and at the end, the onClick method onBookmarkablePageLink is called, which does nothing.2005/11/23, Eelco Hillenius 
[EMAIL PROTECTED]: Because bookmarkable page links do not 'post back' to the server but instead they refer to bookmarkable pages they can't be called as links
 from WicketTester, right? Eelco On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:  sorry, but I do not understand the question. What is the bug?
   Juergen   On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:   I am having problems with WicketTester.clickLink
(..) when the link is   a BookmarkablePageLink. At first, if the link is a bookmarkable one, I don't need to test it,   since I can test the page alone.
 But I was think in the following: if my link was simple Link subclass,   and I had a test for it: add(new Link(myLink) {
  public void onClick() {  setResponsePage(new MyPage());  }   } tester.clickLink(myLink);   
tester.assertRenderedPage(MyPage.class); so I choose to replace it for a bookmarkable link, and run the   regression test. The test will fail, because clickLink(..) doesn't
   work with BookmarkablePageLink. That way, I would have to remove the   clickLink(..) test. Do people agree it is a bug?  
 ---   This SF.Net email is sponsored by the JBoss Inc.Get Certified Today   Register for a JBoss Training Course.Free Certification Exam
   for All Training Attendees Through End of 2005. For more info visit:   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___   Wicket-user mailing list   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user  ---
  This SF.Net email is sponsored by the JBoss Inc.Get Certified Today  Register for a JBoss Training Course.Free Certification Exam  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick  ___  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user
  --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems?Stop!Download the new AJAX search engine that makes
 searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://ads.osdn.com/?ad_idv37alloc_id865opclick___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Juergen Donnerstag
To make all type of Links working consistently IMO is a good idea.
Hence I agree that it is a bug (or RFE) and I would very much
appreciate if you would provide a patch for it.

Juergen

On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 Sorry for not being clearer. The bug is that the following does not work:

 code (HomePage.class):

add(new BookmarkablePageLink(myPageLink, MyPage.class));

 test (HomePageTest.class):

tester.clickLink(myPageLink);
assertRenderedPage(MyPage.class);

 The assertion fails, because the HomePage.class is rendered again.

 I would like to make sure this is a bug, so I could work on a patch.

 This happens because WicketTester treats the BookmarkablePageLink as a
 ordinary link, and at the end, the onClick method on
 BookmarkablePageLink is called, which does nothing.

 2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
  Because bookmarkable page links do not 'post back' to the server but
  instead they refer to bookmarkable pages they can't be called as links
  from WicketTester, right?
 
  Eelco
 
  On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
   sorry, but I do not understand the question. What is the bug?
  
   Juergen
  
   On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
I am having problems with WicketTester.clickLink(..) when the link is
a BookmarkablePageLink.
   
At first, if the link is a bookmarkable one, I don't need to test it,
since I can test the page alone.
   
But I was think in the following: if my link was simple Link subclass,
and I had a test for it:
   
add(new Link(myLink) {
   public void onClick() {
   setResponsePage(new MyPage());
   }
}
   
tester.clickLink(myLink);
tester.assertRenderedPage(MyPage.class);
   
so I choose to replace it for a bookmarkable link, and run the
regression test. The test will fail, because clickLink(..) doesn't
work with BookmarkablePageLink. That way, I would have to remove the
clickLink(..) test.
   
Do people agree it is a bug?
   
   
---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
   Register for a JBoss Training Course.  Free Certification Exam
   for All Training Attendees Through End of 2005. For more info visit:
   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
  for problems?  Stop!  Download the new AJAX search engine that makes
  searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
  http://ads.osdn.com/?ad_idv37alloc_id865opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
I was trying to use Link.getURL(), to not repeat the creation of the
parameters on WicketTester, but this method is protected, so I have no
idea to move on :(

The idea was simply take that URL, parse parameters and add them to
MockHttpServletRequest. Supose people agree on making getURL() public,
is there a method on Wicket for parsing url parameters?

2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
 To make all type of Links working consistently IMO is a good idea.
 Hence I agree that it is a bug (or RFE) and I would very much
 appreciate if you would provide a patch for it.

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  Sorry for not being clearer. The bug is that the following does not work:
 
  code (HomePage.class):
 
 add(new BookmarkablePageLink(myPageLink, MyPage.class));
 
  test (HomePageTest.class):
 
 tester.clickLink(myPageLink);
 assertRenderedPage(MyPage.class);
 
  The assertion fails, because the HomePage.class is rendered again.
 
  I would like to make sure this is a bug, so I could work on a patch.
 
  This happens because WicketTester treats the BookmarkablePageLink as a
  ordinary link, and at the end, the onClick method on
  BookmarkablePageLink is called, which does nothing.
 
  2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
   Because bookmarkable page links do not 'post back' to the server but
   instead they refer to bookmarkable pages they can't be called as links
   from WicketTester, right?
  
   Eelco
  
   On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
sorry, but I do not understand the question. What is the bug?
   
Juergen
   
On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 I am having problems with WicketTester.clickLink(..) when the link is
 a BookmarkablePageLink.

 At first, if the link is a bookmarkable one, I don't need to test it,
 since I can test the page alone.

 But I was think in the following: if my link was simple Link subclass,
 and I had a test for it:

 add(new Link(myLink) {
public void onClick() {
setResponsePage(new MyPage());
}
 }

 tester.clickLink(myLink);
 tester.assertRenderedPage(MyPage.class);

 so I choose to replace it for a bookmarkable link, and run the
 regression test. The test will fail, because clickLink(..) doesn't
 work with BookmarkablePageLink. That way, I would have to remove the
 clickLink(..) test.

 Do people agree it is a bug?


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
   ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
   files
   for problems?  Stop!  Download the new AJAX search engine that makes
   searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
   http://ads.osdn.com/?ad_idv37alloc_id865opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
  for problems?  Stop!  Download the new AJAX search engine that makes
  searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
  http://ads.osdn.com/?ad_idv37alloc_id865opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 Wicket-user 

Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Juergen Donnerstag
yes, WebResponse and WebRequest. Please see the subclasses already available

What about the bug/idea reported by Ingram?

Juergen

On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 I was trying to use Link.getURL(), to not repeat the creation of the
 parameters on WicketTester, but this method is protected, so I have no
 idea to move on :(

 The idea was simply take that URL, parse parameters and add them to
 MockHttpServletRequest. Supose people agree on making getURL() public,
 is there a method on Wicket for parsing url parameters?

 2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
  To make all type of Links working consistently IMO is a good idea.
  Hence I agree that it is a bug (or RFE) and I would very much
  appreciate if you would provide a patch for it.
 
  Juergen
 
  On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
   Sorry for not being clearer. The bug is that the following does not work:
  
   code (HomePage.class):
  
  add(new BookmarkablePageLink(myPageLink, MyPage.class));
  
   test (HomePageTest.class):
  
  tester.clickLink(myPageLink);
  assertRenderedPage(MyPage.class);
  
   The assertion fails, because the HomePage.class is rendered again.
  
   I would like to make sure this is a bug, so I could work on a patch.
  
   This happens because WicketTester treats the BookmarkablePageLink as a
   ordinary link, and at the end, the onClick method on
   BookmarkablePageLink is called, which does nothing.
  
   2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
Because bookmarkable page links do not 'post back' to the server but
instead they refer to bookmarkable pages they can't be called as links
from WicketTester, right?
   
Eelco
   
On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 sorry, but I do not understand the question. What is the bug?

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  I am having problems with WicketTester.clickLink(..) when the link 
  is
  a BookmarkablePageLink.
 
  At first, if the link is a bookmarkable one, I don't need to test 
  it,
  since I can test the page alone.
 
  But I was think in the following: if my link was simple Link 
  subclass,
  and I had a test for it:
 
  add(new Link(myLink) {
 public void onClick() {
 setResponsePage(new MyPage());
 }
  }
 
  tester.clickLink(myLink);
  tester.assertRenderedPage(MyPage.class);
 
  so I choose to replace it for a bookmarkable link, and run the
  regression test. The test will fail, because clickLink(..) doesn't
  work with BookmarkablePageLink. That way, I would have to remove the
  clickLink(..) test.
 
  Do people agree it is a bug?
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified 
  Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865opclick
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
   ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
   files
   for problems?  Stop!  Download the new AJAX search engine that makes
   searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
   http://ads.osdn.com/?ad_idv37alloc_id865opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  

Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
Currently it is not possible to retrieve the pageClass from a
BookmarkablePageLink, so it is not possible to write
bookmarkablePage=xxx. Besides that, I think we would be rewriting
code.

2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
 yes, WebResponse and WebRequest. Please see the subclasses already available

 What about the bug/idea reported by Ingram?

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  I was trying to use Link.getURL(), to not repeat the creation of the
  parameters on WicketTester, but this method is protected, so I have no
  idea to move on :(
 
  The idea was simply take that URL, parse parameters and add them to
  MockHttpServletRequest. Supose people agree on making getURL() public,
  is there a method on Wicket for parsing url parameters?
 
  2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
   To make all type of Links working consistently IMO is a good idea.
   Hence I agree that it is a bug (or RFE) and I would very much
   appreciate if you would provide a patch for it.
  
   Juergen
  
   On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
Sorry for not being clearer. The bug is that the following does not 
work:
   
code (HomePage.class):
   
   add(new BookmarkablePageLink(myPageLink, MyPage.class));
   
test (HomePageTest.class):
   
   tester.clickLink(myPageLink);
   assertRenderedPage(MyPage.class);
   
The assertion fails, because the HomePage.class is rendered again.
   
I would like to make sure this is a bug, so I could work on a patch.
   
This happens because WicketTester treats the BookmarkablePageLink as a
ordinary link, and at the end, the onClick method on
BookmarkablePageLink is called, which does nothing.
   
2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
 Because bookmarkable page links do not 'post back' to the server but
 instead they refer to bookmarkable pages they can't be called as links
 from WicketTester, right?

 Eelco

 On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  sorry, but I do not understand the question. What is the bug?
 
  Juergen
 
  On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
   I am having problems with WicketTester.clickLink(..) when the 
   link is
   a BookmarkablePageLink.
  
   At first, if the link is a bookmarkable one, I don't need to test 
   it,
   since I can test the page alone.
  
   But I was think in the following: if my link was simple Link 
   subclass,
   and I had a test for it:
  
   add(new Link(myLink) {
  public void onClick() {
  setResponsePage(new MyPage());
  }
   }
  
   tester.clickLink(myLink);
   tester.assertRenderedPage(MyPage.class);
  
   so I choose to replace it for a bookmarkable link, and run the
   regression test. The test will fail, because clickLink(..) 
   doesn't
   work with BookmarkablePageLink. That way, I would have to remove 
   the
   clickLink(..) test.
  
   Do people agree it is a bug?
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.  Get Certified 
   Today
   Register for a JBoss Training Course.  Free Certification Exam
   for All Training Attendees Through End of 2005. For more info 
   visit:
   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified 
  Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through 
 log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD 
 SPLUNK!
 http://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
files
for problems?  Stop!