You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Brown, Berlin [PRI-1PP]" <Be...@Primerica.com> on 2013/09/12 15:20:44 UTC

Possible asynchronous ajax operations with form ajaxsubmitlink

Is it possible for wicket to execute operations asynchronously in terms
of handling ajax calls.

 

For example, if I have an ajax submit link.

 

AjaxSubmitLink1 {

   OnSubmit() {

    runLongRunningOperation();    

   // Imagine this operation runs 10 seconds

  }

}

AjaxSubmitLink2 {

   OnSubmit() {

    runLongRunningOperation();    

   // Imagine this operation runs 2 seconds

  }

}

 

Let's say a user clicks on ajaxsubmitlink1 and then ajaxsubmitlink2.

(1)    Runs in 10 seconds.

(2)    Runs in 5 seconds.

 

Is it possible that ajax submit link2 will complete before
ajaxsubmitlink1 even though the user click on 1 first?

 


Re: Possible asynchronous ajax operations with form ajaxsubmitlink

Posted by Martin Grigorov <mg...@apache.org>.
Berlin,

By "serialize" Sven meant that Wicket will execute them one by one. Do not
confuse this with Java Object serialization.


On Fri, Sep 13, 2013 at 11:27 PM, Sven Meier <sv...@meiers.net> wrote:

> See PageAccessSynchronizer
>
> Sven
>
>
> On 09/13/2013 10:19 PM, Brown, Berlin [PRI-1PP] wrote:
>
>> I don't know how the page serialization matters.  But I just did a  test
>> case and a user can submit ajax requests to wicket asynchronously but
>> the requests are processed as part of a queue and the processing is
>> synchronous.
>>
>> Is that mechanism handled in Java side/server side?  What classes?
>>
>> -----Original Message-----
>> From: Sven Meier [mailto:sven@meiers.net]
>> Sent: Thursday, September 12, 2013 9:29 AM
>> To: users@wicket.apache.org
>> Subject: Re: Possible asynchronous ajax operations with form
>> ajaxsubmitlink
>>
>> No, because all access to Wicket pages is serialized (on the server).
>>
>> Sven
>>
>> On 09/12/2013 03:20 PM, Brown, Berlin [PRI-1PP] wrote:
>>
>>> Is it possible for wicket to execute operations asynchronously in
>>> terms of handling ajax calls.
>>>
>>>
>>> For example, if I have an ajax submit link.
>>>
>>>
>>> AjaxSubmitLink1 {
>>>
>>>      OnSubmit() {
>>>
>>>       runLongRunningOperation();
>>>
>>>      // Imagine this operation runs 10 seconds
>>>
>>>     }
>>>
>>> }
>>>
>>> AjaxSubmitLink2 {
>>>
>>>      OnSubmit() {
>>>
>>>       runLongRunningOperation();
>>>
>>>      // Imagine this operation runs 2 seconds
>>>
>>>     }
>>>
>>> }
>>>
>>>
>>> Let's say a user clicks on ajaxsubmitlink1 and then ajaxsubmitlink2.
>>>
>>> (1)    Runs in 10 seconds.
>>>
>>> (2)    Runs in 5 seconds.
>>>
>>>
>>> Is it possible that ajax submit link2 will complete before
>>> ajaxsubmitlink1 even though the user click on 1 first?
>>>
>>>
>>>
>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Possible asynchronous ajax operations with form ajaxsubmitlink

Posted by Sven Meier <sv...@meiers.net>.
See PageAccessSynchronizer

Sven

