This isn't a webware question per-se but I'd like to ask how people handle POST's.
For instance, I have a page which provides a list of items for deletion. Check a
checkbox on the rows you want to delete and hit the "Delete" button.
def delete(self):
self.killSelectedRecords()
self.writeHTML()
i.e. the user gets a page back with the regenerated list (less those deleted).
The problem for me is the Browser Refresh button. If you click it now its not going to
do what it says ("Refresh"), its going to re-post the delete action (which could be
bad).
My temptation is to do :
def delete(self):
self.killSelectedRecords()
self.response().redirect(self.response.url()) #pseudocode!
i.e. redirect the browser to do a GET on the page they just POSTed to.
Is this what other folks do? What is the approved idiom? What are the trade-offs and
hidden dangers?
- Ian Sparks.
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss