| Managed Beans II (Advanced Features) |
Click on one of the following links.
- start-page.jsf
Mostly unchanged random-navigation example from the Programming Basics lecture.
Included here mostly to compare to start-page2.jsf, which uses
a custom bean name. However, since the Navigator class has no
changeable state, added @ApplicationScoped to let users share
instances of the class.
- start-page2.jsf
Same behavior as start-page.jsf, but uses
a custom bean name. Shares the results pages with
start-page.jsf, since none of the results pages
refer to the bean name.
- bank-lookup.jsf
Unchanged banking example from the Managed Beans I lecture.
Included here only to compare to bank-lookup2.jsf, which uses
session scope instead of request scope.
- bank-lookup2.jsf
Similar to the original banking example, but (A) uses session scope and (B) uses
redirects instead of forwards to go to the results pages.
- search-engine-form.jsf
Example that uses the HttpServletResponse object to do
outside-of-JSF redirects, making an interface that lets you search
Google, Bing, Yahoo, etc.
- bank-lookup3.jsf
Similar to the original banking example, but uses dependency injection
for the lookup service, so that it is easier to change the lookup service
used (e.g., from simple hard-coded one to real one that uses a database) without
changing the rest of the code. If you want fancy dependency injection,
JSF 2 also has good integration with Spring.
This code is from the coreservlets.com JSF 2.0 tutorial.
There is also a variety of other free
J2EE tutorials (servlets, JSP, JSF 2.0, PrimeFaces, Ajax [with jQuery], GWT, Spring, Hibernate, JPA,
SOAP-based and RESTful Web Services, Android development, Hadoop, & Java 6 and Java 7 programming)
as well as live instructor-led training courses on
the same J2EE topics (servlets, JSP, JSF 2.0, PrimeFaces, Ajax [with jQuery], GWT, Spring, Hibernate, JPA,
SOAP-based and RESTful Web Services, Android development, Hadoop & Java 6 and Java 7 programming).