requestfactory

Clarify how GWT RequestFactory and RequestContext work

戏子无情 提交于 2019-12-03 03:23:20
问题 I am trying to implement RequestFactory and the Editor framework into my app. I'm finding even after researching the forum, the Google Developer forum, and others that there is something fundamental that I don't understand about using RequestContext with RequestFactory. Here is my scenario: I have a simple Entity that has three fields, id, version, description called CmsObjectType. I have a corresponding EntityProxy and an CmsObjectTypeServiceDAO with my CRUD operations. I have also

GWT RequestFactory and multiple requests

亡梦爱人 提交于 2019-12-03 00:33:21
Is there a way to use RequestFactory to create two entities in a single request? I tried: EmployeeRequest request = requestFactory.employeeRequest(); EmployeeProxy newEmployee = request.create(EmployeeProxy.class); newEmployee.setName("Joe!"); Request<Void> createReq = request.persist().using(newEmployee); createReq.fire(); EmployeeProxy newEmployee2 = request.create(EmployeeProxy.class); newEmployee2.setName("Sam!"); Request<Void> createReq2 = request.persist().using(newEmployee2); createReq2.fire(); But I get an error that a request is already in progress. When I made two separate

GWT RequestFactory examples?

…衆ロ難τιáo~ 提交于 2019-12-02 17:43:14
Do you know where i can find some code examples for the new GWT 2.1 RequestFactory? Google's tutorial is not good enough to begin with. please check this http://javaasylum.blogspot.com/2010/11/gwt-21-request-factory.html and from googler : https://wave.google.com/wave/?pli=1#restored:wave:googlewave.com!w%252BWU4iAICkI.1 And written in 2011 there are these tutorials which use ServiceLocators and show how to split the server side code using DAOs. http://cleancodematters.wordpress.com/2011/06/04/tutorial-gwt-request-factory-part-i/ http://turbomanage.wordpress.com/2011/03/25/using-gwt

Clarify how GWT RequestFactory and RequestContext work

二次信任 提交于 2019-12-02 16:53:37
I am trying to implement RequestFactory and the Editor framework into my app. I'm finding even after researching the forum, the Google Developer forum, and others that there is something fundamental that I don't understand about using RequestContext with RequestFactory. Here is my scenario: I have a simple Entity that has three fields, id, version, description called CmsObjectType. I have a corresponding EntityProxy and an CmsObjectTypeServiceDAO with my CRUD operations. I have also implemented ServiceLocator and ObjectLocator classes. This code all compiles and runs. I have also created a

RequestFactory doesn't populate all fields of my entity proxy

最后都变了- 提交于 2019-12-02 13:03:28
问题 Could you please tell me how I can make RequestFactory populate fields of my entity proxy that are entity proxies too ? Here is parent proxy @ProxyFor(value = Organization.class, locator = PojoLocator.class) public interface OrganizationProxy extends EntityProxy { public String getName(); public void setName(String name); public String getAddress(); public void setAddress(String address); public PersonProxy getContactPerson(); public void setContactPerson(PersonProxy contactPerson); } as you

RequestFactory client-side inheritance of typed class with generics

百般思念 提交于 2019-12-02 07:35:13
I would like to know, is it possible to use generic classes of request factory proxy/context for common actions for all entities, like getById(Long id) . In my app I will have many dictionaries like classes, that will have only id and name parameters, so I would like to write once functionality and use it through inheritance in rest classes: Here is server implementation: Domain model classes @MappedSuperclass public class GenericModel<T extends GenericModel<T>> implements Identifiable, Versionable { @Transient protected Class<T> entityClass; @Id @GeneratedValue(strategy = GenerationType

Another entities-cannot-be-cast-to-javassist-util-proxy-proxy

徘徊边缘 提交于 2019-12-01 18:11:22
Following thread [entities cannot be cast to javassist.util.proxy.Proxy, i do have now a server side error ( tks thomas) I wasn't able to face the real problem within my app. java.lang.ClassCastException: org.nit.persistance.entities.Manufacturers_.$$_javassist_3 cannot be cast to javassist.util.proxy.Proxy at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:148) at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:73) at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy

Another entities-cannot-be-cast-to-javassist-util-proxy-proxy

廉价感情. 提交于 2019-12-01 16:19:50
问题 Following thread [entities cannot be cast to javassist.util.proxy.Proxy, i do have now a server side error ( tks thomas) I wasn't able to face the real problem within my app. java.lang.ClassCastException: org.nit.persistance.entities.Manufacturers_.$$_javassist_3 cannot be cast to javassist.util.proxy.Proxy at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:148) at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy

GWT RequestFactory Performance

笑着哭i 提交于 2019-12-01 13:09:28
I have a question regarding the performance of RequestFactory and GWT. I have a Domain Entity with 8 fields that returns around 1000 EntityProxies. The time between the request fires and it responds is around 20 seconds. I do the same but returning 10 EntityProxies and the time is 17 seconds, almost the same. Is this because I'm working in development mode, or when I release the code to the web the time will be the same? Is there any way to improve the performance? , I'm only reading data so perhaps something that only read and doesn't writes may be the solution? I read this post with

RequestFactoryEditorDriver getting edited data after flush

倾然丶 夕夏残阳落幕 提交于 2019-12-01 10:27:24
Let me start with I have a solution, but I don't really think it is elegant. So, I am looking for a cleaner way to do this. I have an EntityProxy displayed in a view panel. The view panel is a RequestFactoryEditorDriver only using display mode. The user clicks on a data element and opens a popup editor to edit a data element of the EntityProxy with a few more bits of data than is displayed in the view panel. When the user saves the element I need the view panel to update the display. I ran into a problem because the RequestFactoryEditorDriver of the popup editor flow doesn't let you get to the