Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Want to check objects' availability in tapestry

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!