Re: [Wicket-user] When will RequestCycle.detach() being called?

2007-02-08 Thread Carfield Yim
A very old question but only get time to fix now. And found that the
problem only occur at  startPage(final Page page) but not
startPage(final ITestPageSource source) , so I change all test to this
method. Most work ok, just have one get the other exception

java.lang.IllegalArgumentException: Argument pageClass must be not null
at 
wicket.request.target.component.BookmarkablePageRequestTarget.init(BookmarkablePageRequestTarget.java:101)
at 
wicket.request.target.component.BookmarkablePageRequestTarget.init(BookmarkablePageRequestTarget.java:69)
at 
wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveHomePageTarget(DefaultRequestTargetResolverStrategy.java:374)
at 
wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:173)
at 
wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48)
at wicket.RequestCycle.step(RequestCycle.java:992)
at wicket.RequestCycle.steps(RequestCycle.java:1084)
at wicket.RequestCycle.request(RequestCycle.java:454)
at 
wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:318)
at 
wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:307)
at wicket.util.tester.WicketTester.startPage(WicketTester.java:231)
at com.genuco.base.LogonTest.testMain(LogonTest.java:32)

Anyone have any idea?

On 1/5/07, Johan Compagner [EMAIL PROTECTED] wrote:
 this is currently the code:

 public final Page startPage(final Page page)
 {
 setHomePage(DummyHomePage.class);
 processRequestCycle(page);

 Page last = getLastRenderedPage();

 createRequestCycle();   this line should
 make sure that the touch works...
 getWicketSession().touch(page);
 if (page != last)
 {
 getWicketSession().touch(last);
 }
 return last;
 }

 but it can be that it is purely 1.3

 johan


  On 1/5/07, Carfield Yim [EMAIL PROTECTED] wrote:
 
  On 12/28/06, Carfield Yim [EMAIL PROTECTED] wrote:
   On 12/27/06, Johan Compagner [EMAIL PROTECTED] wrote:
which version of wicket is that?
That should be fixed.
  
   Wicket 1.2.3, may be I should upgrade to 1.2.4
  
  Just upgrade to 1.2.4 and this problem is still there. And I've double
  verify that RequestCycle SHOULD be there as creating wickettester
  should trigger that RequestCycle creation
 
  wicket.WicketRuntimeException: Can not set the attribute. No
  RequestCycle available
  at wicket.Session.setAttribute(Session.java:933)
  at wicket.PageMap.put (PageMap.java:526)
  at wicket.Session.touch(Session.java:744)
  at
 wicket.util.tester.WicketTester.startPage(WicketTester.java:264)
  at
 com.genuco.web.pages.account.MainTest.testMain(MainTest.java
 :29)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at
 org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
  at
 org.junit.internal.runners.TestMethodRunner.runUnprotected
 (TestMethodRunner.java:81)
  at
 org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
  at
 org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java
 :75)
  at
 org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
  at
 org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
  at
 org.junit.internal.runners.TestClassMethodsRunner.run
 (TestClassMethodsRunner.java:35)
  at
 org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
  at
 org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java
 :34)
  at
 org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
  at
 org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java:29)
  at
 org.junit.internal.runners.TestClassRunner$1.runUnprotected
 (TestClassRunner.java:42)
  at
 org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
  at
 org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
  at
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
  at
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
 (RemoteTestRunner.java:460)
  at
 

Re: [Wicket-user] When will RequestCycle.detach() being called?

2007-01-09 Thread Johan Compagner

yes or see whats different with the code i posted and patch your tester.


On 1/6/07, Carfield Yim [EMAIL PROTECTED] wrote:


 but it can be that it is purely 1.3

So I need to wait for version 1.3 you mean?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] When will RequestCycle.detach() being called?

2007-01-05 Thread Carfield Yim
On 12/28/06, Carfield Yim [EMAIL PROTECTED] wrote:
 On 12/27/06, Johan Compagner [EMAIL PROTECTED] wrote:
  which version of wicket is that?
  That should be fixed.

 Wicket 1.2.3, may be I should upgrade to 1.2.4

Just upgrade to 1.2.4 and this problem is still there. And I've double
verify that RequestCycle SHOULD be there as creating wickettester
should trigger that RequestCycle creation

