pdxkar/SpringHibernateJSFCrud — pull request #2 by ryan-wheeler (2014-06-06 08:24:50+00:00)
Title: Rwheeler/spring hibernate jsf crud

I have updated the CustomerManagedBean so that the version is part of the form. When the form is submitted, all the values are set on a new Customer instance, which is then added or updated.

A particular customer can be loaded by adding the query param ?id=

When a customer is updated, that customer is automatically reloaded into the form.

With these changes, you can load the same version of the same user in two browser windows. After the customer is updated by submitting changes in one browser window, submitting the second window will cause the stale object exception.