-
1. Re: Weld 1.2?
tandraschko Jun 14, 2011 4:24 PM (in response to tandraschko)Did anyone managed to get @ViewScoped working?
My problem is that org.jboss.weld.seam.ManagedBean is not serializable... -
2. Re: Weld 1.2?
andrewwheeler Jun 17, 2011 10:19 PM (in response to tandraschko)It seams that it is only Myfaces that attempts to serialise org.jboss.weld.seam.ManagedBean in the ViewMap. This has been addressed by Pete (See this Myfaces JIRA). It now appears weld has worked around this issue. However it would be nice to get instructions on how to apply this to AS6.
-
3. Re: Weld 1.2?
tandraschko Jul 1, 2011 10:01 AM (in response to tandraschko)Because there is no response of the weld team and also the issue was not commented, i tried to fix this problem.
My steps:
1) Make ManagedBean Serializable
2) Add a default constructor in ManagedBean
3) Add also a default constructor in the superclasses (Eclipse will navigate you)
4) Fix the: xxx may not have been initialized errors of eclipseprotected ManagedBean() { proxiable = true; } protected AbstractBean() { services = null; } protected AbstractClassBean() { } protected RIBean() { this.beanManager = null; this.id = ""; this.hashCode = this.id.hashCode(); }
I do not know whether it could have any side effects but on my first tests, it works without problems.
-
4. Re: Weld 1.2?
tandraschko Jul 1, 2011 11:25 AM (in response to tandraschko)Ok it does not really work. The ViewScoped is like a @RequestScoped bean.
-
5. Re: Weld 1.2?
niknik77771 Jul 2, 2011 7:11 PM (in response to tandraschko)Make you Bean Serializable and use this solution for ViewScoped. It works for me. https://github.com/verborghs/jsf-cdi