0

I have a ViewScoped class named SettingsBean ant it has a ManagedProperty named UserBean which is SessionScoped and its default getter/setter methods.

In my settingsBean, my problem is when I click the page it enters init function then it enters destroy function as soon as it enters init function.

So I encounter with java.lang.nullpointerexception when I call a function with commandbutton actionListener to use the list of selected items of a datatable which is lazy.

When I change the scope as SessionBean everything works normally but this problem forces me to use my bean as session scope and I don't want this.

I use JSF-2.2.

What may cause this problem?

rLyLmZ
  • 495
  • 4
  • 21
  • It seems that your View has expired... Have you checked http://stackoverflow.com/questions/15265433/how-and-when-is-a-view-scope-bean-destroyed-in-jsf/15391453#15391453 by BalusC? – Ishkafel Nov 10 '14 at 14:12
  • I'm not confident in the `ViewScoped` implementation in JSF-2.2. Are you sure that you're importing the right annotations? – kolossus Nov 11 '14 at 17:10

0 Answers0