wicket.WicketRuntimeException: Can not set the attribute. No
RequestCycle available
at wicket.Session.setAttribute(Session.java:933)
at wicket.PageMap.put(PageMap.java:526)
at wicket.Session.touch(Session.java:744)
at wicket.util.tester.WicketTester.startPage(WicketTester.java:264)
at com.genuco.web.pages.account.MainTest.testMain(MainTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java:29)
at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] When will RequestCycle.detach() being called?

2007-01-05 Thread Johan Compagner

this is currently the code:

public final Page startPage(final Page page)
   {
   setHomePage(DummyHomePage.class);
   processRequestCycle(page);

   Page last = getLastRenderedPage();

   createRequestCycle();   this line should
make sure that the touch works...
   getWicketSession().touch(page);
   if (page != last)
   {
   getWicketSession().touch(last);
   }
   return last;
   }

but it can be that it is purely 1.3

johan

On 1/5/07, Carfield Yim [EMAIL PROTECTED] wrote:


On 12/28/06, Carfield Yim [EMAIL PROTECTED] wrote:
 On 12/27/06, Johan Compagner [EMAIL PROTECTED] wrote:
  which version of wicket is that?
  That should be fixed.

 Wicket 1.2.3, may be I should upgrade to 1.2.4

Just upgrade to 1.2.4 and this problem is still there. And I've double
verify that RequestCycle SHOULD be there as creating wickettester
should trigger that RequestCycle creation

wicket.WicketRuntimeException: Can not set the attribute. No
RequestCycle available
at wicket.Session.setAttribute(Session.java:933)
at wicket.PageMap.put(PageMap.java:526)
at wicket.Session.touch(Session.java:744)
at wicket.util.tester.WicketTester.startPage(WicketTester.java
:264)
at com.genuco.web.pages.account.MainTest.testMain(MainTest.java
:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(
TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(
TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(
BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(
TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(
TestMethodRunner.java:45)
at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(
TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(
TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(
TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(
BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(
TestClassRunner.java:52)
at org.junit.internal.runners.CompositeRunner.run(
CompositeRunner.java:29)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(
TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(
BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(
TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(
JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(
TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] When will RequestCycle.detach() being called?

2007-01-05 Thread Carfield Yim
 but it can be that it is purely 1.3

So I need to wait for version 1.3 you mean?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] When will RequestCycle.detach() being called?

2006-12-27 Thread Carfield Yim
I just get another exception from the unit test, this is kind of
strangle that complaint about No RequestCycle available:

wicket.WicketRuntimeException: Can not set the attribute. No
RequestCycle available
at wicket.Session.setAttribute(Session.java:933)
at wicket.PageMap.put(PageMap.java:526)
at wicket.Session.touch(Session.java:744)
at wicket.util.tester.WicketTester.startPage(WicketTester.java:262)

However, just before I call startPage I add
Assert.assertNotNull(RequestCycle.get()) and it is passed, and this
only occur for one test cases I have, just wonder when will
RequestCycle.detach() being called so RequestCycle.current begin set
to null?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] When will RequestCycle.detach() being called?

2006-12-27 Thread Johan Compagner

which version of wicket is that?
That should be fixed.
And it is not strange becuase in that startPage we did call touch on the
page/session
after the complete processRequestcycle was called.

johan


On 12/27/06, Carfield Yim [EMAIL PROTECTED] wrote:


I just get another exception from the unit test, this is kind of
strangle that complaint about No RequestCycle available:

wicket.WicketRuntimeException: Can not set the attribute. No
RequestCycle available
at wicket.Session.setAttribute(Session.java:933)
at wicket.PageMap.put(PageMap.java:526)
at wicket.Session.touch(Session.java:744)
at wicket.util.tester.WicketTester.startPage(WicketTester.java
:262)

However, just before I call startPage I add
Assert.assertNotNull(RequestCycle.get()) and it is passed, and this
only occur for one test cases I have, just wonder when will
RequestCycle.detach() being called so RequestCycle.current begin set
to null?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] When will RequestCycle.detach() being called?

2006-12-27 Thread Carfield Yim
On 12/27/06, Johan Compagner [EMAIL PROTECTED] wrote:
 which version of wicket is that?
 That should be fixed.

Wicket 1.2.3, may be I should upgrade to 1.2.4

 And it is not strange becuase in that startPage we did call touch on the
 page/session

Strangle is I have several other unit test of webpage and only this
one have problem

 after the complete processRequestcycle was called.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user