[Seaside] [2.8]Slow connection causes problem

Ivan, Liliana Liliana.Ivan at rmb.co.za
Tue Mar 8 07:35:14 UTC 2011


Hi Carl

Until a better solution is found, what you can do is implement a script on 
WATagBrush
manageMultipleClicks

	^'if(this.enabled == false) { alert ("This request has already been submitted..."); return false;} else { this.enabled = false; }'

and call that from 
WAAnchorTag, by overriding callback:

callback: aNiladicValuable

	self onClick: self manageMultipleClicks.
	aNiladicValuable argumentCount > 0 ifTrue: [Grease.GRInvalidArgumentCount signal: 'Anchors expect a niladic callback.'].
	self url addField: (self storeCallback: (Seaside.WAActionCallback on: aNiladicValuable))

We've overidden callback in WASubmitButtonTag as well:
callback: aNiladicValuable

	self onClick: self manageMultipleClicks.
	aNiladicValuable argumentCount > 0
		ifTrue: [Grease.GRInvalidArgumentCount signal: 'Submit buttons expect a niladic callback.'].
	self name: (self storeCallback: (Seaside.WAActionCallback on: aNiladicValuable))


(that's the VW implementation of the callback, where we just added the script at the top)

HTH
Liliana

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Carl Gundel
Sent: 08 March 2011 05:06
To: Seaside - general discussion
Subject: [Seaside] [2.8]Slow connection causes problem

When I access my Seaside application using my iPhone over  a 3G connection it is very easy to click on an anchor and then click on it or another anchor before I get a response.  This often becomes a problem because the underlying state of my application is no longer valid for the second click.  Clearly it makes sense for Seaside to handle this intelligently.

-Carl Gundel
http://www.runbasic.com
http://www.libertybasic.com_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
This e-mail is subject to a disclaimer, available at http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html


More information about the seaside mailing list