[jira] [Created] (OFBIZ-4780) Auto-completer request should be async.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
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


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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)

     [ 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Assigned] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-4780:
--------------------------------------

    Assignee: Jacques Le Roux
   

> 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
>            Assignee: Jacques Le Roux
>            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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4780.
----------------------------------

    Resolution: Fixed

Thanks Deepak,

This makes sense indeed, your patch is in
trunk r1308751
R11.04 r1308752


               

> 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
>            Assignee: Jacques Le Roux
>            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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245070#comment-13245070 ]

Deepak Dixit commented on OFBIZ-4780:
-------------------------------------

Thanks Jacques.
               

> 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
>            Assignee: Jacques Le Roux
>            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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Reopened] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepak Dixit reopened OFBIZ-4780:
---------------------------------


Find one minor issue regarding the pending request count for ajax auto-completer, pending count is used to add and remove the ui-autocomplete-loading class, if we are aborting the request then this count not updated properly and ui-autocomplete-loading class does not remove from the lookup element hence ajax loader image display continuously if response came.
               

> 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
>            Assignee: Jacques Le Roux
>            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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepak Dixit updated OFBIZ-4780:
--------------------------------

    Attachment: selectAll.patch

Here is the patch for the fix.
               

> 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
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 11.04, SVN trunk
>
>         Attachments: OFBIZ-4780.patch, selectAll.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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248212#comment-13248212 ]

Deepak Dixit edited comment on OFBIZ-4780 at 4/6/12 9:33 AM:
-------------------------------------------------------------

Here is the patch (SelectAll.patch) for the fix.
               
      was (Author: deepakdixit):
    Here is the patch for the fix.
                 

> 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
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 11.04, SVN trunk
>
>         Attachments: OFBIZ-4780.patch, selectAll.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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4780.
----------------------------------

    Resolution: Fixed

Thanks Deepak,

Good catch, I forgot the response callback need for cleaning (quoting http://jqueryui.com/demos/autocomplete/#overview-main)
{quote}
A response callback, which expects a single argument to contain the data to suggest to the user. This data should be filtered based on the provided term, and can be in any of the formats described above for simple local data (String-Array or Object-Array with label/value/both properties). *It's important when providing a custom source callback to handle errors during the request. You must always call the response callback even if you encounter an error. This ensures that the widget always has the correct state.*
{quote}

Your patch is in
trunk r1310266
R11.04 r1310267


               

> 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
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 11.04, SVN trunk
>
>         Attachments: OFBIZ-4780.patch, selectAll.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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4780) Auto-completer request should be async.

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248217#comment-13248217 ]

Deepak Dixit commented on OFBIZ-4780:
-------------------------------------

Thanks Jacques :)
               

> 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
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 11.04, SVN trunk
>
>         Attachments: OFBIZ-4780.patch, selectAll.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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira