Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Alp Yilancioglu
Thank you for your time and informatiom 
 
Best Regards..
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/iT0jDIhCg5wJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Alp Yilancioglu
i found my problem
 
By creating the callback function outside the requestObject()   > not 
like requestObject(new Async...(..) )
 

*AsyncCallback* abc= new *AsyncCallback*  {}

and this way i set the object name with the parameter name  

jsonp.setCallbackParam("json.wrf=abc");

 
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ZwOQLUfHmb0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Alp Yilancioglu
The JS function names seems to be the same 

this is the request : 
http://localhost:8080/solr/collection1/select?q=TUR&wt=json&json.wrf=
__gwt_jsonp__.P2.onSuccess

this is the response : 
__gwt_jsonp__.P2.onSuccess
({"responseHeader":{"status":0,"QTime":1,"params":{"json.wrf":"__gwt_jsonp__
.P2.onSuccess","q":"TUR","wt":"json"}},"response":{"numFound":2,"start":0,"docs":[{"co":["Turkey"],"id":"117194","name":"TUR
 
INN 
HOTEL","lvl2":"Kuşadası","lvl1":"Aydın","_version_":1419004459433852929},{"co":["Turkey"],"id":"119294","name":"HAL-TUR
 
HOTEL","lvl2":"Denizli Merkez","lvl1":"Denizli"
,"_version_":1419004459561779201}]}})


any other suggestions for me without JSONPRequestBuilder class 
this is really important for me 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Qr-XQ_qp2XYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Thomas Broyer


On Monday, November 19, 2012 3:40:45 PM UTC+1, Alp Yilancioglu wrote:
>
>  i looked from firebug, Gwt sets a dynamic onSuccess function name to 
>  the parameter name i have set as "json.wrf"  which  seems okey 
>
>  Unfortunetly both  , onSuccess  and  onFailure functuions are not get 
> called; 
>
> What should i do at this point?
>

Check that the response from Solr is correct: it might try to call another 
JS function than the one given in json.wrf, or there might be an error when 
calling that method and/or evaluating the script (Googling "solr jsonp" 
revealed a few bugs in Solr, they apparently have been fixed but you might 
have to check your version of Solr)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/YaGH9cv35fwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Alp Yilancioglu
 i looked from firebug, Gwt sets a dynamic onSuccess function name to 
 the parameter name i have set as "json.wrf"  which  seems okey 

 Unfortunetly both  , onSuccess  and  onFailure functuions are not get 
called; 

What should i do at this point?



 

 

 






-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/KBbqqEK4SDQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Thomas Broyer


On Monday, November 19, 2012 3:02:08 PM UTC+1, Alp Yilancioglu wrote:
>
> Hi thanks for the information,
>  
> i have done what you have told,
> and here is the code; 
> unfirtunety unable to recieve the results ?
>

What do you mean? onSuccess is not called or you don't know what to do with 
the received JavaScriptObject?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/p2ca8teWcx0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Alp Yilancioglu
Hi thanks for the information,
 
i have done what you have told,
and here is the code; 
unfirtunety unable to recieve the results ?
 
 
 
Client Side Code; 
   JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
   
   String url = "http://localhost:8080/solr/select?q=TUR&wt=json";;
   jsonp.setCallbackParam("json.wrf");

jsonp.requestObject(url,new AsyncCallback() {

 public void onFailure(Throwable throwable) {... }
 public void onSuccess(JavaScriptObject rs) {   ...  }  
}
 );
 
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/8AYNqW6YO8IJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Cross-site request for autocomplete box

2012-11-19 Thread Thomas Broyer


On Monday, November 19, 2012 12:06:29 PM UTC+1, Alp Yilancioglu wrote:
>
> Hi
> i am trying to create a autosuggest box  which take data from my apacge 
> solr server which is going to be in another domain for production
> i just simply need to request a query with the address "
> http://localhost:8080/solr/select?q=ABC&callback=handleJsonResponse
> i can get JSON as a result or an XML as a result 
>
> i followed th steps from the developers page tutorials;
> it says give a parameter with a name of callback and set the callback 
> func.name ;
> and according to the tutorial it shows that the response has to be some 
> thing like  GivenCallBackName([ JsonResults ])
>

The docs are outdated, there's JsonpRequestBuilder now.

And to ask Solr to return JSON-P, there's a json.wrf parameter: 
http://wiki.apache.org/solr/SolJSON#JSON_specific_parameters
This is the value to pass to JsonpRequestBuilder's setCallbackParam method.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/BsdY4tOEHkYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.