Posted by
Nicolas Malin (Jira) on
Apr 03, 2012; 8:17am
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-4780-Auto-completer-request-should-be-async-tp4528063p4528111.html
[
https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepak Dixit updated OFBIZ-4780:
--------------------------------
Attachment: OFBIZ-4780.patch
Here is the patch to fix this issue.
Added LAST_AUTOCOMP_REF global js variable to store the last auto-completer reference (jqXHR). If new ajax request is initiated then abort the LAST_AUTOCOMP_REF if exists and assign current jqXHR as LAST_AUTOCOMP_REF.
Also skip the RequestHandlerException for ajax call to support abort() method. If we call abort() method on jqXHR then request handler throws Broken pipe exception because request is aborted by client(Browser), to handle this skip the RequestHandlerException for ajax request.
> Auto-completer request should be async.
> ---------------------------------------
>
> Key: OFBIZ-4780
> URL:
https://issues.apache.org/jira/browse/OFBIZ-4780> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Release Branch 11.04, SVN trunk
> Reporter: Deepak Dixit
> Priority: Minor
> Fix For: Release Branch 11.04, SVN trunk
>
> Attachments: OFBIZ-4780.patch
>
>
> Currently auto-completer uses sync call to prepare auto-completer source (result list).
> Due to this user can't perform any other operation on lookup field and user should have to wait until response came.
> In general, synchronous requests should never be used because they tend to block the execution of anything else on the page (or even the entire browser UI), which isn't good.
> Also ajax-loader image not display on google chrome browser due to sync request.
> Need to use async request for auto-completer.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira