You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Leon (JIRA)" <ji...@apache.org> on 2011/01/29 05:38:43 UTC

[jira] Updated: (OFBIZ-4156) infinite lookup ajax calls if key enter on the page with layer lookup forms

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

Leon updated OFBIZ-4156:
------------------------

    Attachment: fieldlookup.patch
                infinite-lookups.log

1. hundreds lookup calls logged to console.log
2. patch for this issue

> infinite lookup ajax calls if key enter on the page with layer lookup forms
> ---------------------------------------------------------------------------
>
>                 Key: OFBIZ-4156
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4156
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: jQuery
>            Reporter: Leon
>             Fix For: SVN trunk
>
>         Attachments: fieldlookup.patch, infinite-lookups.log
>
>
> If the rendered page has one lookup field which is configured as layer mode, at first open the lookup dialog and click the empty space of the page to hide it, then, key the "enter", then in the console log you will find there's lookup request logged. Try to key "enter" serveral times, you will get more lookup requests in the backend. In particular case, even if you key one "enter" in, it will send hundrends lookup calls. See attached "infinite-lookups.log" for the log details.
> Cause:
> In modifySubmitButton of fieldlookup.js, it bind the keypress event to whole "document" to call "lookupFormAjaxRequest" when "enter" keyin. And in "lookupFormAjaxRequest" function, it call  "modifySubmitButton" again after data load.
> Resolution:
> Move the keypress event bind operation to dialog open process and unbind it when dialog is closed.
> See attached patch for code update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.