Opened 12 years ago

Closed 12 years ago

#3005 closed enhancement (fixed)

0.9: XmlStore in dojox enhancement to setValues();

Reported by: Jared Jurkiewicz Owned by: Jared Jurkiewicz
Priority: high Milestone: 0.9beta
Component: Data Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

0.9: XmlStore? in dojox enhancement to setValues();

Question raised in mail on setValues() on XmlStore?: In the XmlStore? code itself, in dojox.data.XmlStore?, it looks like setValues() is written to only handle the case where the attribute is "childNodes". Is there a need for that limitation, or would it be possible to make setValues() work for any arbitrary attribute? For example, in the unit tests that use the books.xml sample file, would it be possible to do something like this:

var book = store.newItem({tagName:'book'}); store.setValue(book, 'isbn', '0-13-110362-8'); store.setValue(book, 'title', 'The C Programming Language'); store.setValues(book, 'author', ['Kernighan', 'Ritchie']);

Yes, this is possible to support setting values such as these, and therefore the code will be enhanced to allow for it.

Note that if the attribute is really an XML attribute and not a sub-XML element, then it needs to just take and work with a single value array.

Attachments (1)

dojox.data.XmlStore_20070514.patch (4.5 KB) - added by Jared Jurkiewicz 12 years ago.
Update to XmlStore?'s setValues function.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Jared Jurkiewicz

Update to XmlStore?'s setValues function.

comment:1 Changed 12 years ago by Jared Jurkiewicz

Type: defectenhancement

comment:2 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [8602]) Update to XmlStore? to allow for setting of values via an array (creating multiple tags in the case of child tags). Multiple text nodes in the case of text() attribute, and taking just the first value in the case of a real XML attribute. fixes #3005

Note: See TracTickets for help on using tickets.