Forum OpenACS Development: Re: Unique constraint violation after using back button

Collapse
Posted by Torben Brosten on
Hi Ryan,

Is the form dual purpose update/create? If so, it seems that the intent needs to be distinguished by choosing a different button (new or update) to allow the form processing to confirm if form is expected to create a new object or use existing reference.

If the form's purpose is just to create, then one could check the time signature between the last time the key_value was used and the current time. If the time is within a few seconds, then it's a doubclick.. handle appropriately (ignore etc), otherwise grab another key and post as new..

cheers,

Torben

Collapse
Posted by Ryan Gallimore on
The form is create only. Good suggestion, I will give it a try.

Thanks, Torben.