2

After reading some question and answers in stackoverflow (like this ViewParam vs @ManagedProperty(value = "#{param.id}")) I'm not sure about the possibility of using viewParam with @RequestScoped bean and ajax events. As you can see in the @BalusC's answer:

Can be used on a @RequestScoped bean, but it requires the bean to be @ViewScoped if you want > the view parameters to survive any validation failures.

I think it's possible to use f:viewParam with @RequestScoped bean and at the same time keep the view parameters after validation failures, I mean, you don't need a @ViewScoped bean at all.

Probably the necessity of using @ViewScoped bean has to do with this spec issue, no? http://java.net/jira/browse/JAVASERVERFACES-1532

According to that issue the solution will be only available on JSF 2.2.

Community
  • 1
  • 1

0 Answers0