How to keep alive a ManagedBean between pages ?

UI Components for JSF
Post Reply
mariano.kocalka
Posts: 48
Joined: 21 Sep 2010, 01:12

22 Sep 2010, 01:18

Hi Everyone,
i was playing a little bit with prime faces 2m1;
No matter with jsf2 scopes i've found @ViewScoped a great improve but going deeper i've found an old issue: "the navigation / keep alive bean handling" between page requests.

I've tried Flash scopes (part of jsf2 spec), but still requires some glue code (not particulary attractive).

For example in jboss-RichFaces i used to either use the keep alive tag in the xhtml page or use the @KeepAlive annotation within the controller;

Now im trying to move from RichFaces to Primefaces, wondering if there is something like keepAlive stuff ? how does primefaces users deal with this kind of things ?

Thks in advance!
Regards !
jdk-8
thorntail-2-6
primefaces-8

rulyone
Posts: 22
Joined: 18 Apr 2010, 05:23

22 Sep 2010, 01:27

You can always start using CDI and you'll find ConversationScoped really handy.
Last edited by rulyone on 23 Sep 2010, 00:06, edited 1 time in total.

cj91
Posts: 96
Joined: 04 Feb 2010, 00:07

22 Sep 2010, 05:53

If you've navigated between views, you're ViewScoped beans will reset.

Read about the different scopes here:
http://www.scribd.com/doc/16360312/DZon ... r-Faces-20

Sounds like you need SessionScoped

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests