I am developing a website using Tapestry Framework. I am using Hibernate for object relational mapping and using mysql as database.
I have a object named course.
suppose I have 2 workstations (workstation1,workstation2).
- I am creating one course from one workstation1. - open it in workstation2 for editing it. - now before saving changes in workstation2. - i am deleting it from workstation1. - now i am saving it from workstation2. At this point it will give me error.
to solve this i tried like this: As I am in the edit page for course I must have a persistent object. - I am fetching persistent object using course's id from current page before save operation. - if I don't find a persistent object with course Id it means course is no more exist. - now I am redirecting page to other page by throwing pageRedirectException.
but page is not redirecting and giving me error.
How can I overcome such scenario. Any suggestion will help me a lot.
thanks in advance.
It's feeding time! Give me the food you were going to give to this tiny ad: