___ ___ erkimt With the departure of ViewScoped the new specification of the JSF, which scope to use now in my managed beans that used using JSF 2.2? ______ qstntxt ___

I have a big question now with the appearance of JSF 2.2: What do I do with my views and my old managed beans? How do I now (what scope to use) since I can not use more view scoped in a view that needs to keep some objects in memory between ajax requests?

    
______ azszpr95 ___

According to: link

La says that the @ViewScoped annotation in the javax.faces.bean.ViewScoped package should become deprecated, given the creation of the @ViewScoped annotation of the javax.faces.view.ViewScoped package.

This happens, considering the adoption of an extension of the CDI, using the second annotation. If you do not use the CDI, this annotation will not work.

    
______ azszpr96 ___

You can and should use the CDI ViewScoped: javax.faces.view.ViewScoped, however of course, you need to use CDI beans.

What happens is that JSF ViewScoped does not work with CDI beans, and JSF is taking the course where CDI beans will override JSF Managed Beans. So they are making arrangements for the entire javax.faces.bean package to become deprecated in the future.

More information here at this link: link

    
___

11

I have a big question now with the appearance of JSF 2.2: What do I do with my views and my old managed beans? How do I now (what scope to use) since I can not use more view scoped in a view that needs to keep some objects in memory between ajax requests?

    
asked by anonymous 11.12.2013 / 19:18

2 answers

8

According to: link

La says that the @ViewScoped annotation in the javax.faces.bean.ViewScoped package should become deprecated, given the creation of the @ViewScoped annotation of the javax.faces.view.ViewScoped package.

This happens, considering the adoption of an extension of the CDI, using the second annotation. If you do not use the CDI, this annotation will not work.

    
11.12.2013 / 19:41
3

You can and should use the CDI ViewScoped: javax.faces.view.ViewScoped, however of course, you need to use CDI beans.

What happens is that JSF ViewScoped does not work with CDI beans, and JSF is taking the course where CDI beans will override JSF Managed Beans. So they are making arrangements for the entire javax.faces.bean package to become deprecated in the future.

More information here at this link: link

    
11.12.2013 / 19:43