You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dhongyt <da...@gmail.com> on 2013/10/15 15:54:04 UTC

Browser Page Refresh Not Really Refreshing

I have a wicket page that contains a dataview of subscriptions.
Any user that subscribes will show up on this page.

If I am already on the page and someone else create a subscription and I do
a browser refresh, like CTRL+R or F5 the user subscription does not show up.
I would have to click on the actually page link again for the new data to
show up.

Is this because I need to set my headers to not cache?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Browser Page Refresh Not Really Refreshing

Posted by dhongyt <da...@gmail.com>.
I am passing the list into the provider.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661858.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Browser Page Refresh Not Really Refreshing

Posted by Sven Meier <sv...@meiers.net>.
So are you passing List<Subscription> to your provider's constructor, or 
are you loading a fresh list for #size() and #iterator() in each request?

Sven

On 10/15/2013 04:20 PM, dhongyt wrote:
> I use a DataView and the data comes from the ListProvider which I created a
> Sortable ListProvider.
> I provided the Sortable ListProvider with a List<Subscription> which I get
> through a hibernate database call.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661828.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


Re: Browser Page Refresh Not Really Refreshing

Posted by dhongyt <da...@gmail.com>.
I use a DataView and the data comes from the ListProvider which I created a
Sortable ListProvider.
I provided the Sortable ListProvider with a List<Subscription> which I get
through a hibernate database call.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661828.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Browser Page Refresh Not Really Refreshing

Posted by Sven Meier <sv...@meiers.net>.
>Is this because I need to set my headers to not cache?

No.


How do you iterate over your subscriptions: AbstractRepeater, ListView, 
DataTable?
Where do you get the subscriptions from?

Sven

On 10/15/2013 03:54 PM, dhongyt wrote:
> I have a wicket page that contains a dataview of subscriptions.
> Any user that subscribes will show up on this page.
>
> If I am already on the page and someone else create a subscription and I do
> a browser refresh, like CTRL+R or F5 the user subscription does not show up.
> I would have to click on the actually page link again for the new data to
> show up.
>
> Is this because I need to set my headers to not cache?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


RE: Browser Page Refresh Not Really Refreshing

Posted by dhongyt <da...@gmail.com>.
Thanks Paul for your guidance.
After reading your link and other links on the web to understand stateful vs
stateless, it has lead me to other questions:

Currently my application is stateful.

1. Since I am authenticating my users, does it need to be stateful because
of authentication?
I have a User Session but I don't believe I really store anything useful
(except for user authentication) or need to store previous actions that a
user may do. Seems to me like I do create stateless links, ie. creating new
pages with a constructor and only passing in PageParameters and nothing
else.

2. If I use sessions, does that mean my application cannot be stateless?

3. If my application needs to be stateful and I understand the article
properly, the reason why my refresh does not give me new data is because the
page versioning is giving me data that is at the current page version. So
how would I do it so that when there is a refresh then it would increment
the page version by one? Or should I never do that? Different way of going
about it?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661857.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: Browser Page Refresh Not Really Refreshing

Posted by Paul Bors <pa...@bors.ws>.
You're stepping on the page cache in Wicket.

See Chapter 7 of the Wicket Guide "Page versioning and caching" at:
http://wicket.apache.org/guide/guide/chapter7.html

It really depends on what type of page you have, statefull (will rebuild
each page refresh) or not (will be cached).

~ Thank you,
  Paul Bors

-----Original Message-----
From: dhongyt [mailto:davidhtrang@gmail.com] 
Sent: Wednesday, October 16, 2013 2:30 PM
To: users@wicket.apache.org
Subject: Re: Browser Page Refresh Not Really Refreshing

I feel like there isn't a need for Javascript? Should a CRTL+R or an F5
already refresh the page and reload new data in Wicket?

Is there a setting I'm forgetting to set?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-R
efreshing-tp4661826p4661841.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
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


Re: Browser Page Refresh Not Really Refreshing

Posted by dhongyt <da...@gmail.com>.
I feel like there isn't a need for Javascript? Should a CRTL+R or an F5
already refresh the page and reload new data in Wicket?

Is there a setting I'm forgetting to set?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661841.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Browser Page Refresh Not Really Refreshing

Posted by MartinoSuperman <ma...@live.nl>.
Hi,

Isn't it an idea to use Javascript for this?

In JavaScript, it is also possible to refresh a page?

Example code:

http://www.quackit.com/javascript/javascript_refresh_page.cfm





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826p4661837.html
Sent from the Users forum mailing list archive at Nabble.com.

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