On 09/13/2013 10:19 PM, Brown, Berlin [PRI-1PP] wrote:
> I don't know how the page serialization matters.  But I just did a  test
> case and a user can submit ajax requests to wicket asynchronously but
> the requests are processed as part of a queue and the processing is
> synchronous.
>
> Is that mechanism handled in Java side/server side?  What classes?
>
> -----Original Message-----
> From: Sven Meier [mailto:sven@meiers.net]
> Sent: Thursday, September 12, 2013 9:29 AM
> To: users@wicket.apache.org
> Subject: Re: Possible asynchronous ajax operations with form
> ajaxsubmitlink
>
> No, because all access to Wicket pages is serialized (on the server).
>
> Sven
>
> On 09/12/2013 03:20 PM, Brown, Berlin [PRI-1PP] wrote:
>> Is it possible for wicket to execute operations asynchronously in
>> terms of handling ajax calls.
>>
>>    
>>
>> For example, if I have an ajax submit link.
>>
>>    
>>
>> AjaxSubmitLink1 {
>>
>>      OnSubmit() {
>>
>>       runLongRunningOperation();
>>
>>      // Imagine this operation runs 10 seconds
>>
>>     }
>>
>> }
>>
>> AjaxSubmitLink2 {
>>
>>      OnSubmit() {
>>
>>       runLongRunningOperation();
>>
>>      // Imagine this operation runs 2 seconds
>>
>>     }
>>
>> }
>>
>>    
>>
>> Let's say a user clicks on ajaxsubmitlink1 and then ajaxsubmitlink2.
>>
>> (1)    Runs in 10 seconds.
>>
>> (2)    Runs in 5 seconds.
>>
>>    
>>
>> Is it possible that ajax submit link2 will complete before
>> ajaxsubmitlink1 even though the user click on 1 first?
>>
>>    
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Possible asynchronous ajax operations with form ajaxsubmitlink

Posted by "Brown, Berlin [PRI-1PP]" <Be...@Primerica.com>.
I don't know how the page serialization matters.  But I just did a  test
case and a user can submit ajax requests to wicket asynchronously but
the requests are processed as part of a queue and the processing is
synchronous.

Is that mechanism handled in Java side/server side?  What classes?

-----Original Message-----
From: Sven Meier [mailto:sven@meiers.net] 
Sent: Thursday, September 12, 2013 9:29 AM
To: users@wicket.apache.org
Subject: Re: Possible asynchronous ajax operations with form
ajaxsubmitlink

No, because all access to Wicket pages is serialized (on the server).

Sven

On 09/12/2013 03:20 PM, Brown, Berlin [PRI-1PP] wrote:
> Is it possible for wicket to execute operations asynchronously in 
> terms of handling ajax calls.
>
>   
>
> For example, if I have an ajax submit link.
>
>   
>
> AjaxSubmitLink1 {
>
>     OnSubmit() {
>
>      runLongRunningOperation();
>
>     // Imagine this operation runs 10 seconds
>
>    }
>
> }
>
> AjaxSubmitLink2 {
>
>     OnSubmit() {
>
>      runLongRunningOperation();
>
>     // Imagine this operation runs 2 seconds
>
>    }
>
> }
>
>   
>
> Let's say a user clicks on ajaxsubmitlink1 and then ajaxsubmitlink2.
>
> (1)    Runs in 10 seconds.
>
> (2)    Runs in 5 seconds.
>
>   
>
> Is it possible that ajax submit link2 will complete before
> ajaxsubmitlink1 even though the user click on 1 first?
>
>   
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Possible asynchronous ajax operations with form ajaxsubmitlink

Posted by Sven Meier <sv...@meiers.net>.
No, because all access to Wicket pages is serialized (on the server).

Sven

On 09/12/2013 03:20 PM, Brown, Berlin [PRI-1PP] wrote:
> Is it possible for wicket to execute operations asynchronously in terms
> of handling ajax calls.
>
>   
>
> For example, if I have an ajax submit link.
>
>   
>
> AjaxSubmitLink1 {
>
>     OnSubmit() {
>
>      runLongRunningOperation();
>
>     // Imagine this operation runs 10 seconds
>
>    }
>
> }
>
> AjaxSubmitLink2 {
>
>     OnSubmit() {
>
>      runLongRunningOperation();
>
>     // Imagine this operation runs 2 seconds
>
>    }
>
> }
>
>   
>
> Let's say a user clicks on ajaxsubmitlink1 and then ajaxsubmitlink2.
>
> (1)    Runs in 10 seconds.
>
> (2)    Runs in 5 seconds.
>
>   
>
> Is it possible that ajax submit link2 will complete before
> ajaxsubmitlink1 even though the user click on 1 first?
>
>   
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org