I think this would be useful in some cases, may be worth adding, not sure.  However, I would put language in the documentation that warns against using this unless the user knows what they're doing.

Consider an airline application what wants to ensure the "confirm" button during a purchase does not get clicked 2x.  This sounds like an ideal way to ensure this doesn't happen.  Here are the problems:

1) If they use Ajax to do the confirm, this could prematurely remove the tree causing problems.  If they use Ajax to replace large chunks of the tree, this feature would not be applicable in those cases.

2) If the user clicks the button then immediately clicks stop on their browser before any response is returned, they'll be on the page which won't have a view associated with it.  Whatever they click next will be re-submitted to a non-existent page -- the developer would then have to do extra work to ensure "the right thing" happens for this user (I would argue more work than it would have been to ensure a 2x submit didn't happen to begin with).

3) If the user is fast and sends 2x requests before the server completes the processing, then 1 of the 2 threads may lose its state mid-processing... also this opens the possibility of 2x submit anyway... so the logic to ensure this doesn't purchase 2 tickets still has to be done.

So at the surface, it looks like a great way to ensure the user can't go backwards in the application and redo or undo things they shouldn't be allowed to do... however, I don't think it guarantees this without the developer being really careful.  What it DOES do, is allow a sophisticated developer the ability to cleanup state earlier and make the application much more efficient in how it uses memory.

Ken


Dan Allen wrote:
On Mon, Jun 15, 2009 at 1:23 PM, Kito Mann <kito.mann@virtua.com> wrote:
I think this is a good idea. Did you file an issue for it, Dan?

I have not yet. I can do that.

--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan

NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters.  Please don't hesitate to resend a message if
you feel that it did not reach my attention.