Refresh browser will trigger the last event

UI Components for JSF
Post Reply
max
Posts: 28
Joined: 17 Nov 2010, 15:55

17 Mar 2011, 21:05

Hi,

Anyone had an issue to refresh the browser? when I refresh the browser, the last event will be triggered again. For example last action I did a delete, when I refresh my browser, it will do that delete again. How can I avoid that? My managed bean is in session scope, I wish refresh will call the managed bean's constructor or maybe do nothing (disable the refresh).

Thanks
max

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

18 Mar 2011, 16:10

Sounds like you need to use the post-redirect-get pattern (http://en.wikipedia.org/wiki/Post/Redirect/Get).

With JSF 2 you can add:

Code: Select all

?faces-redirect=true
to your url/action.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests