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/05/30 08:18:48 UTC
[jira] [Created] (OFBIZ-4305) The absence of default delay value
for ajaxAutoCompleter introduces html syntax error in client end
The absence of default delay value for ajaxAutoCompleter introduces html syntax error in client end
---------------------------------------------------------------------------------------------------
Key: OFBIZ-4305
URL: https://issues.apache.org/jira/browse/OFBIZ-4305
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: SVN trunk
Reporter: Leon
Fix For: SVN trunk
Attachments: autocompleter_defaultdelay.patch
When I open a page with lookup fields inside, the browser reports syntax error:
Error: syntax error
Source code:
ajaxAutoCompleter('theLookupUrl_blahblah', true, 2, );
The last parameter of function "ajaxAutoCompleter" is omitted, it should be a number to indicate the ajaxautocompleter delay value.
In some complex page which includes serveral lookup fields, sometimes, this kind of syntax error crippled the whole function.
workaround:
Modify the name of "widget.autocompleter.delay" in framework/widget/config/widget.properties to "widget.autocompleter.defaultDelay" and uncommment this line.
Note that org.ofbiz.base.util.UtilProperties.getPropertyValue won't return null if the property does not exist, it return empty string "". Thus the expression "${defaultDelay!300}" in .ftl returns an empty string instead of number "300" as we want.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OFBIZ-4305) The absence of default delay value
for ajaxAutoCompleter introduces html syntax error in client end
Posted by "Leon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leon updated OFBIZ-4305:
------------------------
Attachment: autocompleter_defaultdelay.patch
> The absence of default delay value for ajaxAutoCompleter introduces html syntax error in client end
> ---------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-4305
> URL: https://issues.apache.org/jira/browse/OFBIZ-4305
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Leon
> Fix For: SVN trunk
>
> Attachments: autocompleter_defaultdelay.patch
>
>
> When I open a page with lookup fields inside, the browser reports syntax error:
> Error: syntax error
> Source code:
> ajaxAutoCompleter('theLookupUrl_blahblah', true, 2, );
> The last parameter of function "ajaxAutoCompleter" is omitted, it should be a number to indicate the ajaxautocompleter delay value.
> In some complex page which includes serveral lookup fields, sometimes, this kind of syntax error crippled the whole function.
> workaround:
> Modify the name of "widget.autocompleter.delay" in framework/widget/config/widget.properties to "widget.autocompleter.defaultDelay" and uncommment this line.
> Note that org.ofbiz.base.util.UtilProperties.getPropertyValue won't return null if the property does not exist, it return empty string "". Thus the expression "${defaultDelay!300}" in .ftl returns an empty string instead of number "300" as we want.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OFBIZ-4305) The absence of default delay value for
ajaxAutoCompleter introduces html syntax error in client end
Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OFBIZ-4305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux closed OFBIZ-4305.
----------------------------------
Resolution: Fixed
Assignee: Jacques Le Roux
Thanks Leon,
Your patch is in trunk at r1129036
When I 1st wrote this I used delay instead of defaultDelay. I then changed the name but forgot to change in widget.properties file. I wanted to keep it commented out to have default value commented out (Convention over configuration) but it would be more complicated and anyway would not follow how it's done in widget.properties.
I guess the null value was replaced by the 300 jQuery default and that's why I did not notice it.
> The absence of default delay value for ajaxAutoCompleter introduces html syntax error in client end
> ---------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-4305
> URL: https://issues.apache.org/jira/browse/OFBIZ-4305
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Leon
> Assignee: Jacques Le Roux
> Fix For: SVN trunk
>
> Attachments: autocompleter_defaultdelay.patch
>
>
> When I open a page with lookup fields inside, the browser reports syntax error:
> Error: syntax error
> Source code:
> ajaxAutoCompleter('theLookupUrl_blahblah', true, 2, );
> The last parameter of function "ajaxAutoCompleter" is omitted, it should be a number to indicate the ajaxautocompleter delay value.
> In some complex page which includes serveral lookup fields, sometimes, this kind of syntax error crippled the whole function.
> workaround:
> Modify the name of "widget.autocompleter.delay" in framework/widget/config/widget.properties to "widget.autocompleter.defaultDelay" and uncommment this line.
> Note that org.ofbiz.base.util.UtilProperties.getPropertyValue won't return null if the property does not exist, it return empty string "". Thus the expression "${defaultDelay!300}" in .ftl returns an empty string instead of number "300" as we want.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira