wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris <chris...@gmx.at>
Subject Re: Browser back - reload page/panel
Date Wed, 22 Apr 2015 21:05:35 GMT
Martin, thanks for the tip.

I would like to use some dynamic List Model, but not a detachable one and put following in
the page’s initialization method:

  IModel<List<SomeType>> poisModel = new ListModel<SomeType>() {
            @Override
            public List<SomeType> getObject() {
                return service.retrieveList();
            }

Why is the service.retrieveList method called so often, I thought that this call should be
only made once?
Should I use another model?

Thanks!
Chris


> Am 22.04.2015 um 07:58 schrieb Martin Grigorov <mgrigorov@apache.org>:
> 
> Hi,
> 
> Wicket disables caching for the pages [1] so going back will make a request
> for re-render.
> You should use dynamic models [2] to re-render the latest state.
> 
> 
> 1.
> https://github.com/apache/wicket/blob/822a1693c2d017478613321ae6fce40d519b24fa/wicket-core/src/main/java/org/apache/wicket/markup/html/WebPage.java#L205
> 2.
> https://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models#WorkingwithWicketmodels-DynamicModels
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Wed, Apr 22, 2015 at 5:48 AM, Chris <chris.gr@gmx.at> wrote:
> 
>> Hi all,
>> 
>> how is it possible to refresh a page or panel on browser back? If the user
>> deletes an item and clicks on browser back to go to the last page, it is
>> still displayed which should not be the case.
>> 
>> Thanks a lot,
>> Chris
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 


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


Mime
View raw message