Hi
I thought I had Schedule working. But after leaving the page and coming back, my calendar is empty even though I have events.
The showcase doesn't show the bean scopes. Please could someone tell me the recommended scope (Request, View, Session etc) and also whether I should be using ManagedBean of CDI's Named annotations?
Thanks
Bean scope for Schedule
-
- Posts: 18
- Joined: 21 Apr 2012, 22:27
Primefaces 3.5. Mojarra 1.2.19. Netbeans 7.1.1. Glassfish 3.1.2.
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
Try all of them and see which one works best for you and your requirement.monkeymagoo wrote:Please could someone tell me the recommended scope (Request, View, Session etc) and also whether I should be using ManagedBean of CDI's Named annotations?
Howard
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
-
- Posts: 18
- Joined: 21 Apr 2012, 22:27
OK, thanks. So there isn't a particular recommended scope and they all should (potentially) work, depending on the use case of course?
I think ViewScoped makes the most sense for me. I would like to use CDI if possible as it sounds like that's preferred over ManagedBean.
I'll try and get it working using those.
I think ViewScoped makes the most sense for me. I would like to use CDI if possible as it sounds like that's preferred over ManagedBean.
I'll try and get it working using those.
Primefaces 3.5. Mojarra 1.2.19. Netbeans 7.1.1. Glassfish 3.1.2.
-
- Posts: 18
- Joined: 21 Apr 2012, 22:27
In case this helps someone else, my problems were (very basic): I was importing javax.annotation.ManagedBean, not javax.faces.ManagedBean (which is the one that works).
Arrrggggg, too many classes with the same name!
Arrrggggg, too many classes with the same name!
Primefaces 3.5. Mojarra 1.2.19. Netbeans 7.1.1. Glassfish 3.1.2.
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
Thanks for responding with your code changes which fixed the problem.
Howard
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
-
- Information
-
Who is online
Users browsing this forum: No registered users and 34 guests