I have a page where a user fills out a form and submits it. The onSubmit method 
checks to make sure everything is valid, adds the submitted item to the 
database and then shows the next page.  If there is a problem, it sets the 
errors on the form and returns the current page by returning null.

This all works fine....but

If the user fills out the form and there is an error, the next person to visit 
the page--even from another session will see the data that they filled out, but 
never was actually pushed to the database.

Obviously I want someone who shows up in a new session to get their own unique 
Item object to populate with their data and NOT see the previous person's data.

Two things that might have a bearing on this:

1. I am creating a new item that backs the form in the page .java file at its 
declaration.  So Item item = new Item(); 

2. I cam calling componentResources.discardPersistentFieldChanges(); but only 
after the Item has been saved to the database. So this doesn't happen if the 
checks in onSubmit fail and I set and error and return null.

Any suggestions or guidance?

Jack


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to