By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,081 Members | 861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,081 IT Pros & Developers. It's quick & easy.

Dojo + WCF) - Unable to retrieve selected value after overriding QueryReadStore’s _fi

P: 1
Hi,

I am using a Dijit.form.filteringSelect to display values using the dojox.data.QueryReadStore. But, after overriding _filterResponse() to format the data in a Dojo-parsable format, whatever value I select gets bypassed and the only value that gets selected is the the first one on the list. I am using the following code…please let me know if what I am missing here.

Thanks much in advance!
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <title>Autocomplete Test</title>
  4.         <style type="text/css">
  5.             @import "src/dijit/themes/tundra/tundra.css";
  6.             @import "src/dojo/resources/dojo.css";
  7.         </style>
  8.         <link rel="stylesheet" href="js/dojo/dijit/themes/tundra/tundra.css" />
  9.         <link rel="stylesheet" href="js/dojo/dojo/resources/dojo.css" />
  10.         <script type="text/javascript" src="js/dojo/dojo/dojo.js" djConfig="parseOnLoad:true, isDebug:true">
  11.         </script>
  12.         <script type="text/javascript" src="js/scripts.js">
  13.         </script>
  14.         <script type="text/javascript">
  15.             dojo.require("dojox.data.QueryReadStore");
  16.             dojo.require("dijit.form.FilteringSelect");
  17.         </script>
  18.         <script type="text/javascript">
  19.  
  20.             dojo.addOnLoad(function(){
  21.                 var countryStore = new dojox.data.QueryReadStore({
  22.                     url: "http://localhost/url/",
  23.                     jsId: "countryStore"
  24.                 });
  25.  
  26.                // for (var i in countryStore) 
  27.                    // alert(i.toString());
  28.  
  29.                 countryStore._filterResponse = function(data){
  30.                     return {
  31.                         identifier: "Country",
  32.                         items: data
  33.                     }
  34.                 };
  35.  
  36.                 var co = new dijit.form.FilteringSelect({
  37.                     name: "Countries",
  38.                     autocomplete: false,
  39.                     searchAttr: "Country",
  40.                     store: countryStore
  41.                 }, "fsPlaceHolder");
  42.             });
  43.  
  44.         </script>
  45.     </head>
  46.     <body class="tundra">
  47.         Choose Country: 
  48.         <div id="fsPlaceHolder">
  49.         </div>
  50.     </body>
  51. </html>
Sep 2 '09 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
Since I don't think anyone here uses Dojo, all I can offer you is this link.
Sep 5 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.