Problem with the auto suggestion from Linus

Vote:
 

We are using the auto-suggestion property that Linus made

http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2012/11/Creating-a-more-advanced-property-editor/

We are using the "old" version because the site is not in 4.5 yet and we have problem with two things.

1: If you accidently click in the textbox (or type something and erase it) we got a error message saying that a value must be entered even that the property is not requierd

2: If you type something in it and the wait a little while or click outside the textbox there are a javascript error saying:

_30e {stack: "Error: Request canceled↵    at Error (native)↵    …97/ClientResources/epi/shell/widgets.js:2:333598)", message: "Request canceled", response: Object, status: undefined, responseText: undefined…}
message: "Request canceled"
response: Object
getHeader: function (_503){return this.xhr.getResponseHeader(_503);}
options: TMP
url: "/modules/app/Stores/Person/?name=ds"
xhr: XMLHttpRequest
__proto__: Object
responseText: undefined
stack: "Error: Request canceled↵    at Error (native)↵    at new _30e (http://site.se/EPiServer/Shell/2.1.97/ClientResources/dtk/dojo/dojo.js:15:76933)↵    at http://site.se/EPiServer/Shell/2.1.97/ClientResources/dtk/dojo/dojo.js:15:129179↵    at cancel._2f6.cancel (http://site.se/EPiServer/Shell/2.1.97/ClientResources/dtk/dojo/dojo.js:15:76199)↵    at http://site.se/EPiServer/Shell/2.1.97/ClientResources/dtk/dojo/dojo.js:15:122456↵    at http://site.se/EPiServer/Shell/2.1.97/ClientResources/dtk/dojo/dojo.js:15:120370↵    at _2c1.cancel.cancel [as cancel] (http://site.se/EPiServer/Shell/2.1.97/ClientResources/dtk/dojo/dojo.js:15:73047)↵    at _98a._abortQuery (http://site.se/EPiServer/CMS/2.1.88/ClientResources/EPi/Cms/widgets.js:2:306919)↵    at _953.closeDropDown (http://site.se/EPiServer/CMS/2.1.88/ClientResources/EPi/Cms/widgets.js:2:300631)↵    at lang.mixin._onBlur (http://site.se/EPiServer/Shell/2.1.97/ClientResources/epi/shell/widgets.js:2:333598)"
status: undefined
xhr: XMLHttpRequest
onabort: null
onerror: null
onload: null
onloadend: null
onloadstart: null
onprogress: null
onreadystatechange: null
ontimeout: null
readyState: 0
response: ""
responseText: ""
responseType: ""
responseXML: null
status: 0
statusText: ""
timeout: 0
upload: XMLHttpRequestUpload
onabort: null
onerror: null
onload: null
onloadend: null
onloadstart: null
onprogress: null
ontimeout: null
__proto__: XMLHttpRequestUpload
constructor: function XMLHttpRequestUpload() { [native code] }
__proto__: XMLHttpRequestEventTarget
withCredentials: false
__proto__: XMLHttpRequest
DONE: 4
HEADERS_RECEIVED: 2
LOADING: 3
OPENED: 1
UNSENT: 0
abort: function abort() { [native code] }
constructor: function XMLHttpRequest() { [native code] }
getAllResponseHeaders: function getAllResponseHeaders() { [native code] }
getResponseHeader: function getResponseHeader() { [native code] }
open: function open() { [native code] }
overrideMimeType: function overrideMimeType() { [native code] }
send: function send() { [native code] }
setRequestHeader: function setRequestHeader() { [native code] }
__proto__: XMLHttpRequestEventTarget
__proto__: TMP
 dojo.js:15
_48f dojo.js:15
(anonymous function) dojo.js:15
_2c4 dojo.js:15
_2c2 dojo.js:15
reject.errback dojo.js:15
_2c4 dojo.js:15
_2c2 dojo.js:15
reject.errback dojo.js:15
(anonymous function) dojo.js:15
_2e9 dojo.js:15
_2e3 dojo.js:15
_301.reject dojo.js:15
_2ef dojo.js:15
_2e9 dojo.js:15
_2e3 dojo.js:15
_301.reject dojo.js:15
_2ef dojo.js:15
_2e9 dojo.js:15
_2e3 dojo.js:15
_301.reject dojo.js:15
_2ef dojo.js:15
_2e9 dojo.js:15
_2e3 dojo.js:15
_301.reject dojo.js:15
_2ef dojo.js:15
_2e9 dojo.js:15
_2e3 dojo.js:15
_301.reject dojo.js:15
cancel._2f6.cancel dojo.js:15
(anonymous function) dojo.js:15
(anonymous function) dojo.js:15
_2c1.cancel.cancel dojo.js:15
_98a._abortQuery widgets.js:2
_953.closeDropDown widgets.js:2
lang.mixin._onBlur widgets.js:2
_dc._setStack widgets.js:2
_dc._onTouchNode widgets.js:2
_ef

Anyone else got this behavor?

#86847
Jun 03, 2014 10:26
Vote:
 

The first thing I solved by reading the api (http://dojotoolkit.org/api/?qs=1.9/dijit/form/FilteringSelect), it is required by default so I just had to add:

this.inputWidget.set("required", false);
#86849
Jun 03, 2014 10:56
Vote:
 

Hi!

I don't know the reasons for your errors but I can mention that I'm trying to add core support for this to remove the need to create a custom editor.

#88034
Jun 30, 2014 8:28
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.