Primefaces does CDI ViewScoped?

UI Components for JSF
servlet
Posts: 15
Joined: 08 Jun 2010, 05:30

03 Feb 2011, 13:36

I think a saw a presentation of Cagatay telling that he ported JSF ViewScoped to CDI? It´s true? I am interested in that, because the CDI @ViewScoped implementation from JBoss is not stable and have some problem with serialization (Sem Faces Module).

Can anyone confirm if this is true?

Thanks

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Feb 2011, 15:28

I have ported viewscope to spring not cdi. For CDI take a look at myfaces CODI project, as I know it has viewscope as a builtin extension to cdi and much more.

servlet
Posts: 15
Joined: 08 Jun 2010, 05:30

04 Feb 2011, 18:32

JBoss Boss CDI implementation (Weld 1.1.0) seens to dislike CODI extensions. I Give it i try but it didn´t work.

I know that I can go with "OpenWebBeans", but we just validated JBoss CDI implementation against our systems, so we are not supose to change it.

Thanks anyway.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Feb 2011, 19:15

To port viewscope to cdi instead of using a library like codi, see;

http://www.verborgh.be/articles/2010/01 ... on-to-cdi/

ps4os
Posts: 21
Joined: 24 Jun 2011, 03:15

24 Jun 2011, 03:21

Weld 1.1.0 has several bugs. Use the latest version.
I also tried http://www.verborgh.be/articles/2010/01 ... on-to-cdi/
... but that isn't a good idea.

kumm
Posts: 7
Joined: 21 Nov 2010, 21:07

28 Jun 2011, 20:28

Seam 3 does it.
http://docs.jboss.org/seam/3/faces/late ... viewscoped

Don't try on galssfish 3.1, seam faces won't deploy.
I tested it with a glassfish 3.1.1 snapshot, but it has to work with jboss6 too.

ps4os
Posts: 21
Joined: 24 Jun 2011, 03:15

01 Jul 2011, 20:17

As I learned from the Wiki (https://cwiki.apache.org/confluence/dis ... /JSF+Usage) MyFaces CODI does it as well. But I prefer their View-Access Scope. It's way more powerful (at least for me).

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

01 Jul 2011, 22:10

Weld 1.1.2-SNAPSHOT also has several bugs... it's currently not possible to use @ViewScoped with Weld because the weld internal bean stuff is not serializable and @ViewScoped beans are stored in the JSF ViewMap... So the stuff must be serializable...
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

ps4os
Posts: 21
Joined: 24 Jun 2011, 03:15

03 Jul 2011, 04:52

Interesting! A quick search showed up an interesting alternative which stores view-beans in the session: http://os890.blogspot.com/2011/06/sessi ... -codi.html or you can use Open WebBeans! We are using Open WebBeans and it's fantastic!

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

03 Jul 2011, 14:35

IMO this is not an alternative. If you do session replication, the session needs to be serializable, too :)
Yep you are right, AFAICS OWB currently is the better implementation - I currently also trying to get seam running on OWB :)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests