Expand my Community achievements bar.

DataProvider chokes with hyphen

Avatar

Level 1
I have a mx:HTTPService that pulls in an XML document. The
XML Document has a root element of "<the-response>." When I
reference the xml document in a dataprovider attribute in the data
grid object using the statement "
dataProvider={names.lastResult.the-response.items}" I get
the error "
Access of undefined property response."



If I remove the hyphen from the root element it works fine,
but I do not have control over this as I do not own the http feed.



I tried quoting it, putting single quotes, brackets, but no
luck...



Any suggestions?
1 Reply

Avatar

Former Community Member
something like:

dataProvider="{names.lastResult['the-response'].items"



? It does through a couple of warnings about data-binding and
detecting changes.. Hopefully the guys who wrote this can give us a
correct solutions for this seemingly common situation.