Are you sure about that?
We used this exact same handy, little Wicket feature (yet another one) on
the jWeekend  http://jweekend.co.uk/dev/BookingPage/ booking page  to make
sure that if the user drags his mouse over the entries in the "Course"
DropDownChoice we don't update the "Location, Date" DropDownChoice
(master/detail style database calls via JPA) unnecessarily for every
selection change until he's actually landed somewhere for a while. It works
fine (having said that, we probably need to add it to our "Add To Cart"
Button too). 
Here's the javadoc for setThrottleDelay

        /**
         * Sets the throttle delay for this behavior. Throttled behaviors only
         * execute once withing the given delay even though they are triggered
         * multiple times.
         * <p>
         * For example, this is useful when attaching this behavior to the
         * onkeypress event. It is not desirable to have an ajax call made every
         * time the user types so we throttle that call to a desirable delay, 
such
         * as once per second. This gives us a near real time ability to provide
         * feedback without overloading the server with ajax calls.
         * 
         * 
         * @param throttleDelay
         *            throttle delay
         * @return this for chaining
         */

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



Federico Fanton wrote:
> 
> On Wed, 14 Nov 2007 17:30:18 +0100
> Federico Fanton <[EMAIL PROTECTED]> wrote:
> 
>> > Can you try using something like
>> setThrottleDelay(Duration.milliseconds(500))
>> > to help eliminate the accidental, quick-fire second click?
>> 
>> I completely overlooked that X-) I'll try it, many thanks :)
> 
> 
> Mmh.. Using throttleDelay works like "wait X millisecs THEN fire event",
> not "fire event THEN wait", right? Since I'm working on a generic
> component and I don't know how much time the Ajax request will take, I
> can't use this approach.. :/ (I'm also trying to prevent
> second-clicks-while-Ajax-does-its-thing)
> Thanks anyway :)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Doubleclicking-on-a-refreshable-Ajax-button-tf4799510.html#a13754011
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to