requestfactory

request not reaching the server

南笙酒味 提交于 2021-02-08 10:30:57
问题 I am having problem with requests that stays on pending status on the browser. I am using GWT with requestfactory and Apache tomcat. I tried to see the tomcat access log but it seems that requesfactory's requests (which stays on pending) are not reaching the server. Any suggestion? 来源: https://stackoverflow.com/questions/20072015/request-not-reaching-the-server

Gwt Request Factory. Generics and Inheritance on client side

时光总嘲笑我的痴心妄想 提交于 2020-02-23 05:49:15
问题 I am trying to write a generic class to avoid code repetition. I would like to have generic methods for: Get Entity/Model from server by id. Get List of all Entities/Models from server. Send to server and save in db Entity/Model. It should work with Generic classes, e.g.: Services<PizzaProxy> factory = GWT.create(Services.class); factory.initialize(new SimpleEventBus()); GenericContext<PizzaProxy> context = factory.genericContext(); context.get().to(new Receiver<List<GenericProxy<PizzaProxy>>

Gwt Request Factory. Generics and Inheritance on client side

六眼飞鱼酱① 提交于 2020-02-23 05:46:48
问题 I am trying to write a generic class to avoid code repetition. I would like to have generic methods for: Get Entity/Model from server by id. Get List of all Entities/Models from server. Send to server and save in db Entity/Model. It should work with Generic classes, e.g.: Services<PizzaProxy> factory = GWT.create(Services.class); factory.initialize(new SimpleEventBus()); GenericContext<PizzaProxy> context = factory.genericContext(); context.get().to(new Receiver<List<GenericProxy<PizzaProxy>>

GWT Editor Framework: Drop Down List

↘锁芯ラ 提交于 2020-01-24 22:34:16
问题 I'm looking for someone to point me in the right direction (link) or provide a code example for implementing a drop down list for a many-to-one relationship using RequestFactory and the Editor framework in GWT . One of the models for my project has a many to one relationship: @Entity public class Book { @ManyToOne private Author author; } When I build the view to add/edit a book, I want to show a drop down list that can be used to choose which author wrote the book. How can this be done with

How to @Inject a HttpSession object in a service layer (DAO) class in GWT using Guice?

烂漫一生 提交于 2020-01-23 03:50:46
问题 I have such a dirty code in my GWT app, some of the classes of my service layer depend on an HttpSession object. So for example, in one of my DAO (which was a GWT-RPC endpoint) I have something like this : public class MyExampleDAO extends RemoteServiceServlet { public findItems() { // here I need to get the object session to retrieve the currently logged in user in order to query for all its items... } } The problem is that, I am currently migrating the code to use RequestFactory. My DAO

GWT 2.4.0 RequestFactory polymorphism

懵懂的女人 提交于 2020-01-22 12:44:47
问题 Does GWT 2.4 support this case: @Entity class MyBase {...} @Entity class MyChild1 extends MyBase {...} @Entity class MyChild2 extends MyBase {...} ... @ProxyFor(MyBase.class) class MyBaseProxy extends EntityProxy {...} @ProxyFor(MyChild1.class) class MyChild1Proxy extends MyBaseProxy {...} @ProxyFor(MyChild2.class) class MyChild2Proxy extends MyBaseProxy {...} ... @Service(ArticleBase.class) public interface MyBaseRequest extends RequestContext { Request<MyBaseProxy> getStuff(); // MyChild1

RequestFactory: error.getExceptionType() returns null in Receiver#onFailure

99封情书 提交于 2020-01-15 07:37:02
问题 In the server side i have: public void throwException() throws Exception { throw new NullPointerException("fslkdjflks"); } in the client side i have: _requestFactory.myService().throwException().fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { // TODO Auto-generated method stub } @Override public void onFailure(ServerFailure error) { // TODO Auto-generated method stub Window.alert(error.getExceptionType() + " " + error.getMessage()); } }); error.getExceptionType()

RequestFactory: error.getExceptionType() returns null in Receiver#onFailure

可紊 提交于 2020-01-15 07:34:51
问题 In the server side i have: public void throwException() throws Exception { throw new NullPointerException("fslkdjflks"); } in the client side i have: _requestFactory.myService().throwException().fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { // TODO Auto-generated method stub } @Override public void onFailure(ServerFailure error) { // TODO Auto-generated method stub Window.alert(error.getExceptionType() + " " + error.getMessage()); } }); error.getExceptionType()

GWT RequestFactory throws java.lang.UnsupportedOperationException: <Proxy interface class> from ValueCodex.getTypeOrDie

佐手、 提交于 2020-01-06 14:39:18
问题 In our application we need to share domain code between GWT client and server. Because of that we are using common interfaces for GWT proxies and server-side entities. This approach was once described by @thomas-broyer here: https://stackoverflow.com/a/15852887/187241 Exception stacktrace: ERROR com.google.web.bindery.requestfactory.server.SimpleRequestProcessor - Error while processing request java.lang.UnsupportedOperationException: se.homework.hwbs.domain.shared.model.IAppointment at com

GWT polymorphic lists with @ExtraTypes

北城余情 提交于 2020-01-01 19:40:09
问题 I have a little problem with a list that contains different types of elements and i would like to see if anyone of you have met the problem before. The issue should be solved with the use of @ExtraTypes, but it is not working for me, so i guess i am not using it correctly. So, the scenario is (bean names are changed for clarity): GENERAL: I am using GWT 2.5 with RequestFactory. SERVER-SIDE: I have a RootBean that contains, among other stuff, a List <ChildBean> . This ChildBean contains some