requestfactory

requestfactory and findEntity method in GWT

喜欢而已 提交于 2019-12-18 06:55:02
问题 I am trying to use RequestFactory. My ORM provider is JPA. I have a method to retrieve a list of entity called findAll(). When the user requests for a list of entities, findAll is called. Find all executes a query against database and returns a list of entities. However, when requestFactory is asked to send this list back to the user, requestfactory calls findEntity() for each entity in the list. My question is: is there any way I can instruct request factory to not call find entity for each

GWT Request Factory - Multiple queries for collection from the “ServiceLayerDecorator.isLive()” - method

安稳与你 提交于 2019-12-14 03:58:22
问题 I had the problem, that every time i retrieved a collection from the gwt request factory, there was the "findEntity()"-method called for every entity in that collection. And this "findEntity()"-method calls the SQL-Database. I found out that this happens because request factory checks the "liveness" of every entity in the "ServiceLayerDecorator.isLive()"-method (also described here: requestfactory and findEntity method in GWT) So i provided my own RequestFactoryServlet: public class

RF JsonRpcProxy “is neither a getter nor a setter”

心不动则不痛 提交于 2019-12-13 04:29:51
问题 I'm getting is neither a getter nor a setter when gwt is compiling my @JsonRpcProxy annotated ValueProxy interfaces. I have those methods implemented with an Autobean Category but seems that RquestFactoryGenerator can't handle them: [ERROR] [modules] The method public abstract client.beans.ExpenseFreeBase findExpenseFreeBaseAssignedForThisDate(java.util.Date date) is neither a getter nor a setter Some help? 回答1: Yes, that simply is not supported: http://code.google.com/p/google-web-toolkit

RequestFactoryEditorDriver doesn't save full graph even though “with()” is called. Is circular reference an issue?

笑着哭i 提交于 2019-12-13 00:52:53
问题 Could you guys please help me find where I made a mistake ? I switched from SimpleBeanEditorDriver to RequestFactoryEditorDriver and my code no longer saves full graph even though with() method is called. But it correctly loads full graph in the constructor. Could it be caused by circular reference between OrganizationProxy and PersonProxy ? I don't know what else to think :( It worked with SimpleBeanEditorDriver though. Below is my client code. Let me know if you want me to add sources of

Editing Collections with GWT Editors and RequestFactory

帅比萌擦擦* 提交于 2019-12-12 10:07:25
问题 See the orignal question for context. Additional Context: Objectify-Appengine is used for persistence. FormProxy and QuestionProxy are of type EntityProxy QuestionDataProxy and its subtypes are of type ValueProxy All Editors implement HasRequestContext , and in the case of QuestionData subtype Editors, HasRequestContext.setContext() is called explicitly from the parent. The first problem has to do with Collections, and the second has to do with Polymorphic types. I'm not sure if the problem

RequestFactory: Proxy implementing interface with generics

爷,独闯天下 提交于 2019-12-12 09:58:44
问题 I am struggling with requestfactories and generics. In the code below, the proxy methods are matching exactly with the entity methods, but I get the log trace: java.lang.NullPointerException: null at com.google.web.bindery.autobean.vm.impl.MethodPropertyContext.traverse(MethodPropertyContext.java:102) ~[gwt-servlet-2.6.0.jar:na] at com.google.web.bindery.autobean.vm.impl.MethodPropertyContext.accept(MethodPropertyContext.java:75) ~[gwt-servlet-2.6.0.jar:na] at com.google.web.bindery.autobean

Intercepting GWT RequestFactory requests

不想你离开。 提交于 2019-12-12 08:05:16
问题 Is there a way to intercept RequestFactory requests on client side? I want to intercept calls like this: dummyRequest.dummyOperation().fire( new Receiver<String>() { @Override public void onSuccess(String response) { } }); The idea is to show some loading indication when communicating with server. 回答1: You can override the default transport implementation and pass it during RF initialization: SampleRequestFactory factory = GWT.create( SampleRequestFactory.class ); factory.initialize( new

RequestFactory validation fails when including Android maps v2 fragment

寵の児 提交于 2019-12-12 03:35:36
问题 I have successfully used RequestFactory for a very long time in my Android app, but now when trying to upgrade to maps v2, when I include <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment" /> in my XML layout file, I get the error: 01-25 08:08:41.978: E/AndroidRuntime(19854): java.lang.RuntimeException: Unable to resume

GWT >2.4 RequestFactory not saving child object changes

浪尽此生 提交于 2019-12-11 19:38:14
问题 I have a project that has been running on GWT 2.4 for some time (and 2.0 etc before that). When I switch it to GWT 2.5 or 2.6, child objects attached to my main Entity no longer save changes made to them. I don't change any code, but switching between 2.4 and 2.6, it breaks. I believe the changes don't get sent to the server. I'm watching the POST data, and it seems incomplete, missing the changes that I see being sent when on v2.4. Are there changes to RequestFactory from 2.4-2.5 that would

Requestfactory Validation on Multi-Project Setup

核能气质少年 提交于 2019-12-11 18:17:27
问题 I tried changing to the release version of gwt2.4 and run into a problem. I use multiple projects in my setup. I have a project with serverside code, one project with shared code, that can be used in different gwt projects and a gwt project binding everything together. I build everything with maven. i followed the instructions for annotationprocessing found here: http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation when I compile my shared project, where the