Hi,

I will check this once more. If I can not find a solution,
I will create a quickstart for further debugging.

Andre

-------- Original-Nachricht --------
> Datum: Thu, 8 Mar 2012 09:24:55 +0200
> Von: Martin Grigorov <mgrigo...@apache.org>
> An: users@wicket.apache.org
> Betreff: Re: Links with old PageID do not work

> Hi,
> 
> The debug statement in your page's constructor wont show anything. At
> this time the page is not rendered yet and the value will be the
> initial one - 0.
> You need to put a breakpoint at org.apache.wicket.Page#renderPage()
> and see why it is being incremented second time.
> 
> Or just create a ticket with a quickstart and we'll try to debug it.
> 
> 2012/3/7 Andre Schütz <andre-p...@gmx.de>:
> > Anybody any idea?
> >
> > On Tue, 6 Mar 2012 22:17:10 +0100
> > Andre Schütz <andre-p...@gmx.de> wrote:
> >
> >> Hi,
> >>
> >> I tested my application and checked for the renderCount variable. I
> made a
> >> breakpoint and checked the variable in the Debugger. Surprisingly, the
> >> renderCount variable was not increased and remained 0 during the whole
> >> test.
> >>
> >> To verify my result, I made a System.out.println in the constructor of
> Page2
> >> that showed the PageID and the value of renderCount variable. The
> result was
> >> the same.
> >> It looked like the following:
> >>
> >> (1) Tab1 starts with Page1, url is:
> >> localhost:8080/myapp?0
> >> PageID: 2 renderCount: 0
> >>
> >> (2) Tab2 starts with Page1, url is:
> >> localhost:8080/myapp?1
> >> PageID: 2 renderCount: 0
> >>
> >> (3) Tab1 makes a submit from Page1 to Page2, url is:
> >> localhost:8080/myapp?2&q=word1
> >> PageID: 2 renderCount: 0
> >>
> >> (4) Tab2 makes a submit from Page1 to Page2, url is:
> >> localhost:8080/myapp?3&q=word2
> >> PageID: 3 renderCount: 0
> >>
> >> (5) Tab1 clicks on a link, the link does not work, but the page is
> rerendered, url is:
> >> localhost:8080/myapp?4&q=word1
> >> PageID: 4 renderCount: 0
> >>
> >> (6) Tab1 clicks on a link, the link works as expected and the page is
> rerendered, url is:
> >> localhost:8080/myapp?5&q=word1&filter=linkPage1
> >> PageID: 5 renderCount: 0
> >>
> >> (7) Tab2 clicks on a link, the link does not work, but the page is
> rerendered, url is:
> >> localhost:8080/myapp?6&q=word2
> >> PageID: 6 renderCount: 0
> >>
> >> (8) Tab2 clicks on a link, the link works as expected and the page is
> rerendered, url is:
> >> localhost:8080/myapp?7&q=word2&filter=linkPage2
> >> PageID: 7 renderCount: 0
> >>
> >> (9) Tab2 clicks on another link, the link works as expected and the
> page is rerendered, url is:
> >> localhost:8080/myapp?8&q=word2&filter=linkPage2;linkPage2b
> >> PageID: 8 renderCount: 0
> >>
> >> You can see, that the renderCount does not increase and the links need
> a rerender of
> >> the pages when the pageID is not the highest.
> >>
> >> Any ideas about such a constellation?
> >> Andre
> >>
> >> On Tue, 6 Mar 2012 09:13:26 +0200
> >> Martin Grigorov <mgrigo...@apache.org> wrote:
> >>
> >> > 2012/3/5 Andre Schütz <andre-p...@gmx.de>:
> >> > > Hi,
> >> > >
> >> > > thank you for the answer. I will test this and reply with my
> results.
> >> > >
> >> > > I have three questions depending on the test you have mentioned.
> >> > >
> >> > > (1)
> >> > > Can you tell me more about this o.a.w.Page? I did not really find
> >> > > something about it.
> >> >
> >> > org.apache.wicket.Page
> >> >
> >> > >
> >> > > (2)
> >> > > Can you explain me a little bit more in detail, what I should try
> >> > > to find out with the breakpoint regarding the 'renderCount'. What
> >> > > could be the interesting parts regarding 'renderCount'?
> >> >
> >> > See why renderCount is incremented after the the html generation.
> >> >
> >> > >
> >> > > (3)
> >> > > I have my .html files stored in src/main/html, my .properties files
> in
> >> > > src/main/resources and modified my pom.xml with:
> >> > >
> >> > > <build>
> >> > > <resources>
> >> > >    <resource>
> >> > >        <filtering>false</filtering>
> >> > >        <directory>src/main/resources</directory>
> >> > >    </resource>
> >> > >    <resource>
> >> > >        <directory>src/main/html</directory>
> >> > >    </resource>
> >> > >    <resource>
> >> > >        <filtering>false</filtering>
> >> > >        <directory>src/main/java</directory>
> >> > >        <includes>
> >> > >            <include>**</include>
> >> > >        </includes>
> >> > >        <excludes>
> >> > >            <exclude>**/*.java</exclude>
> >> > >        </excludes>
> >> > >    </resource>
> >> > > </resources>
> >> > > <testResources>
> >> > >    <testResource>
> >> > >        <filtering>false</filtering>
> >> > >        <directory>src/test/java</directory>
> >> > >        <includes>
> >> > >            <include>**</include>
> >> > >        </includes>
> >> > >        <excludes>
> >> > >            <exclude>**/*.java</exclude>
> >> > >        </excludes>
> >> > >    </testResource>
> >> > > </testResources>
> >> > >
> >> > > If I start the jetty server, I get a MarkupNotFoundException. After
> storing the
> >> > > .html files to the class files in the src/main/java path, it works
> and only the
> >> > > properties files are not found.
> >> > >
> >> > > Can you tell me, how I have to modify the pom.xml that it will find
> the .html
> >> > > and the .properties files in their different paths?
> >> >
> >> > I guess you need to reimport the project in your IDE so that it also
> >> > knows about these additional source folders
> >> >
> >> > >
> >> > > Thank you,
> >> > > Andre
> >> > >
> >> > >
> >> > > On Mon, 5 Mar 2012 09:49:38 +0200
> >> > > Martin Grigorov <mgrigo...@apache.org> wrote:
> >> > >
> >> > >> Hi,
> >> > >>
> >> > >> It sounds to be related to Page#renderCount.
> >> > >> 'renderCount' is used to prevent using an obsolete version of a
> page
> >> > >> instance. I.e. a page with a given page id counts how many times
> it
> >> > >> has been rendered. If you have a tab/window which contains an
> earlier
> >> > >> version of that page and you click on it then this click should be
> >> > >> prevented because it will work with stale data.
> >> > >> In your description I don't see how this may happen. There is
> >> > >> something more which is not included in your description.
> >> > >> I recommend you to put a break point in o.a.w.Page and see why
> >> > >> 'renderCount' changes and another in
> PageProvider#getPageInstance() to
> >> > >> see why the requested 'renderCount' is different than the current
> one.
> >> > >>
> >> > >> 2012/3/4 Andre Schütz <andre-p...@gmx.de>:
> >> > >> > Hello,
> >> > >> >
> >> > >> > i have a question about the behavior of links in two tabs.
> >> > >> >
> >> > >> > I have an application that I opened in two tabs. In Tab1, I
> >> > >> > make a submit from Page1 and get Page2. At the same time,
> >> > >> > I make a submit in Tab2 from Page1 to Page2. The two pages
> >> > >> > with the name Page2 in the two tabs display the results of
> >> > >> > a search, depending on the search word in the respective
> >> > >> > Page1.
> >> > >> >
> >> > >> > Finally, I get the following urls:
> >> > >> >
> >> > >> > (1) Tab1 makes a submit from Page1 to Page2, url is:
> >> > >> > localhost:8080/myapp?2&q=word1
> >> > >> > (2) Tab2 makesa a submit from Page1 to Page2, url is:
> >> > >> > localhost:8080/myapp?3&q=word2
> >> > >> >
> >> > >> > You can see, that the only difference is the search word
> >> > >> > in q= and the page id which is 2 for Tab1 and 3 for Tab2.
> >> > >> >
> >> > >> > My problem is the following:
> >> > >> > ---------------------------------
> >> > >> > I have some filter links (not Bookmarkable) on Page2 which you
> can use to
> >> > >> > filter the results. If you click on such a link, the
> PageParameters will
> >> > >> > be updated and the value of the link will be added to the
> PageParameters
> >> > >> > as additional filter.
> >> > >> >
> >> > >> > Theses two scenarios are happening:
> >> > >> >
> >> > >> > (a)
> >> > >> > If I click on a filter Link in Tab1, the link does work like
> expected.
> >> > >> > The page will be reloaded and gets a new page ID which is bigger
> than the
> >> > >> > ID in Tab2. After this reload of the page, the links work as
> expected.
> >> > >> >
> >> > >> > (b)
> >> > >> > If I click on a filter Link in Tab2 (which already has a higher
> page ID than
> >> > >> > Tab1) the links work as expected.
> >> > >> >
> >> > >> >
> >> > >> > To sumarize it:
> >> > >> >
> >> > >> > The links do not work on a page that has a smaller Page ID than
> another
> >> > >> > tab in the same browser. After the reload of the page by
> clicking on a
> >> > >> > link and getting the highest Page ID, the links work as
> expected.
> >> > >> >
> >> > >> > Anybody an idea why that can happen?
> >> > >> >
> >> > >> > Thanks in advance,
> >> > >> > Andre
> >> > >> >
> >> > >> >
> ---------------------------------------------------------------------
> >> > >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> > >> >
> >> > >>
> >> > >>
> >> > >>
> >> > >> --
> >> > >> Martin Grigorov
> >> > >> jWeekend
> >> > >> Training, Consulting, Development
> >> > >> http://jWeekend.com
> >> > >>
> >> > >>
> ---------------------------------------------------------------------
> >> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> > >>
> >> > >
> >> > >
> >> > > --
> >> > > Andre Schütz <schuetz.an...@gmx.net>
> >> > >
> >> > >
> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > > For additional commands, e-mail: users-h...@wicket.apache.org
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Martin Grigorov
> >> > jWeekend
> >> > Training, Consulting, Development
> >> > http://jWeekend.com
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >>
> >>
> >> --
> >> Andre Schütz <schuetz.an...@gmx.net>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >
> >
> > --
> > Andre Schütz <schuetz.an...@gmx.net>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to