By comparing this token (in your model state/session or somewhere) with the one from the client response you can decide if an action had already been started.
http://www.refactoring.com/catalog/introduceSynchronizerToken.html
A post about this refactoring:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0304&L=j2eepatterns-interest&F=&S=&P=941
Have no clues yet to how to manage this in Tapestry. Will have to one day though.
Hth
Olve S. Hansen
fre, 26,.08.2005 kl. 12.05 -0400, skrev Michael Prescott:
I think I made it sound more complicated than I should have. I don't have any problem representing the model of states, legal transitions, etc. My problem is how to corral concurrent user requests into a coherent stream of model modifications - "double-click protection", basically. Howard Lewis Ship wrote: >I think this is a workflow issue, and falls into the domain of Spring >Web Flow. SWF folks are working on a proper integration of Tapestry >and SWF. > >On 8/26/05, Michael Prescott <[EMAIL PROTECTED]> wrote: > > >>I have an application where certain screens can only be shown based on a >>user's state (in an underlying model). State changes with every page >>request (merely viewing the page can mean you're in a new state). >> >>Because users can double-click or click multiple links rapidly >>(effectively making concurrent, incompatible requests), I need to >>implement 'validity' checks correctly, redirecting requests for pages >>that shouldn't be shown. >> >>I can check the model's state in validate(), but that isn't sufficient >>because a concurrent request to a different page might change the model >>state immediately after the validate() call but before. I'm new enough >>to Tapestry that I'm not sure how I can synchronize access to my model >>at a scope that spans all of these callbacks. >> >>What's the typical way of handling this sort of thing? >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> > > > >
signature.asc
Description: This is a digitally signed message part
