« Return to Thread: FilteringSelect problem with XmlStore

FilteringSelect problem with XmlStore

by hai_vu :: Rate this Message:

Reply to Author | View in Thread


Hi all I am fairly new to Dojo 1.0+ so this may be an old issue, however here is a problem that I am trying to overcome. I have been trying to use a FilteringSelect widget with an XML data source without much luck. The problem ultimately boils down to this error reported by Firebug:

this.store.fetchItemByIdentity is not a function
(no name)("", null)dojo.js (line 129)
(no name)()dojo.js (line 233)
toString("postCreate", [], undefined)dojo.js (line 20)
(no name)()dojo.js (line 102)
toString("postCreate", [], undefined)dojo.js (line 20)
(no name)()dojo.js (line 212)
(no name)(Object store=Object autoComplete=true name=profile, input#profileSelect)dojo.js (line 165)
(no name)(Object store=Object autoComplete=true name=profile, input#profileSelect)dojo.js (line 78)
toString([Object store=Object autoComplete=true name=profile, input#profileSelect])dojo.js (line 20)
toString()dojo.js (line 20)
(no name)(input#profileSelect)dojo.js (line 204)
toString([div, input#profileSelect, input, 2 more...], function(), undefined)dojo.js (line 20)
(no name)([div, input#profileSelect, input, 2 more...])dojo.js (line 146)
(no name)(undefined)dojo.js (line 245)
(no name)()dojo.js (line 256)
toString()dojo.js (line 20)
toString()dojo.js (line 20)
toString()dojo.js (line 20)
toString(load )

Here is some background info on the environment where this was observed.

- Dojo version: 1.0.2
- Server-side: Tomcat 6
- Browsers: Firefox 2 & IE7
- Used examples in Book of Dojo 1.0

Code excerpt:

        index.jsp:
                ...
                <script type="text/javascript">
                        dojo.require("dojo.parser");
                        dojo.require("dojox.data.XmlStore");
                        dojo.require("dijit.form.FilteringSelect");
                        dojo.require("dijit.form.Button");
                </script>
                ...
                 <div dojoType="dojox.data.XmlStore" jsId="profileStore" rootItem="Profile" url="test.xml"></div>
                ...
                <form name="profileForm" method="post">
                 <input dojoType="dijit.form.FilteringSelect" id="profileSelect" name="profile" store="profileStore" autocomplete="true"/>
                </form>
                ...

        test.xml:
                <?xml version="1.0" encoding="windows-1252"?>

                <Profiles>
                        <Profile name="a" id="a" value="A" label="A"/>
                        <Profile name="b" id="b" value="B" label="B"/>
                </Profiles>

It looked as though Dojo encountered the error while attempting to access the data store code, no request to acquire the XML data was observed being sent to the server.

Thanks for any help,

Hai Vu
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest@...
http://dojotoolkit.org/mailman/listinfo/dojo-interest

 « Return to Thread: FilteringSelect problem with XmlStore