Re: Page.detachModels() not working like it used to

2007-10-05 Thread Kent Tong
Dan Syrstad-2 wrote: > > Your page code is almost exactly the same as mine. However, your HTML does > not look correct - it has no tag with a wicket:id in it. So maybe your > component never rendered. > No, your mail client has stripped the code. Let me show you the code again:

Re: Page.detachModels() not working like it used to

2007-10-05 Thread Dan Syrstad
Your page code is almost exactly the same as mine. However, your HTML does not look correct - it has no tag with a wicket:id in it. So maybe your component never rendered. I still get an exception using Wicket 1.3.0-beta3. You say "After startPage() returns, the page has been detached". Evidently

Re: Page.detachModels() not working like it used to

2007-10-05 Thread Kent Tong
Dan Syrstad-2 wrote: > > Actually, Page.detach() is not callable from a JUnit test that uses > WicketTester in 1.3.0beta3. It throws an exception: > I used your code and the test passed. Here is my test page: test public class Test extends WebPage { public Test() {

Re: Page.detachModels() not working like it used to

2007-10-04 Thread Dan Syrstad
Actually, Page.detach() is not callable from a JUnit test that uses WicketTester in 1.3.0beta3. It throws an exception: org.apache.wicket.WicketRuntimeException: No RequestCycle is currently set! at org.apache.wicket.Component.getRequest(Component.java:1443) at org.apache.wicket.Page.onDetach(Page

Re: Page.detachModels() not working like it used to

2007-10-02 Thread Kent Tong
Dan Syrstad-2 wrote: > > Nope. I tried detach() too and that doesn't work - the test still fails. I > had to write my own method which was basically was a copy of the old > Page.detachModels() code. > > The thing is that In beta3, Page now just acts like a Component as far as > detachModels()

Re: Page.detachModels() not working like it used to

2007-10-02 Thread Dan Syrstad
On 10/1/07, Kent Tong <[EMAIL PROTECTED]> wrote: > > > > Dan Syrstad-2 wrote: > > > > This has broken a JUnit test that was testing a detachable model using > > WicketTester. The same test passes in Wicket 1.2.6. Is there something > > different I should be doing in 1.3? > > > > If it was calling d

Re: Page.detachModels() not working like it used to

2007-10-01 Thread Kent Tong
Dan Syrstad-2 wrote: > > This has broken a JUnit test that was testing a detachable model using > WicketTester. The same test passes in Wicket 1.2.6. Is there something > different I should be doing in 1.3? > If it was calling detach() instead of detachModels(), then it should continue to pass

Re: Page.detachModels() not working like it used to

2007-10-01 Thread Igor Vaynberg
guess so -igor On 10/1/07, Dan Syrstad <[EMAIL PROTECTED]> wrote: > > So the contract of the method has changed since 1.2.6? > -Dan > > On 10/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > > i think the way it works now is that there is a visitor that goes > through > > the hierarchy and c

Re: Page.detachModels() not working like it used to

2007-10-01 Thread Dan Syrstad
So the contract of the method has changed since 1.2.6? -Dan On 10/1/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > i think the way it works now is that there is a visitor that goes through > the hierarchy and calls detach() on every component. so there is no need > for > detachmodels to do much

Re: Page.detachModels() not working like it used to

2007-10-01 Thread Igor Vaynberg
i think the way it works now is that there is a visitor that goes through the hierarchy and calls detach() on every component. so there is no need for detachmodels to do much more then detach the models for the current component only. -igor On 10/1/07, Dan Syrstad <[EMAIL PROTECTED]> wrote: > >

Page.detachModels() not working like it used to

2007-10-01 Thread Dan Syrstad
Anyone know why Page.detachModels() no longer detaches the models of all child components in 1.3beta3? There is a bunch of code commented out in Page.detachModels() that previously did this. Now it just calls super.detachModels() (on Component) which apparently just detaches the model immediately a