473,395 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
1 3299
acoder
16,027 Expert Mod 8TB
Since I don't think anyone here uses Dojo, all I can offer you is this link.
Sep 5 '09 #2

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

Similar topics

2
by: Joey | last post by:
Hi There, I am trying to get the selected value of a listbox when I click a button, everything works ok and I can bind the list and when I have a basic page and click a button to invoke a sub it...
2
by: Rob | last post by:
Hi all, I've got multiple sets of radio button that are dynamically created in code and populated by a database query. The query returns about 20 recordsets with 3 radio buttons per recordset and...
6
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I...
1
by: prashu | last post by:
how to retrieve a value selected in a drop down list box using jsp
3
by: eshwaramoorthy | last post by:
Hi to all, I have one gridview with checkboxes which contains values of type integer(empid) and string(name) and if i checked it, those respective values must be displayed in other gridview.pls hlp...
21
by: giandeo | last post by:
Hello Experts. Is it possible to retrieve the value from a populated pull down menu from a database and then use that value to access the same database to get the related fields. Example: ...
1
by: VanZandt | last post by:
how do I get a cell value for selected qty? Please help!!! below is the code. Thanks, <?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"...
1
by: Neerav shah | last post by:
How to retrieve selected value of dropdownlist filled from datasource in asp.net? Dim str1 As String = "SELECT UserName FROM Login WHERE Category = 'Property'" Dim cmd1 As New...
0
by: Gurpreet Singhh | last post by:
How to focus dojo slider to a particular value (say 2.5 )on the slider and then disabling dojo slider so that value not changes on clicking on the dojo slider?ie i want to focus dojo slider to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.