-
1. Re: RenderScoped VS ViewScoped
bitec Sep 21, 2011 2:45 PM (in response to bitec)Unfortunatelly renderScope does not work for me... For some reasons every postback generates the new beans. This code:
ConcurrentHashMap<Contextual<?>, Object> map = (ConcurrentHashMap<Contextual<?>, Object>) getCurrentRenderContext() .get(COMPONENT_MAP_NAME); if (map == null) { map = new ConcurrentHashMap<Contextual<?>, Object>(); getCurrentRenderContext().put(COMPONENT_MAP_NAME, map); }
from RenderScopedContext.getComponentInstanceMap() always creates new map on each postback request. That's why all renderScoped beans are recreated on each ajaxian request.
-
2. Re: RenderScoped VS ViewScoped
marcosaps Sep 21, 2011 4:37 PM (in response to bitec)Use the same @javax.faces.bean.ViewScoped with Seam Faces. It is working for me.
Marcos
-
3. Re: RenderScoped VS ViewScoped
bitec Sep 27, 2011 4:17 AM (in response to bitec)Any thoughts about why render scope didn't work? I tried both Glassfish 3.1 and 3.11 and Seam Faces 3.02, but the context is still lost on postback.
Thanks.
-
4. Re: RenderScoped VS ViewScoped
marcosaps Sep 27, 2011 9:04 AM (in response to bitec)
Anton Lisovenko wrote on Sep 27, 2011 04:17:
Any thoughts about why render scope didn't work? I tried both Glassfish 3.1 and 3.11 and Seam Faces 3.02, but the context is still lost on postback.
Thanks.No. I didn't even tried the render scope and I'm not thinking of doing this. I went directly to the @ViewScoped, as I was translating from JSF to CDI.
Marcos
-
5. Re: RenderScoped VS ViewScoped
bitec Sep 27, 2011 10:06 AM (in response to bitec)Marcos, I'm asking those, who tried, I understood, that you don't use render scope.
So, is there anyone with the same problems with it? Maybe Seam Faces contributors could advise smth.
Thanks.