#5277 closed defect (wontfix)
ItemFileReadStore don't accept empty arrays as attribute values
Reported by: | guest | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Data | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
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 (6)
comment:1 Changed 15 years ago by
Component: | General → DojoX Data |
---|---|
Owner: | changed from anonymous to Jared Jurkiewicz |
comment:2 Changed 15 years ago by
Component: | DojoX Data → Data |
---|
comment:3 Changed 15 years ago by
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.
comment:4 Changed 15 years ago by
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.
comment:5 Changed 14 years ago by
Milestone: | → 1.2 |
---|
comment:6 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
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.
Oops, I guess ItemFileReadStore? is in core. My mistake.