#5488 closed defect (fixed)
[patch]value of 0 becomes "" with DojoData model
Reported by: | haysmark | Owned by: | sorvell |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | DojoX Grid | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
I'm working with this sitepen demo: http://blog.sitepen.com/examples/dojo_grid_2/grid_objects.html
I noticed that when I converted the grid model to DojoData?, the demo's format functions started receiving "" whenever they were previously receiving 0. I debugged it to this code in the DojoData? model:
processRows: function(items, store){ ... dojo.forEach(this.fields.values, function(a){ row[a.name] = this.store.getValue(item, a.name)||""; }, this);
Whenever the store returns 0 from the data,
this.store.getValue(item, a.name)||""
returns "", which is wrong and not what the other models do.
Attachments (1)
Change History (6)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|
Changed 12 years ago by
Attachment: | 5488.patch added |
---|
comment:2 Changed 12 years ago by
Priority: | normal → high |
---|---|
severity: | normal → major |
Summary: | value of 0 becomes "" with DojoData model → [patch]value of 0 becomes "" with DojoData model |
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was fixed in tracker: http://trac.dojotoolkit.org/ticket/5555.
Note: See
TracTickets for help on using
tickets.
Fixes #5488. Fixed Grid's DojoData? model to preserve values of 0 and false.