On Mon, May 12, 2008 at 12:40 AM, mfs <[EMAIL PROTECTED]> wrote: > > > Mr Mean wrote: > > > > On Sun, May 11, 2008 at 9:04 AM, mfs <[EMAIL PROTECTED]> wrote: > >> > >> Guys, > >> > >> Firstly, Is that a right understanding that doing a browser-refresh of > >> the > >> page would result in a new instance of the page being created everytime > >> and > >> similarly a new model instance would be binded to the page. > > > > Only if the page is stateless or if the url you refresh is a bookmarkable > > url. > > Otherwise the page instance is reused. > > > > First, just to be sure, you mean BOTH, page-instance AND model-instance > > will be re-used ?
Yes both will be reused, however components like dataview can recreate child components and the IDataProvider supplies them with a new model every time. > > Assuming the first is true, the rule is to make the pages non-bookmarkable > > (i.e. non- public constructors) ? in order to re-use the instance...but > > that alone wouldnt work..right one has to use the appropriate > > url-coding-strategy like u and johan suggested > > (HyBridURLCodingStrategy)..right ? > The constructor just make it possible to use the page as bookmarkable, It is things like BookMarkablePageLink (and possibly the mount strategy) that facilitate the bookmarkability of pages. I hardly ever use a mountstrategy so i can't say much about those. > > > > > > >> Is there a way one can use the same version of the page/model (which > >> wicket > >> kept in the session) when the page was rendered the first time.. > > > > See previous answer. > > > > See my response to Johan's post, i tried using HybridURLCodingStrategy but > > unfortunately, that still doesnt work...any clue.. > This is getting a bit confusing you are talking about models where i think you mean idataprovider. Even is the page instance is being reused it is in the nature of the dataview to requery the provider. You could do as Jonathan suggests and store the list outside the provider but as he already pointed out you loose a lot if you do that. Maurice > > > >> > >> I would want to avoid a hit to the database on refresh (since my model > >> construction requires so) > >> -- > >> View this message in context: > >> > http://www.nabble.com/Load-serialized-%28or-in-session%29-page-model-on-refresh..-tp17170105p17170105.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > Maurice > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Load-serialized-%28or-in-session%29-page-model-on-refresh..-tp17170105p17178903.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
