JSF concurrent ajax calls

Is it possible for JSF to make ajax calls that will be executed at the same time (without waiting for the previous calls to complete before starting a new one)?

+8
ajax jsf
source share
2 answers

No, they are explicitly queued according to the specification, without any exceptions. See Chapter 13.3.2 of the specification

+11
source share

To prevent problems with the so-called page state view or some forms, AJAX requests are serialized.

JSF extensions ( https://www.intersult.com/wiki/page/JSF%20Ext ) gives you the ability to parallelize AJAX requests. Just set the jsf.ajaxQueue JavaScript variable to a different value than the default value of 1. But if you do not manually block duplicate requests from the same form or render the same region, you will get errors.

Here's how you activate concurrent queries:

<script type="text/javascript"> if (jsf) jsf.ajaxQueue = 2; </script> 

For example, you can parallelize rendering on a page server using <e: async>. Most applications do not need concurrent requests because they run well when strictly serialized.

+3
source share

All Articles