Hello all,
i modify this sample [ Yahoo! JSON Service ] and juse modify
yahooDS.setDataURL("http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&output=json");
change to
yahooDS.setDataURL("http://test.mysite/a.html");
the sample source code here ==> http://www.smartclient.com/smartgwt/showcase/sourcegen/dataintegration/json/YahooJsonServicesSample.java.html
,
and i copy the text result from “http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&output=json&query=snowboarding” to my website, and save it “a.html”
{"ResultSet":{"totalResultsAvailable":"10414286","totalResultsReturned":10,"firstResultPosition":1,"Result":[{"Title":"GraunkeSnow670x541 jpg","Summary":"Snow Covered Home in Colorado","Url":"http:\/\/snowdonhopkins.com\/graphics\/GraunkeSnow670x541.jpg","ClickUrl":"http:\/\/snowdonhopkins.com\/graphics\/GraunkeSnow670x541.jpg","RefererUrl":"http:\/\/snowdonhopkins.com\/GraunkeRes.html","FileSize":386355,"FileFormat":"jpeg","Height":"541","Width":"670","Thumbnail":{"Url":"http:\/\/thm-a01.yimg.com\/image\/156cb3036ccf0f76","Height":"121","Width":"150"}},{"Title":"Edenpics com 001 007 Plain near a forest edge with snow and frontal sun Switzerland Vaud Marchairuz jpg","Summary":"cat1024 jpg Taille 1024x768 Edenpics com 001 007 Plain near a forest edge with snow and frontal sun Switzerland Vaud Marchairuz jpg Taille 1024x768","Url":"http:\/\/www.bergoiata.org\/fe\/divers60\/Edenpics-com_001-007-Plain-near-a-forest-edge-with-snow-and-frontal-sun-Switzerland-Vaud-Marchairuz.jpg","ClickUrl":"http:\/\/www.bergoiata.org\/fe\/divers60\/Edenpics-com_001-007-Plain-near-a-forest-edge-with-snow-and-frontal-sun-Switzerland-Vaud-Marchairuz.jpg","RefererUrl":"http:\/\/www.bergoiata.org\/fe\/divers60\/25.htm","FileSize":113254,"FileFormat":"jpeg","Height":"768","Width":"1024","Thumbnail":{"Url":"http:\/\/thm-a02.yimg.com\/image\/eb82ad9be22586da","Height":"120","Width":"160"}},{"Title":"Edenpics com 001 007 Plain near a forest edge with snow and frontal sun Switzerland Vaud Marchairuz jpg","Summary":"cat1024 jpg Taille 1024x768 Edenpics com 001 007 Plain near a forest edge with snow and frontal sun Switzerland Vaud Marchairuz jpg Taille 1024x768","Url":"http:\/\/www.bergoiata.org\/fe\/divers60\/Edenpics-com_001-007-Plain-near-a-forest-edge-with-snow-and-frontal-sun-Switzerland-Vaud-Marchairuz.jpg","ClickUrl":"http:\/\/www.bergoiata.org\/fe\/divers60\/Edenpics-com_001-007-Plain-near-a-forest-edge-with-snow-and-frontal-sun-Switzerland-Vaud-Marchairuz.jpg","RefererUrl":"http:\/\/www.bergoiata.org\/fe\/divers60\/10.htm","FileSize":113254,"FileFormat":"jpeg","Height":"768","Width":"1024","Thumbnail":{"Url":"http:\/\/thm-a01.yimg.com\/image\/eb82ad9be22586da","Height":"120","Width":"160"}},{"Title":"Snow Capped Grand Tetons Wyoming jpg","Summary":"Putnam County New York jpg Taille 400x300 Snow Capped Grand Tetons Wyoming jpg Taille 400x300","Url":"http:\/\/www.bergoiata.org\/fe\/winter\/Snow%20Capped,%20Grand%20Tetons,%20Wyoming.jpg","ClickUrl":"http:\/\/www.bergoiata.org\/fe\/winter\/Snow%20Capped,%20Grand%20Tetons,%20Wyoming.jpg","RefererUrl":"http:\/\/www.bergoiata.org\/fe\/winter\/25.htm","FileSize":376832,"FileFormat":"jpeg","Height":"1200","Width":"1600","Thumbnail":{"Url":"http:\/\/thm-a02.yimg.com\/image\/e36d276c780afb74","Height":"127","Width":"170"}},{"Title":"compo1 jpg","Summary":"Snow \u306b\u95a2\u9023\u3059\u308b\u753b\u50cf","Url":"http:\/\/www.its.caltech.edu\/~atomic\/snowcrystals\/designer3\/compo1.jpg","ClickUrl":"http:\/\/www.its.caltech.edu\/~atomic\/snowcrystals\/designer3\/compo1.jpg","RefererUrl":"http:\/\/www.wordswarp.com\/Snow.html","FileSize":97177,"FileFormat":"jpeg","Height":"804","Width":"842","Thumbnail":{"Url":"http:\/\/thm-a01.yimg.com\/image\/f7bac17af2dd172c","Height":"152","Width":"160"}},{"Title":"snow1 jpg","Summary":"","Url":"http:\/\/www.switzerland.k12.in.us\/images\/snow%20pics\/snow1.jpg","ClickUrl":"http:\/\/www.switzerland.k12.in.us\/images\/snow%20pics\/snow1.jpg","RefererUrl":"http:\/\/www.switzerland.k12.in.us\/admin_closing_info.php","FileSize":197836,"FileFormat":"jpeg","Height":"333","Width":"500","Thumbnail":{"Url":"http:\/\/thm-a02.yimg.com\/image\/0815e60c69f0e662","Height":"96","Width":"145"}},{"Title":"Snow Covered Trees Varmland Sweden jpg","Summary":"Snow Flocks Yosemite National Park California jpg Taille 160x120 Snow Covered Trees Varmland Sweden jpg Taille 160x120","Url":"http:\/\/www.bergoiata.org\/fe\/winter\/Snow-Covered%20Trees,%20Varmland,%20Sweden.jpg","ClickUrl":"http:\/\/www.bergoiata.org\/fe\/winter\/Snow-Covered%20Trees,%20Varmland,%20Sweden.jpg","RefererUrl":"http:\/\/www.bergoiata.org\/fe\/winter\/10.htm","FileSize":338432,"FileFormat":"jpeg","Height":"1200","Width":"1600","Thumbnail":{"Url":"http:\/\/thm-a01.yimg.com\/image\/e792a810263081d6","Height":"127","Width":"170"}},{"Title":"white snow jpg","Summary":"Minor White Snow on Garage Door Rochester New York","Url":"http:\/\/www.masters-of-photography.com\/images\/screen\/white\/white_snow.jpg","ClickUrl":"http:\/\/www.masters-of-photography.com\/images\/screen\/white\/white_snow.jpg","RefererUrl":"http:\/\/www.masters-of-photography.com\/W\/white\/white_snow.html","FileSize":34918,"FileFormat":"jpeg","Height":"275","Width":"259","Thumbnail":{"Url":"http:\/\/thm-a02.yimg.com\/image\/3b7ad8335708995a","Height":"130","Width":"122"}},{"Title":"snow jpg","Summary":"Answering His First Question Tony Snow Misleads White House Press Corps","Url":"http:\/\/thinkprogress.org\/wp-content\/uploads\/2006\/05\/snow.jpg","ClickUrl":"http:\/\/thinkprogress.org\/wp-content\/uploads\/2006\/05\/snow.jpg","RefererUrl":"http:\/\/thinkprogress.org\/?p=5363&sortby=toprated","FileSize":16281,"FileFormat":"jpeg","Height":"240","Width":"320","Thumbnail":{"Url":"http:\/\/thm-a01.yimg.com\/image\/41c5b926528cf89e","Height":"97","Width":"130"}},{"Title":"SnowBuds jpg","Summary":"","Url":"http:\/\/www.rishi-tea.com\/store\/images\/SnowBuds.jpg","ClickUrl":"http:\/\/www.rishi-tea.com\/store\/images\/SnowBuds.jpg","RefererUrl":"http:\/\/www.rishi-tea.com\/store\/product.php?productid=5057&cat=7&page=1","FileSize":30617,"FileFormat":"jpeg","Height":"310","Width":"310","Thumbnail":{"Url":"http:\/\/thm-a02.yimg.com\/image\/2a9153431ab9e6ce","Height":"130","Width":"130"}}]}}
when i run it, got error message :
the Log:Error: it says “must be have ‘;’”
14:11:52.203:INFO:Log:initialized
14:11:53.328:INFO:Log:isc.Page is loaded
14:12:23.421:MUP4:WARN:Log:Error:
'必須要有 ';''
in http://test.mysite/a.html?query=snowboarding&callback=isc.Comm._scriptIncludeReply_0
at line 1
Comm.sendScriptInclude(_1=>Obj)
RPCManager.sendQueue(_1=>undef, _2=>undef, _3=>undef)
RPCManager.sendNoQueue(_1=>Obj)
"var _2=this.currentTransaction;this.currentTransaction=this.$385();this.$386(_1,this.currentTransaction);var _3=this.sendQueue();this.currentTransaction=_2;return _3"
RPCManager.sendRequest(_1=>Obj)
DataSource.sendDSRequest(_1=>Obj)
DataSource.performDSOperation(_1=>"fetch", _2=>Obj, _3=>Obj, _4=>Obj)
DataSource.fetchData(_1=>Obj, _2=>Obj, _3=>Obj)
"this.performDSOperation("fetch",_1,_2,_3)"
ResultSet.fetchRemoteData(_1=>Obj, _2=>0, _3=>75)
ResultSet.$39w()
ResultSet.getRangePaged(_1=>0, _2=>19, _3=>undef, _4=>undef)
ResultSet.$39u(_1=>0, _2=>19, _3=>undef, _4=>undef)
ResultSet.getRange(_1=>0, _2=>19, _3=>undef, _4=>undef)
ListGrid.requestVisibleRows()
Canvas.filterWithCriteria(_1=>Obj, _2=>Obj{ID:isc_OID_2_fetch}, _3=>Obj)
Canvas.$wo(_1=>"fetch", _2=>Obj, _3=>undef, _4=>Obj)
Class.invokeSuper(_1=>null, _2=>"$wo", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
Class.Super(_1=>"$wo", _2=>Array[4], _3=>Obj{length:4})
ListGrid.$wo(_1=>"fetch", _2=>Obj, _3=>undef, _4=>Obj, _5=>undef)
Canvas.fetchData(_1=>Obj, _2=>undef, _3=>undef)
"if(!_3)_3={};if(!_3.textMatchStyle)_3.textMatchStyle="exact";this.$wo("fetch",_1,_2,_3)"
FormItem.$17u(_1=>"click")
FormItem.handleClick()
"if(this.isDisabled())return;return this.$17u("click")"
[o]IButton.click(Obj, undef)
StatefulCanvas.handleActivate(_1=>Obj, _2=>undef)
StatefulCanvas.handleClick(_1=>Obj, _2=>undef)
EventHandler.bubbleEvent(_1=>[IButton ID:isc_ButtonItem_8_button], _2=>"click", _3=>undef, _4=>undef)
EventHandler.handleClick(_1=>[IButton ID:isc_ButtonItem_8_button], _2=>undef)
EventHandler.$k5(_1=>Obj{type:error}, _2=>undef)
EventHandler.handleMouseUp(_1=>Obj{type:error}, _2=>undef)
EventHandler.dispatch(_1=>EventHandler.handleMouseUp(), _2=>Obj{type:error})
anonymous(event=>undef)
"var returnVal=arguments.callee.$ch.isc.EH.dispatch(arguments.callee.$j2,event);return returnVal;"
and browser show a dialog “Finding Records that match your criteria…”, TreeList show “Loading data…”
someone can help me , what happen???
thanks a lot !!