Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14192 closed defect (invalid)

FilteringSelect does not maintain backwards compatibility with ItemFileReadStore

Reported by: risorial Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: Dijit Version: 1.7.0
Keywords: FilteringSelect, dojo, store, itemfilereadstore Cc:
Blocked By: Blocking:

Description (last modified by bill)

After upgrading to from Dojo 1.5 to 1.7, I was getting "this.store.get is not a function" errors. Upon further investigation:

Line 144 of FilteringSelect.js - this.store.get(value)

dojo.data.ItemFileReadStore does not have a get function, thus backwards compatibility is not maintained.

Attachments (1)

image_21.png (35.2 KB) - added by risorial 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by risorial

Attachment: image_21.png added

comment:1 Changed 8 years ago by bill

Component: DataDijit
Description: modified (diff)
Resolution: invalid
Status: newclosed

Backwards compatibility is maintained. FilteringSelect adds a get() method to old style stores like ItemFileReadStore.

Since you didn't attach a test case I don't know why it's not working for you, but I assume that it's because you are doing:

myFilteringSelect.store = foo;

instead of using the API to set the store:

myFilteringSelect.set("store", foo)

comment:2 Changed 8 years ago by BinaryBlock

Hello. I am getting a similar error.

I inherited a dojo project that was built on version: version 1.3.2 (18832)

We are trying to upgrade to dojo version 1.7.2

Here is exception output we a getting:

TypeError: this.store.get is not a function
http://dev.domain.com:8081/backPage/dojoroot/dojo/dojo.js
Line 60

The dojo.js is compressed so it makes debug difficult to find what on line 60 is causing problem.

comment:3 Changed 8 years ago by bill

Backwards compatibility is maintained. FilteringSelect adds a get() method to old style stores like ItemFileReadStore.

Since you didn't attach a test case I don't know why it's not working for you, but I assume that it's because you are doing:

myFilteringSelect.store = foo;

instead of using the API to set the store:

myFilteringSelect.set("store", foo)

comment:4 Changed 8 years ago by BinaryBlock

FIXED

Found custom code written by previous developer:

list.store = domain.getStore(collection, displayCallback, idCallback);

Re-wrote code:

list.set("store",domain.getStore(collection, displayCallback, idCallback));

Works fine now.

Note: See TracTickets for help on using tickets.