This component is very cool.
But, I test to use it with an remote store.
It's work badly.
Can you help me to attribute defaults vlaues with an remote store ?
Thanks
The remote option is not currently supported - partly due to the requirement to allow new item data (as in my example 2) and partly due to the whole round-trip nature of collecting the store data from the server..
With a standard combo, it's only ever 1 value that's queried, but with this component if you performed a setValue call with 10 values - the records each have to be pulled back from the server.
I have some ideas about handling remote I just don't know if it will work in practice yet, so watch this space.
Dan
Thanks for the very cool control!
Joseph Francis,
CoreLan / Meeting Consultants
OK, thanks Dan.
I test to implement this. I don't say if this is the good way, I not good with javascript.
I just add this code in the expand function (line 404), for filter the new load data :
Say me, if this is a good way ?Code:var usedRecords = this.usedRecords; var valueField = this.valueField; this.store.on('load', function(store, records) { store.filterBy(function(record, id) { return (!usedRecords.containsKey(record.get(valueField))); }, this); });
Hi nonyus,
Thanks for posting again - there will be a bit more to it than that though as I need to accomodate for:
The preventDuplicates and removeValuesFromStore config options, a shared data store and the ability for users to enter new data (when the allowAddNewData config is true).
I did some testing yesterday and I know how I'll accomodate for this, but It will be a week or 2 until I release a new version (there are some other parts of the code that need refactoring too).
I'm going away for a few days R&R today, but will post again here when I've made some progress.
Thanks for your feedback Joe
Dan
Excellent work!
I'm looking forward to seeing it work for remote stores.
Thumbs up!
I set something up for remote validation ( from the orginal facebook thread), but it got really annoying doing a 1 field lookup each time. So I was thinking this should only do a remote lookup on all fields onBlur. That way it doesn't send too many http requests and the user using it doesn't see the field jump around ( I had the displayFieldTpl displaying something slightly different then the input).
A couple of other things that I added to original, that would be nice in here as well:
1. Pattern matching (middle of the word, etc.)
2. Comma separated list of values i.e. I'd like to be able to paste "california,delaware,texas" in the box and it should validate all three and turn them into boxes. I didn't paste this code, but I do have something if you'd like to see it. Maybe you can use some of it as your code looks a little cleaner than mine anyway
3. An option that doesn't turn the text into a box until onBlur happens. I've had requests that it's somewhat annoying for the displayFieldTpl to change the field and expand it when they're still trying to type in the box (i.e. they type in an email <tad> and it displays "Tad Johnston (tad)"). It would be awesome to get something like this as an option.
Hopefully all this makes sense....let me know if you want some of my awesome code to pick apart
Wowww , Very Interesting.
Is it possible to have it for UTF8 also?
I have some Unicode Character to call (like chinese, Farsi, etc)
Thanks in Advance.
Mehran