Ticket #5277 (closed defect: wontfix)

Opened 12 months ago

Last modified 7 months ago

ItemFileReadStore don't accept empty arrays as attribute values

Reported by: guest Owned by: jaredj
Priority: normal Milestone: 1.2
Component: Data Version: 1.0
Severity: normal Keywords:
Cc:

Description (last modified by jaredj) (diff)

DESCRIPTION:

Data source "ItemFileReadStore?" hasAttribute responds false if an attribute exists but its value is an empty array. The behavior seems different in the other data sources.

HOW TO REPRODUCE:

Open http://82.230.65.68:31416/~fred/dojo/fred_samples/bug_016.html Click on the button

RESULT:

A panel that displays "false"

EXPECTED RESULT:

A panel that displays "true", as the "children" attribute is indeed defined in the data source

Change History

Changed 12 months ago by bill

  • owner changed from anonymous to jaredj
  • component changed from General to DojoX Data

Changed 12 months ago by bill

  • component changed from DojoX Data to Data

Oops, I guess ItemFileReadStore? is in core. My mistake.

Changed 12 months ago by guest

Btw, this comes from the hasAttribute() function in http://trac.dojotoolkit.org/browser/dojo/trunk/data/ItemFileReadStore.js#L120

Don't know what the proper fix should be, thought.

Changed 12 months ago by jaredj

I don't think this is a bug. There is no value for that attribute, so how can it have that attribute? Calling getValue() on it would also return undefined/null.

I'll look a bit further on it, but I'm not sure this is actually a bug.

Changed 9 months ago by dylan

  • milestone set to 1.2

Changed 7 months ago by jaredj

  • status changed from new to closed
  • resolution set to wontfix
  • description modified (diff)

This is expected behavior of IFRS. Setting a value to an empty array is the same as not having that attribute. It's documented in the code to work that way.

Note: See TracTickets for help on using tickets.