[Catalyst] Use Undo on A List Apart

Bill Moseley moseley at hank.org
Thu Jul 26 07:55:06 GMT 2007


There's a recent article titled "Never Use a Warning When you Mean
Undo" at http://alistapart.com/articles/neveruseawarning.

I'm wondering about the implementation.

One option is to create actions for every possible undo operation.
That would mean that each undo operation would generate a specific
link, including request parameters to identify the item that needed to
be, well, undone.

Another possibility would be to generate the code for the undo action
and place it in the session so that there's just an /undo link.  /undo
fetches the code and evals/executes it.  The /undo link would only be
available for a single request after displaying the undo link.

If the undo link is part of the server response the back button might
lead to a stale undo link.  If that's a problem I suppose could do an
AJAX request to fetch the link to prevent it showing up if using the
back button.

Comments?


-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list