dojo - linking ItemFileReadStore with FilteringSelect -


dojo.addonload(function(){  var jsonstore = new dojo.data.itemfilereadstore({"url":"http://localhost:8080/sai/samu"});  }); 

<div dojotype="dijit.form.filteringselect" store="jsonstore"  required="true"   id="myid" ></div> 

i getting error stating jsonstore not defined .

you mixing programmatic , declarative dojo approaches. should use 1 or other.

programmatic:

dojo.addonload(function(){     var jsonstore = new dojo.data.itemfilereadstore({         url: "http://localhost:8080/sai/samu"     });     var filtsel = new dijit.form.filteringselect(         {             id: "myid",             store: jsonstore,             required: true         },         "myid" // id of div turn filteringselect       ); }); ... <div id="myid"></div> 

declarative

<div dojotype="dojo.data.itemfilereadstore" jsid="jsonstore" url="http://localhost:8080/sai/samu"></div> <div dojotype="dijit.form.filteringselect" store="jsonstore" required="true"   id="myid" ></div> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -