Opened 7 years ago

Closed 7 years ago

#15727 closed task (wontfix)

ItemFileReadStore: valueIsAnItem method

Reported by: Mewel Owned by: Kris Zyp
Priority: undecided Milestone: tbd
Component: Data Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

The ItemFileReadStore? contains the private method _getItemsFromLoadedData which in themselves contains the valueIsAnItem method. It would be much better if valueIsAnItem is part of the ItemFileReadStore?, because then you have a chance to extend it.

In my case I use the ItemFileReadStore? for a dijit.Tree which retrieves a hierarchically json object. The problem is, that some sub json elements are interpreted as items, but they aren't. For example:

items = [

{id: 1, label: [{lang: "de", value:"Hallo"}, {lang: "en", value: "Hi"}]}, {id: 2, label: [{lang: "de", value:"Moin"}, {lang: "en", value: "Good morning"}]}

]

In this case the label elements are interpreted as extra items. I wan't to controll that behaviour by myself. But currently i have to extend the _getItemsFromLoadedData and copy all the content to my own class, which is pretty ugly.

Of course the hierarchical flag is set to true.

Change History (1)

comment:1 Changed 7 years ago by bill

Resolution: wontfix
Status: newclosed

Closing since ItemFileReadStore has been deprecated in favor of dojo/store/Memory.

Note: See TracTickets for help on using tickets.