gwt-rpc

Suggest Addresses in a SuggestBox in GWT/Java

佐手、 提交于 2019-12-23 18:31:13
问题 I want to define a SuggestBox , which behaves like the search bar in Google Maps: When you begin to type, real addresses, starting with the typed letters, appear. I think, that I need to use the Geocoder.getLocations(String address, LocationCallback callback) method, but I have no idea how to connect this with the oracle, which is needed by the suggest box to produce its suggestions. Can you please give me ideas how do I connect the getLocations Method with the SuggestOracle ? 回答1: I solved

GWT Single threaded async callbacks

微笑、不失礼 提交于 2019-12-22 18:45:14
问题 rpc.call(mycallback); { //subsequent code block } How does the single threaded async callback work? When will the callback get called? Will the subsequent code block always finish executing before the callback is allowed to run (i.e. will the callback only run once all code has finished?)? 回答1: #1 javascript is single-thread, but the browser is not, so the js-thread sends the xhr call to the browser to resolve it, and the browser returns the control to it inmediately. #2 when the browser gets

Can GWT Properties be used from the server?

女生的网名这么多〃 提交于 2019-12-22 12:38:54
问题 I have a GWT app that uses GWT RPC to talk to App Engine servlets. I would like to use constants defined in a .properties file on the server. Is that possible? 回答1: To enable .properties in client you use GWT.create(file_name.properties); But this combination don't work on server-side, cause it's only availible on client-side, you'll get this error: GWT.create() is only usable in client code! It cannot be called, for example, from server code. But, I suppose, you can use standard approach of

Spring Method Level Security fails on second call

筅森魡賤 提交于 2019-12-22 08:12:41
问题 I want to use method level security on my GWT application. I'm trying to use Spring Security 3.1, as I found a working example here, but it doesn't use form-login. After reading this answer the first method call successfully obtains the SecurityContext, but then clears it before the next call: [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - Obtained a valid SecurityContext from SPRING_SECURITY_CONTEXT: 'org.springframework.security.core.context

Is GWT's RPC different from AJAX?

女生的网名这么多〃 提交于 2019-12-20 21:00:57
问题 How is GWT (Google Web Toolkit)'s RPC (Remote Procedure Call)'s for Asynchronous operations from browser/javascript to server is DIFFERENT or SIMILAR when compared to the AJAX calls ? If they are different, could someone help me understand how they are different ? I also heard that this RPC implementation does not works with all Server containers. For example, the GWT project did not work in Apache Tomcat. Moreover, is this RPC a an custom implementation of Google , or is it a standard

open/save file in smartGWT

佐手、 提交于 2019-12-19 11:46:17
问题 I have implemented RPCService, RPCServiceAsync & RPCServieImpl. On clicking a button a service in server side will be called and it will fetch data from DB and file is created. Once the file is created, then i need to open that file in client side and need to prompt a dialog box with open/save options. how can i implement this opening a file part. pls suggest a way to implement t.. Reply pls.. thanks in advance.... @Hambend : I still have one more clarification !.. how to call this doGet

entity with relationships through GWT RPC problem

删除回忆录丶 提交于 2019-12-19 10:41:01
问题 I am using JPA 2.0. (EclipseLink 2.0.2) If an entity contains relations, for example: @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId") private Collection<Blog> blogCollection; I am getting the following error when I am sending it through RPC: com.google.gwt.user.client.rpc.SerializationException: Type 'org.eclipse.persistence.indirection.IndirectList' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For

Sending a date and timezone from GAE server to GWT client

寵の児 提交于 2019-12-18 13:36:41
问题 OK folks, I have been going around this problem for about 2 weeks now trying everything I can think of and looking at tons of answers on here that feel like they are going to answer it, but I just cant work out how I am meant to do what I am trying to do and it is driving me absolutely NUTS! No one seems to have an answer anywhere, there are half answers all over the place, but none seem to actually do what I need it to do, surely SOMEONE has solved this problem before! Please excuse the

GWT Simple RPC use case problem : Code included

旧时模样 提交于 2019-12-18 04:54:30
问题 I am trying to work out how to send a domain object from the server-side to the client-side using GWT RPC. I've coded a really simple use case that represents the sort of thing I (and others?) need to be able to do but presently can't get to work. I have scoured the docs, tutorials and forums but they either show Strings being passed around or offer explanations that (when I apply them to this) still don't work. Hopefully someone can explain to me and others why this code doesn't work and how

Fake a GWT Synchronous RPC call

℡╲_俬逩灬. 提交于 2019-12-17 20:15:15
问题 First of all, I know that doing a synchronous call is "wrong", and know that "is not possible". But, in a situation a lot complex (i dont know how to explain), i need to wait the response from server, I'am using the GWT-Platform command implementation for the GWT RPC calls. I was looking for some kind of "hack" for doing this. Thanks in advance. 回答1: There is a solution but it is not easy (e.g. you cannot flip a single parameter to make it work). GWT is using normal JS XMLHttpRequest under