Select the right durable JSF managed bean scopes for the ideal use cases.
- [Instructor] We start with the application scope bean.…The longest-lived, broadest-managed scope.…A class annotated with this will be instantiated…when it's first referenced in any part of the application.…And it is then kept alive for the entirety…of the up-time of the application.…Let's try one out.…We go to our Projects, right click,…we want a new Java class.…Let's call this our…SampleApplicationScopedBean…inside our…com.samples.linkedin.jsf.bean…package.…
Click on Finish.…And we have a plain old Java class.…Let's now add the @Named annotation,…provide the imports, supply a name.…We'll call it the sampleAppScopedBean.…Next, we apply the @ApplicationScoped…annotation on line 16.…
Let's do our imports with Control+Shift+i.…Remember to be very sure that you're importing…from the javax.enterprise.context package.…Click OK, and there, we have our ApplicationScoped bean.…Bear in mind, only one instance of this backing bean…will exist inside the entire application.…So we can sort of think of it as a singleton.…
It isn't tied to an HTTP session either.…
- Why use JSF?
- How JSF works
- Using managed beans in JSF
- Building a JSF page using Facelets
- Using Ajax support in JSF
- Processing complex data with JSF converters
- Security in JSF
- JSF and third-party component libraries
Skill Level Beginner
1. Web Application Development in JavaEE
2. Build Your First JSF Page
3. Use Managed Beans in JSF
4. Build a JSF Page Using Facelets
5. Use Ajax Support in JSF
6. Process Complex Data with JSF Converters
7. Protect Your Application with JSF Validation
8. Security in JSF
9. Combine JSF with Other Frameworks
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.