What does it mean "just refresh" and "completely update the page"?
Your problem can that you do the loading of items in constructor. The 
constructor is called only once in the page lifecycle. However, the page 
life spans over multiple request. So even if you reload the page, you 
can still be dealing with an existing instance.

As a rule of thumb, bookmarkable url creates new page instance, while 
url like ?wicket:interface=:3:: means existing page instance.

It's better to encapsulate loading logic into models, e.g. 
LoadableDetachableModel. That ensures that each request reloads the data.

-Matej

Marc-Andre Houle wrote:
> It is a matter of interogation I have and not directly related to a problem.
> While trying to find a good solution about the problem described there 
> <http://www.nabble.com/Refreshing-problem-with-ajax-component-tf2388856.html> 
> , I begin to try to figure what is happening when the user press 
> refresh.  I have checked the page about the wicket life-cycle 
> <http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle> in the wiki, 
> but it does not help me.
> 
> What happen when a refresh of the page happen?  Is wicket suppose to 
> call onAttach again on every component?  When using ajax thing, like 
> tree or tab panel, how the page know where to reload what.  I mean, the 
> tab was changed using ajax call, the data is not stored somewhere. If 
> you reload completly the page (like clicking on the link of the page 
> where you are), it will not remember.  What is the big difference.  From 
> all my last and not big experience with web development, refresh = 
> another http "GET" is dumbly made and that's it.  But it seem's I am wrong.
> 
> So, since I don't know how wicket react to this, it can be nice for me 
> to know!
> 
> Thanks in advance.
> 
> Marc
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> 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.php&p=sourceforge&CID=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.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to