|JSF 2.0: View Params, GET Requests, and Bookmarking Results Pages|
First bank account lookup page. No view params.
Second bank account lookup page. Uses view params.
Page with links to the second bank account lookup page.
Shows that links can encode useful information if the destination page uses view params.
Third bank account lookup page. Illustrates that blind use of includeViewParams yields
a useless result with POST-redirect-GET.
Fourth bank account lookup page. Illustrates that proper use of includeViewParams requires you to
identify the primary key and to refactor your logic so that the setter method for that key
has side effects. This example assumes that user has gone through an earlier authentication layer,
since bookmarking results pages that need passwords is always wrong.
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).