JSF simultaneous ajax calls

后端 未结 2 456
故里飘歌
故里飘歌 2021-01-05 04:16

Is it possible with JSF to make ajax calls that will execute simultaneously (not waiting for previous calls to finish before starting a new one)?

2条回答
  •  醉酒成梦
    2021-01-05 05:04

    To prevent problems with the so called View-State of the page or some forms, AJAX requests are serialized.

    JSF-Extensions (https://www.intersult.com/wiki/page/JSF%20Ext) gives you the option to parallelize AJAX requests. Just set the JavaScript variable jsf.ajaxQueue to another value than the default of 1. But if you don't lock out manually duplicate requests from within the same form or rendering of the same region, you will get errors.

    This is how you activate parallel requests:

    
    

    For example you can parallelize the rendering on the server of a page with . Most applications would not need parallel requests, because they run nice when strictly serialized.

提交回复
热议问题