Re: RequestFactory with EJB Beans, how??
Good to hear ;) On Fri, May 20, 2011 at 8:43 AM, andre.doelger andre.doel...@freenet.dewrote: Great! Now everything works. On May 17, 4:18 pm, Bálint Kriván bal...@krivan.info wrote: Please have a look at the following piece of codes: The ServiceLocator implementation: https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch... https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch.. . EntityLocator: https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch... https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch.. .It's used for single entities. An example RequestContext: https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch... https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch.. .Note the locator = BeanLocator stuff And the implementation which is an EJB: https://github.com/messo/KFC/blob/master/kfc-ejb/src/main/java/hu/sch... https://github.com/messo/KFC/blob/master/kfc-ejb/src/main/java/hu/sch.. .It was working a several weeks ago with 2.2, I didn't checked with 2.3. 2011/5/17 andre.doelger andre.doel...@freenet.de Hi, the example implementation is not really working. I've tried a RequestFactory/EJB integration like this with GWT 2.3. When findGroups() is called from a GWT client the EJB look-up via BeanLocator is okay. But before GWT returns the objects to the client it directly creates a instance of GroupManager and calls find() for each returned object. The dependcy injection did not take place and the EntityManager is null - NullPointerexception. What I do not understand: 1. Why does the RequestFactory directly creates an instance of the Locator and do not use the ServiceLocator? 2. Why call find() for each entity that is returned in the List - Creates n+1 SQL calls Regards, André On 2 Feb., 12:25, Bálint Kriván bal...@krivan.info wrote: Ok, I've found the problem: Using EJB bean for Locator implementation isn't good, because GWT instantiate it, so we have to make a EntityLocator, which lookups for the EJB and invoke the right methods. I hope this helps to the others! 2011/2/2 Bálint Kriván bal...@krivan.info Hi! Did anybody tried to use RequestFactory with EJB Beans using Locator/ServiceLocator? I'm having a little issue here. My stateless session bean extends LocatorGroup, Long. For my RequestContext I use a ServiceLocator which uses InitialContext.doLookup(); to lookup the EJB (I can't use @EJB because the ServiceLocator instance isn't container-managed -- btw. is there any solution for this? lookup looks ugly). Everything looks fine, but in my Bean, the entityManager instance is null (I'm using @PersistenceContext annotation on it) when GWT wants to invoke find(Class?, Long) method: here I use simple em.find(). It's strange because invoking from a servlet, using @EJB, it works fine. What am I doing wrong? I've created a gist for it:https://gist.github.com/807082 So in this file: https://gist.github.com/807082#file_group_manager.javaLine #29, the em is null, but using this servlet: https://gist.github.com/807082#file_test_servlet.javaitworks perfectly. Has anybody experience with this problem? I would like to use EJBs, because I would like to have JTA and Container-managed transactions. Thanks for any advice! -- Regards, Bálint Kriván -- Üdv, Kriván Bálint -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactory with EJB Beans, how??
Please have a look at the following piece of codes: The ServiceLocator implementation: https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch/kfc/server/BeanLocator.java https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch/kfc/server/BeanLocator.java EntityLocator: https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch/kfc/server/EntityLocator.java https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch/kfc/server/EntityLocator.javaIt's used for single entities. An example RequestContext: https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch/kfc/shared/service/GroupRequestContext.java https://github.com/messo/KFC/blob/master/kfc-war/src/main/java/hu/sch/kfc/shared/service/GroupRequestContext.javaNote the locator = BeanLocator stuff And the implementation which is an EJB: https://github.com/messo/KFC/blob/master/kfc-ejb/src/main/java/hu/sch/kfc/ejb/GroupManager.java https://github.com/messo/KFC/blob/master/kfc-ejb/src/main/java/hu/sch/kfc/ejb/GroupManager.javaIt was working a several weeks ago with 2.2, I didn't checked with 2.3. 2011/5/17 andre.doelger andre.doel...@freenet.de Hi, the example implementation is not really working. I've tried a RequestFactory/EJB integration like this with GWT 2.3. When findGroups() is called from a GWT client the EJB look-up via BeanLocator is okay. But before GWT returns the objects to the client it directly creates a instance of GroupManager and calls find() for each returned object. The dependcy injection did not take place and the EntityManager is null - NullPointerexception. What I do not understand: 1. Why does the RequestFactory directly creates an instance of the Locator and do not use the ServiceLocator? 2. Why call find() for each entity that is returned in the List - Creates n+1 SQL calls Regards, André On 2 Feb., 12:25, Bálint Kriván bal...@krivan.info wrote: Ok, I've found the problem: Using EJB bean for Locator implementation isn't good, because GWT instantiate it, so we have to make a EntityLocator, which lookups for the EJB and invoke the right methods. I hope this helps to the others! 2011/2/2 Bálint Kriván bal...@krivan.info Hi! Did anybody tried to use RequestFactory with EJB Beans using Locator/ServiceLocator? I'm having a little issue here. My stateless session bean extends LocatorGroup, Long. For my RequestContext I use a ServiceLocator which uses InitialContext.doLookup(); to lookup the EJB (I can't use @EJB because the ServiceLocator instance isn't container-managed -- btw. is there any solution for this? lookup looks ugly). Everything looks fine, but in my Bean, the entityManager instance is null (I'm using @PersistenceContext annotation on it) when GWT wants to invoke find(Class?, Long) method: here I use simple em.find(). It's strange because invoking from a servlet, using @EJB, it works fine. What am I doing wrong? I've created a gist for it:https://gist.github.com/807082 So in this file: https://gist.github.com/807082#file_group_manager.javaLine #29, the em is null, but using this servlet: https://gist.github.com/807082#file_test_servlet.javait works perfectly. Has anybody experience with this problem? I would like to use EJBs, because I would like to have JTA and Container-managed transactions. Thanks for any advice! -- Regards, Bálint Kriván -- Üdv, Kriván Bálint -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactory with EJB Beans, how??
Ok, I've found the problem: Using EJB bean for Locator implementation isn't good, because GWT instantiate it, so we have to make a EntityLocator, which lookups for the EJB and invoke the right methods. I hope this helps to the others! 2011/2/2 Bálint Kriván bal...@krivan.info Hi! Did anybody tried to use RequestFactory with EJB Beans using Locator/ServiceLocator? I'm having a little issue here. My stateless session bean extends LocatorGroup, Long. For my RequestContext I use a ServiceLocator which uses InitialContext.doLookup(); to lookup the EJB (I can't use @EJB because the ServiceLocator instance isn't container-managed -- btw. is there any solution for this? lookup looks ugly). Everything looks fine, but in my Bean, the entityManager instance is null (I'm using @PersistenceContext annotation on it) when GWT wants to invoke find(Class?, Long) method: here I use simple em.find(). It's strange because invoking from a servlet, using @EJB, it works fine. What am I doing wrong? I've created a gist for it: https://gist.github.com/807082 So in this file: https://gist.github.com/807082#file_group_manager.java Line #29, the em is null, but using this servlet: https://gist.github.com/807082#file_test_servlet.java it works perfectly. Has anybody experience with this problem? I would like to use EJBs, because I would like to have JTA and Container-managed transactions. Thanks for any advice! -- Regards, Bálint Kriván -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactoryEditorDriver example?
Well, I've just introduced Locator and ServiceLocator stuff to my code, to be able to use EJB beans, and I replaced InstanceRequest to Request on persist() method. Because in EJB, you need the entity as argument, because this will be the bean instance not the entity of course. And it works perfectly, so the problem is elsewhere, so using this: @Service(MyObject.class) public interface ProgramRequest extends RequestContext { RequestVoid persist(MyProxy proxy); } and this: req.persist(proxy); driver.edit(proxy, req); It works perfectly. So I'm not sure what is the issue with your code, can you show a snippet? 2011/2/1 Bálint Kriván bal...@krivan.info Well, I believe the persist method shouldn't be static, it's an InstanceRequest: public void persist() { // [this] is the MyObject instance, you should persist/merge this one } and this is the Request interface: @Service(MyObject.class) public interface ProgramRequest extends RequestContext { InstanceRequestMyProxy, Void persist(); } I'm not sure, that it won't work (but now it seems it isn't working for you) with pure Request persist(MyProxy proxy); but then you can't use using(); stuff, and maybe the RequestContext won't save the stuff like this, because you don't use and InstanceRequest. It's worth a shot :) Let me know if that was the problem. On Mon, Jan 31, 2011 at 10:04 PM, George Moschovitis george.moschovi...@gmail.com wrote: When I call fire(), the object passed to the server side method (public static void persist(MyObject obj) is the original (before editing) object. -g. On Monday, January 31, 2011 9:42:08 PM UTC+2, Bálint Kriván wrote: Sorry, I don't get it clearly, which returned proxy? Where do you use a returned one? Using flush() you get the Context, not the Proxy object. On Mon, Jan 31, 2011 at 7:34 PM, George Moschovitis george.mo...@gmail.com wrote: Another problem... I tried your suggestion and it seems to work with one important problem: the object/proxy returned is the original proxy passed to the editor and not the edited object... any idea what might be wrong? -g. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-we...@googlegroups.com. To unsubscribe from this group, send email to google-web-tool...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.
[MAVEN] Add org.json:json dependency to gwt-servlet
Hi! Could you (who manages the maven repo) add org.json:json dependency to gwt-servlet maven project? Because RequestFactory needs it, and it looks inappropriate to add a dependency manually, because gwt-servlet is the project who depends on it. Thanks! dependency groupIdorg.json/groupId artifactIdjson/artifactId version20090211/version /dependency Should I open an issue for this? -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: [MAVEN] Add org.json:json dependency to gwt-servlet
Yes, now I see, why isn't it included.. :( Then what about a gwt-requestfactory-dep project? IIRC there is something like gwt-servlet-deps.jar or something for non-maven developers, then maybe there could be made some fake-projects for these issues? Or maybe refactoring GWT to more little projects like gwt-requestfactory, so com.google.gwt.requestfactory package could go there. I see the pros and cons, but currently it seems to be a little hacky defining manually the dependencies. Thomas, yes I know it needs javax.validation aswell, but fortunately I depend on javaee-api 6.0 artifact, and it's included there ;) I've opened an issue for this: http://code.google.com/p/google-web-toolkit/issues/detail?id=5973 I'm open for more inputs, and discussion about this. Thanks! On Wed, Feb 2, 2011 at 6:10 PM, David Chandler drfibona...@google.comwrote: These are deliberately not included in the gwt-servlet pom because they're only required if you're using RequestFactory. Go ahead an open an issue and we can get input there. On Wed, Feb 2, 2011 at 11:59 AM, Thomas Broyer t.bro...@gmail.com wrote: RequestFactory also needs javax.validation; but if you don't use RequestFactory you don't need these dependencies. In other words, if they ever get added, they have to be optionaltrue/optional (and you'll have to explicitly add them to your pom.xml anyway, but at least the gwt-servlet pom.xml somehow documents it). (and I think you should either post on the GWT-Contributors group or open an issue) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- David Chandler Developer Programs Engineer, Google Web Toolkit w: http://code.google.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactoryEditorDriver example?
Well, I believe the persist method shouldn't be static, it's an InstanceRequest: public void persist() { // [this] is the MyObject instance, you should persist/merge this one } and this is the Request interface: @Service(MyObject.class) public interface ProgramRequest extends RequestContext { InstanceRequestMyProxy, Void persist(); } I'm not sure, that it won't work (but now it seems it isn't working for you) with pure Request persist(MyProxy proxy); but then you can't use using(); stuff, and maybe the RequestContext won't save the stuff like this, because you don't use and InstanceRequest. It's worth a shot :) Let me know if that was the problem. On Mon, Jan 31, 2011 at 10:04 PM, George Moschovitis george.moschovi...@gmail.com wrote: When I call fire(), the object passed to the server side method (public static void persist(MyObject obj) is the original (before editing) object. -g. On Monday, January 31, 2011 9:42:08 PM UTC+2, Bálint Kriván wrote: Sorry, I don't get it clearly, which returned proxy? Where do you use a returned one? Using flush() you get the Context, not the Proxy object. On Mon, Jan 31, 2011 at 7:34 PM, George Moschovitis george.mo...@gmail.com wrote: Another problem... I tried your suggestion and it seems to work with one important problem: the object/proxy returned is the original proxy passed to the editor and not the edited object... any idea what might be wrong? -g. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-we...@googlegroups.com. To unsubscribe from this group, send email to google-web-tool...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.
RequestFactory with EJB Beans, how??
Hi! Did anybody tried to use RequestFactory with EJB Beans using Locator/ServiceLocator? I'm having a little issue here. My stateless session bean extends LocatorGroup, Long. For my RequestContext I use a ServiceLocator which uses InitialContext.doLookup(); to lookup the EJB (I can't use @EJB because the ServiceLocator instance isn't container-managed -- btw. is there any solution for this? lookup looks ugly). Everything looks fine, but in my Bean, the entityManager instance is null (I'm using @PersistenceContext annotation on it) when GWT wants to invoke find(Class?, Long) method: here I use simple em.find(). It's strange because invoking from a servlet, using @EJB, it works fine. What am I doing wrong? I've created a gist for it: https://gist.github.com/807082 So in this file: https://gist.github.com/807082#file_group_manager.java Line #29, the em is null, but using this servlet: https://gist.github.com/807082#file_test_servlet.java it works perfectly. Has anybody experience with this problem? I would like to use EJBs, because I would like to have JTA and Container-managed transactions. Thanks for any advice! -- Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen
Great, so I'm not the only one who is experiencing the issue, good to hear. Because I was starting to believe I'm doing something wrong. Should we open an issue for this? On Mon, Jan 31, 2011 at 12:52 AM, Colin Alworth niloc...@gmail.com wrote: I don't fully understand the interactions between RequestFactory and the editor system, but it seems that there is another issue which is still causing this error to occur, though it seems to be another, unrelated bug, which only affects the HasDataEditor adapter and the editable HasData objects it wires in to the editor system. It appears that in AbstractEditorDelegate.initialize(String, T, E, DelegateMap), the object of type T has ensureMutable(T) called on it, and the value is passed then into setObject(T). It seems to be assumed then that the original parameter object is mutable, as it is passed into LeafValueEditor.setValue(T) at line 255. In the case of the CellTable, which is hooked into the editor framework using the HasDataEditorT class (whose IndexedEditor class implements LeafValueEditor), this means that the still-frozen instance has been drawn for the user, and so cannot be edited. I'm still a little ways away from understanding a good fix for this, but it seems that AbstractEditorDelegate:255 could be changed to read leafValueEditor.setValue(getObject());. If that is the case, it seems likely that other similar changes should also be made nearby (lines 180, 182, and 280). All these line numbers are from the 2.2-M1 release. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Is there a way to copy all maven referenced jars to the war/WEB-INF/lib
wow, webAppCreator support maven structure? Good news, thanks for the heads-up! On Sun, Jan 30, 2011 at 6:02 PM, mortsahl morts...@gmail.com wrote: I'm new to GWT and trying to figure things out, but on this maven question, I created my initial project using the included webAppCreator script like this ... $GWT_HOME/webAppCreator -out myProject -maven com.myProject (I'm on a Mac so change your path accordingly) This created my initial project template including the pom.xml file. See the generated README.txt file. I then imported the project into Eclipse using the m2eclipse plugin and importing as an existing maven project. Build from the command line or from Eclipse. This gives you a working template ... add dependencies, get rid of the sample code and start doing your own thing. First thing I did was just add a dependency and did a mvn clean gwt:compile package then looked in the the generated war file's WEB-INF/lib and my dependency was there. Very easy. I don't know if I'll run into problems as my app grows in complexity but for a start I couldn't be happier. Mort On Jan 30, 2:01 am, Mike.G gsun...@gmail.com wrote: hi all: i'm using maven to organize my gwt project, everything works well but one defect: Is there a way to copy all maven referenced jars to the war/WEB-INF/lib? when i use maven POM to add a new depencies, i have to copy the jar and it's dependent jar to WEB-INF/lib, usually i may forget copying some, which will lead to no class def error when i deliver the project to web server. but in development mode, it works well. could someone help me? how did you tackle this messy situation? thanks very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactoryEditorDriver example?
Hi George! This is how I do this: RequestContext context = driver.flush(); if (driver.hasErrors()) { for (EditorError ee : driver.getErrors()) { GWT.log(ee.getMessage()); } return; } context.fire(new ReceiverVoid() { @Override public void onSuccess(Void response) { } }); You just simply call fire() method on the RequestContext. And this is how I initialize the driver: driver.initialize(requestFactory, view.getEditor()); MyRequest req = requestFactory.myRequest(); req.persist().using(proxy); driver.edit(proxy, req); Here you define, which operation should be invoked (persist in this particular case), when you call fire(). I hope this helps! On Mon, Jan 31, 2011 at 12:27 PM, George Moschovitis george.moschovi...@gmail.com wrote: I thought it would be something similar, but still I can't get this to work. For example flush() returns a requestContext() how can I save the edited object (by firing a method to the server side service). And btw how can I create an editor for a new object? should I pass null to initialize()? really, a full, working example would be *very* useful for newbies like me. thanks, -g. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactoryEditorDriver example?
(Sorry, the syntax highlighted stuff got screwed up, but I hope it's still readable) -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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 2.1.1 EditorFramework CellList editor using SimpleBeanEditorDriver and JSON help...
I couldn't manage to work Editor framework with view interfaces (It doesn't mean it's impossible, I hope it isn't or it won't be). Try not to extend the EditorModule in your view interface, but implement it in the view implementation. I know it looks ugly, that's why I've created a seperate editor widget which is included in the View. Let me know how it goes. On Mon, Jan 31, 2011 at 3:31 AM, Milan Cvejic liquidbra...@gmail.comwrote: Hi everyone, I can't manage to make editing of CellList using SimpleBeanEditorDriver. I tried everything and now looking for some help, and guidelines. I am trying to create view that will display two text fields and one CellList widget that will display some Labels. I managed to create editor for text fields, but can't manage to create editor for CellList. Here is my code... /* Basic object that need editor */ public class Module { private int id; private String name; private String description; private ListLabel fields; (getters and setters methods) } /* Basic interface that editor will use */ public interface ModulesDetailView extends IsWidget, EditorModule { @Path(name) IsEditorValueBoxEditorString getNameEditor(); @Path(description) IsEditorValueBoxEditorString getDescriptionEditor(); /* This is a part where i have problems */ @Path(fields) IsEditorListEditorLabel, EditorLabel getFieldsEditor(); } /* View Implementation */ public class ModulesDetailViewImpl implements ModulesDetailView { private static ModulesDetailViewImplUiBinder uiBinder = GWT.create(ModulesDetailViewImplUiBinder.class); private final HTMLPanel moduleDetailPanel; @UiField TextBox name; @UiField TextBox description; @UiField(provided=true) CellListFields fields = new CellListFields(new AbstractCellFields(){ @Override public void render(Context context, Fields value, SafeHtmlBuilder sb) { AbstractCellString c = new EditTextCell(); c.render(context, value.getName(), sb); } }); interface ModulesDetailViewImplUiBinder extends UiBinderHTMLPanel, ModulesDetailViewImpl { } public ModulesDetailViewImpl() { moduleDetailPanel = uiBinder.createAndBindUi(this); } @Override public Widget asWidget() { return moduleDetailPanel; } @Override public IsEditorValueBoxEditorString getNameEditor() { return name; } @Override public IsEditorValueBoxEditorString getDescriptionEditor() { return description; } /* implemented method from interface (this is where I stuck)*/ @Override public IsEditorListEditorLabel, EditorLabel getFieldsEditor() { return null; } } As you can see from comments in code, i am having problem with defining method for getting editor for CellList. Currently method getFieldsEditor is completely wrong, as i tried various things, but without success. I have logic that gets object from server, populate Module object, and populate name and description, but can't manage to populate CellList with list of retrieved data. I am using JSON and SimpleBeanEditorDriver as my code on server is PHP. Thanks for time reading this, and thanks any help. -- Milan Cvejic -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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 2.1.1 EditorFramework CellList editor using SimpleBeanEditorDriver and JSON help...
Wow, thanks Thomas! I've successfully refactored my code to work with View interface (so I don't need a seperate Editor widget), I'm not sure what I was doing wrong before, but using Milan's code and your advice, it works ;) Thanks! -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactoryEditorDriver example?
Well, I didn't try it myself, but I guess: MyRequest req = requestFactory.myRequest(); MyProxy proxy = req.create(MyProxy.class); req.persist().using(proxy); driver.edit(proxy, req); On Mon, Jan 31, 2011 at 7:14 PM, George Moschovitis george.moschovi...@gmail.com wrote: One question, how can I initialize the driver in a 'newObject' scenario, if I don't want to edit an existing object but create a new one instead. -g. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: RequestFactoryEditorDriver example?
Sorry, I don't get it clearly, which returned proxy? Where do you use a returned one? Using flush() you get the Context, not the Proxy object. On Mon, Jan 31, 2011 at 7:34 PM, George Moschovitis george.moschovi...@gmail.com wrote: Another problem... I tried your suggestion and it seems to work with one important problem: the object/proxy returned is the original proxy passed to the editor and not the edited object... any idea what might be wrong? -g. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Is there a way to copy all maven referenced jars to the war/WEB-INF/lib
Did you run, mvn eclipse:eclipse? It should add the maven jars to the classpath, and used by Eclipse. On Sun, Jan 30, 2011 at 10:01 AM, Mike.G gsun...@gmail.com wrote: hi all: i'm using maven to organize my gwt project, everything works well but one defect: Is there a way to copy all maven referenced jars to the war/WEB-INF/lib? when i use maven POM to add a new depencies, i have to copy the jar and it's dependent jar to WEB-INF/lib, usually i may forget copying some, which will lead to no class def error when i deliver the project to web server. but in development mode, it works well. could someone help me? how did you tackle this messy situation? thanks very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.
Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen
Hi! I've just asked a question at issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=5752#c6 Can somebody reply, so if I should wait for release or not? Thanks! -- Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen
On Sat, Jan 29, 2011 at 9:30 PM, Thomas Broyer t.bro...@gmail.com wrote: On Saturday, January 29, 2011 6:19:45 PM UTC+1, Bálint Kriván wrote: Hi! I've just asked a question at issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=5752#c6 Can somebody reply, so if I should wait for release or not? Are you using a HasDataEditor to push your data to your CellTable? if so, given that HasDataEditor extends ListEditor, you're experiencing this bug. Otherwise, have you .edit()ed the MainProxy that you try to modify? Yes, and yes :) I'm using HasDataEditor, because I don't know what else to use, and yes, I invoked edit() and it works for non CellTable data. So if I update to 2.2 RC1 (http://repo2.maven.org/maven2/com/google/gwt/gwt/2.2-rc1/), the bug should go away, right? The other question: Is there a way to not to write custom FieldCustomizer for columns? Can't GWT know which proxy/property I am editing? Or am I doing something wrong? Thanks! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen
Yes, sorry :) I meant FieldUpdater. I will check your magic later thanks! But currently I'm still getting java.lang.IllegalStateException: The AutoBean has been frozen :( I've updated to 2.2.0-M1, and I see that Thomas's patch is in. So I'm not sure, what's going on. The other fields can be edited correctly and saved to DB (so I guess .edit() and .flush() works correctly). But when I edit one cell of the CellTable, I get the exception. What am I doing wrong? I can send chunk of code if more needed, but currently I have no more idea, what can be wrong at my side. Thanks for your advice! On Sat, Jan 29, 2011 at 11:33 PM, Colin Alworth niloc...@gmail.com wrote: The other question: Is there a way to not to write custom FieldCustomizer for columns? Can't GWT know which proxy/property I am editing? Or am I doing something wrong? Thanks! Assuming by FieldCustomizer you mean FieldUpdater... It seems not – the Column.getValue method must be implemented to load data and the FieldUpdater.update call to put it back again. I am trying to make a simple generator to turn an interface like interface RouteColumns extends ColumnsMyBean { @Header(Name) @Editable() EditTextCell name(); @Header(Description) @Alignment(horizontal=HorizontalAlign.JUSTIFY) TextCell description(); } into a set of columns where the MyBean class has get/set calls for name and description. The Columns marker interface has a .configure call which goes through and adds each column in order to the CellTable. It isn't perfect by any stretch, but it seems to fill a hole that code generation can solve. One remaining issue I would be interested in feedback on is how to i18n the header text. I've thought about requiring that the Constants interface this would use (probably indicated via an annotation to this type) have methods named the same as the methods in the interface... Hope this sparks some thoughts in others – let me know if you are interested, and I will share a working version in the next few days. -Colin -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Editor + RequestFactory
I see, thanks! There was an error with this, but will check it again. On Thu, Jan 20, 2011 at 12:11 PM, Thomas Broyer t.bro...@gmail.com wrote: I guess your DateIntervalProxy is a ValueProxy? When editing a proxy, the RequestFactoryEditorDriver calls .edit() on each proxy it sees (which for ValueProxy-s have the effect of somehow creating a new object, hence the PERSIST, and not UPDATE, operation). But it looks like the DateIntervalProxy, despite being sent to the server, isn't actually used (there's no dateInterval property in the P for the ProgramProxy UPDATE operation, next to the name:Yuppi!), so you're just wasting a little bit of bandwidth by sending the object, but it should work as you're expecting anyway (i.e. not modifying the Program domain object on the server) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: BestPractice : Use of the Editor Framework with MVP (Place, Activity) and RequestFactory
Hi! I was facing the same issue. I've found out this, but I'm open to any suggestion: I've put Driver in the Activity, because View should be responsible only for display (but using editor.flush() method is responsible for Model changes -- it should go to the Presenter layer (Activity in this perspective)). Because Driver needs a class with the right properties, you can't let View implement the Editor, because it's simply not working (I've tried). I've made a seperate Editor widget (with UiBinder), which is included in the View, and I've made a getEditor(); method in the View interface, so Presenter can get the Editor from the View. My only problem, that I have to make an other Composite for the Editor, but it would be great to include it in the View, but I couldn't. Any advice are welcome, maybe there is a better solution. On Thu, Jan 20, 2011 at 6:41 PM, Patrice De Saint Steban patou.de.saint.ste...@gmail.com wrote: Hello, I want to have the best practice to know how to use the Editor Framework with MVP. Where place all the code. For exemple if I want to do a build an Activity with edit an object, I will create first an Activity EditObjectActivity and a EditObjectView interface with the EditObjectViewImpl that use the UiBinder. The first think is to load the object to edit with RequestFactory. I put this code in the start method in the Activity. After I must create the Driver : public interface Driver extends RequestFactoryEditorDriverObjectProxy, EditObjectViewImpl { } The creation of the Driver driver = GWT.create(Driver.class); driver.initialize(view); Bind the object and the persit request to the driver : objectRequest = clientFactory.getAppRequestFactory().objectRequest (); driver.edit(object, objectRequest ); My Question, is where in the MVP put all these codes ? The Driver must be pameterized with a Proxy P and a class extend EditorP. The Driver is in the Activity ? The activity mustn't know the implementation of the View and the driver must know it to generate the binding. or the view must have all methode for all Editor implementation Or the Driver can be in the View ? Thank for the reply. -- Patrice de Saint Stéban Groupe SFEIR - France -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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 Activities, Places with Event Bus ??????
That's not quite right. You can have more Places, mapping them with different ActivityMappers. On Thu, Jan 20, 2011 at 10:36 PM, ailinykh ailin...@gmail.com wrote: That's right. But he is talking about synchronization between places (pages) . You have only one at the time. Andrey On Jan 20, 8:17 am, Ben Imp benlee...@gmail.com wrote: Events allow you to synchronize two concurrently active presenters. If you never have more than one presenter active in your application at a given time, then this becomes less of an issue. -Ben On Jan 20, 8:01 am, ailinykh ailin...@gmail.com wrote: Why do you need events? Each Activity is notified when it becomes active ( method start() is called). Just check the application state at this moment. If you want to share some data between several activities make this data singleton. Thank you, Andrey On Jan 19, 7:59 am, SergeZ comp1...@gmail.com wrote: Hello everybody! Can someone help me to sort things out ? The question is: is it possible to use EventBus (or just HandlerManager ) with Activities and Places ? How can I notify a set of my places ( for example, 5 widgets ) about an event which happened in a particular place (a widget, not included in those 5 widgets ). For example... I have 6 widgets. Acutaly 6 different pages ( places ). Each of them consist of a button and a text area (for example). Suppose, I write some text in widget1's textarea, and I want that text to be displayed in other 5 text ereas. How can I fire event ( for example UpdateTextAreaEvent() ). Is there in GWR 2.1's architecture such mechanism or all this stuff - activities, places and other are just about history management and more convinient way to switch between pages ? Hope, I have managed to explain my problem quite well. Thanks a lot for your time!!! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.
How to use ListEditorT, E extends EditorT for a list?
Hi! I would like to have a select multiple / html select box, showing the values in the list. How can I accomplish this? It would be great if I remove one option from the select, it would get removed from the editor aswell, as it should work (adding as well). I've googled, but I couldn't find any real world examples for this. Can anybody show a snippet? -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.
Editor + RequestFactory
Hi all! I've just started using the RequestFactory and Editor duo, and it's really great, but I have a little problem/question: I've the following ProgramProxy: @ProxyFor(Program.class) public interface ProgramProxy extends EntityProxy { Long getId(); String getName(); void setName(String name); String getDescription(); void setDescription(String description); DateIntervalProxy getOrderInterval(); EntityProxyIdProgramProxy stableId(); } The orderInterval property is a transient property in my Program entity, so I don't want to change it, but I would like to use it for displaying the stuff. So this is how I get my proxy instance: requestFactory.programRequest().findProgram(place.getProgramId()).with(orderInterval).fire(new ReceiverProgramProxy() { @Override public void onSuccess(ProgramProxy response) { ProgramRequest req = requestFactory.programRequest(); req.persist().using(response); driver.edit(program, req); // user is interacting with the UI, and when a button is clicked (using @UiHandler) the following chunk of code is invoked: driver.flush().fire(new ReceiverVoid() { @Override public void onSuccess(Void response) { } }); } }); It's almost working, but it seems that driver thinks that orderInterval property is modified, because this is in my request payload: {I:[{O:hu.sch.kfc.client.request.ProgramRequest::persist,P:[{S:IjEi,T:hu.sch.kfc.client.model.ProgramProxy}]}],O:[{O:UPDATE,S:IjEi,T:hu.sch.kfc.client.model.ProgramProxy,V:Mw==,P:{name:Yuppi!}},{O: *PERSIST*,R:1,C:1,T:hu.sch.kfc.client.model.DateIntervalProxy,P:{isEnded:true,interval:2011. 01. 15. 23:01-23:40}}]} As you can see my orderInterval property is marked for persist, but it's not modified (I didn't make a property for orderInterval in my EditorProgramProxy implementation, because I don't want to be edited, so it's unlikely that it got modified -- the values in the payload are the same which were retrieved from the server). If I remove .with(orderInterval)it works like a charm, but my ProgramProxy instance is used in a display view aswell, where orderInterval information is needed, but not for the editor view. And if I don't have to I don't want to make an other request to get an other ProgramProxy instance without the orderInterval property. Is there a solution for my problem? I guess it's kinda usual thing having a proxy instance with a lot of properties but wanting to edit only a subselection of them. Thanks for any advice! P.S.: If you need any other information to get this solved I can provide it. -- Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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: Google Plugin for Eclipse 3.6 + Different war directory
Okay, I've just had time to check it again. I've created a new project in Eclipse 3.6 called Dynamic Web Project, and added GWT 2.1.0.M2 (set the WAR directory to src/main/webapp, unchecked Launch Deploy, but provided war directory using -war ...). And it still doesn't copy the war files from src/main/webapp to the WAR directory, which makes 3.6 unusable for me (I have to write to console: mvn war:exploded to copy the files from the right place, but it should work out-of-box from Eclipse aswell, and if I change web.xml, I have to do it again, which breaks the workflow). Could you check it at your side? It should work because it works flawlessly in 3.5, maybe something was changed which breaks it. Other issue: it still bothers me that GPE 3.6 doesn't create the WAR directory for me, but 3.5 did (when I delete and reimport my project, Eclipse build the project, so the directory is created, but GPE should create it aswell) Thanks for your help! 2010/7/1 Bálint Kriván bal...@krivan.hu Hi! Yes, I've downloaded the one with the J2EE support ( http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliosr ). And I made a new workspace for 3.6, so I'm not sure, what's the issue, why it isn't working... The project is the same, I didn't created a new project for 3.6, because I'm using maven, and it was created with mvn eclipse:eclipse. I will check maybe the WTP version is different in 3.6, so I have to create a new project using mvn -Dwtpversion=version eclipse:eclipse On Thu, Jul 1, 2010 at 5:11 PM, Jason Parekh jasonpar...@gmail.comwrote: Hi Bálint, Oh, ok. In that case, the only time that GPE copies files to the WAR directory specified by -war argument is if you're using the Java EE support in Eclipse. Can you make sure your Eclipse 3.6 includes Java EE support? (Was it the Eclipse for Java EE 3.6 that you downloaded?) Also, are you re-using your existing workspace from Eclipse 3.5? If not, I wonder if there are differences between how the project was setup in Eclipse 3.5 and how it is setup in Eclipse 3.6? jason 2010/7/1 Bálint Kriván bal...@krivan.hu Sorry, I've forgot to mention that it isn't checked because in the lauch configuration I'm giving an other war directory like this: -war ${project_loc}/location/to/war. And in 3.5, the files/directories (WEB-INF, META-INF) from the This project has a WAR directory directory were copied to the other war directory ${project_loc}/location/to/war and it was working. Now only the generated js is generated to ${project_loc}/location/to/war but the important files to the webserver isn't. So I have a sry directory where are the sources of the war files (my module html, with css and WEB-INF + META-INF directories), but I would like to compile the whole project to an other directory (because of VCS). I could achieved this in 3.5, but not in 3.6, but I really would like to use the new eclipse+plugin. Thanks! On Wed, Jun 30, 2010 at 11:44 PM, Jason Parekh jasonpar...@gmail.comwrote: Hi Bálint, Is the checkbox Launch and deploy from this directory checked? (It is below the text box you enter the WAR directory in the project properties Google Web application.) Also, is this a new project or your existing project? If you don't mind, could you create a new message thread? Thanks, jason 2010/6/29 Kriván Bálint bal...@krivan.info Hi! I've just downloaded Helios, and installed the GPE, but I'm having an issues, when I'm starting the Dev Mode it says, that the working directory does not exists. It wasn't a problem in 3.5, but okay, I've created it. Then I've noticed it doesn't copy the war files from the specified directory (This project has a WAR directory checked and the location is given), but 3.5 does. So currently I can't use Eclipse Helios and GPE because of this. Do you know something about these issues? Has anybody else experienced this? Thanks for your help, I really looking forward to use the new Eclipse with the new plugin! Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you
Manual RPC using RPC.invokeAndEncodeResponse()
Hiho! I'm using Atmosphere and I would like to do streaming with GWT-RPC, currently I'm having a working example, something like this: My remoteService: public interface EventService extends RemoteService { MyEvent getEvent(); } So on the server side, I'm doing this: Method method = this.getClass().getMethod(getEvent, null); String encoded = RPC.invokeAndEncodeResponse(this, method, null); Now I can broadcast this encoded string as payload and on the client side, using this I can get the broadcasted object: (MyEvent) ssf.createStreamReader(message).readObject(); where message is the payload which was broadcasted and ssf is defined like this: protected static final SerializationStreamFactory ssf = GWT.create(EventService.class); This is great, it works like a charm. Then I've discovered this stuff: com.google.gwt.user.RemoteServiceObfuscateTypeNames. Which would be great for production. So I've tested it, and of course it breaks my working stuff, I've modified like this, but still not working: Method method = this.getClass().getMethod(getEvent, null); Stringencoded = RPC.invokeAndEncodeResponse(this, method, null, getSerializationPolicy( http://127.0.0.1:/kfc/;, DD98F5EAEFEC65CD76A0D7BC1E3C8E8D)); where getSerializationPolicy() looks like this: public SerializationPolicy getSerializationPolicy(String moduleBaseURL, String strongName) { String modulePath = null; if (moduleBaseURL != null) { try { modulePath = new URL(moduleBaseURL).getPath(); } catch (MalformedURLException ex) { System.err.println(Malformed moduleBaseURL: + moduleBaseURL); } } SerializationPolicy serializationPolicy = null; String contextPath = servletRequest.getContextPath(); String contextRelativePath = modulePath.substring(contextPath.length()); String serializationPolicyFilePath = SerializationPolicyLoader .getSerializationPolicyFileName(contextRelativePath + strongName); InputStream is = context.getResourceAsStream(serializationPolicyFilePath); if (is != null) { try { serializationPolicy = SerializationPolicyLoader.loadFromStream(is, null); } catch (ParseException e) { e.printStackTrace(System.err); } catch (IOException e) { e.printStackTrace(System.err); } } return serializationPolicy; } It's merely copied from RemoteServiceServlet IIRC. I have 2 problems: what can I do to not hardcode strongName for gwt.rpc file and the moduleBaseURL? And finally, why isn't it working? It still makes payload as I would do without inheriting com.google.gwt.user.RemoteServiceObfuscateTypeNames module, which is bad, because the client can't deserialize it and throwing SerializationException. If you could help me to solve my problem, I would be grateful, thanks! -- Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@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.
Google Plugin for Eclipse 3.6 + Different war directory
Sorry, I've forgot to mention that it isn't checked because in the lauch configuration I'm giving an other war directory like this: -war ${project_loc}/location/to/war. And in 3.5, the files/directories (WEB-INF, META-INF) from the This project has a WAR directory directory were copied to the other war directory ${project_loc}/location/to/war and it was working. Now only the generated js is generated to ${project_loc}/location/to/war but the important files to the webserver isn't. So I have a sry directory where are the sources of the war files (my module html, with css and WEB-INF + META-INF directories), but I would like to compile the whole project to an other directory (because of VCS). I could achieved this in 3.5, but not in 3.6, but I really would like to use the new eclipse+plugin. Thanks! On Wed, Jun 30, 2010 at 11:44 PM, Jason Parekh jasonpar...@gmail.comwrote: Hi Bálint, Is the checkbox Launch and deploy from this directory checked? (It is below the text box you enter the WAR directory in the project properties Google Web application.) Also, is this a new project or your existing project? If you don't mind, could you create a new message thread? Thanks, jason 2010/6/29 Kriván Bálint bal...@krivan.info Hi! I've just downloaded Helios, and installed the GPE, but I'm having an issues, when I'm starting the Dev Mode it says, that the working directory does not exists. It wasn't a problem in 3.5, but okay, I've created it. Then I've noticed it doesn't copy the war files from the specified directory (This project has a WAR directory checked and the location is given), but 3.5 does. So currently I can't use Eclipse Helios and GPE because of this. Do you know something about these issues? Has anybody else experienced this? Thanks for your help, I really looking forward to use the new Eclipse with the new plugin! Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@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: Google Plugin for Eclipse 3.6 + Different war directory
Hi! Yes, I've downloaded the one with the J2EE support ( http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliosr ). And I made a new workspace for 3.6, so I'm not sure, what's the issue, why it isn't working... The project is the same, I didn't created a new project for 3.6, because I'm using maven, and it was created with mvn eclipse:eclipse. I will check maybe the WTP version is different in 3.6, so I have to create a new project using mvn -Dwtpversion=version eclipse:eclipse On Thu, Jul 1, 2010 at 5:11 PM, Jason Parekh jasonpar...@gmail.com wrote: Hi Bálint, Oh, ok. In that case, the only time that GPE copies files to the WAR directory specified by -war argument is if you're using the Java EE support in Eclipse. Can you make sure your Eclipse 3.6 includes Java EE support? (Was it the Eclipse for Java EE 3.6 that you downloaded?) Also, are you re-using your existing workspace from Eclipse 3.5? If not, I wonder if there are differences between how the project was setup in Eclipse 3.5 and how it is setup in Eclipse 3.6? jason 2010/7/1 Bálint Kriván bal...@krivan.hu Sorry, I've forgot to mention that it isn't checked because in the lauch configuration I'm giving an other war directory like this: -war ${project_loc}/location/to/war. And in 3.5, the files/directories (WEB-INF, META-INF) from the This project has a WAR directory directory were copied to the other war directory ${project_loc}/location/to/war and it was working. Now only the generated js is generated to ${project_loc}/location/to/war but the important files to the webserver isn't. So I have a sry directory where are the sources of the war files (my module html, with css and WEB-INF + META-INF directories), but I would like to compile the whole project to an other directory (because of VCS). I could achieved this in 3.5, but not in 3.6, but I really would like to use the new eclipse+plugin. Thanks! On Wed, Jun 30, 2010 at 11:44 PM, Jason Parekh jasonpar...@gmail.comwrote: Hi Bálint, Is the checkbox Launch and deploy from this directory checked? (It is below the text box you enter the WAR directory in the project properties Google Web application.) Also, is this a new project or your existing project? If you don't mind, could you create a new message thread? Thanks, jason 2010/6/29 Kriván Bálint bal...@krivan.info Hi! I've just downloaded Helios, and installed the GPE, but I'm having an issues, when I'm starting the Dev Mode it says, that the working directory does not exists. It wasn't a problem in 3.5, but okay, I've created it. Then I've noticed it doesn't copy the war files from the specified directory (This project has a WAR directory checked and the location is given), but 3.5 does. So currently I can't use Eclipse Helios and GPE because of this. Do you know something about these issues? Has anybody else experienced this? Thanks for your help, I really looking forward to use the new Eclipse with the new plugin! Regards, Bálint Kriván -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Üdv, Kriván Bálint -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com
GWT + Entity Bean
Hi! I'm having an issue, and I hope someone can help me, because GWT looks very great. So I've started to make a very simple application. I have an EJB package which contains the Session Beans and the Entity Beans. In the WAR project I've set up the GWT: I've created an Entry Point and a Service (RPC call) - In the implemented RemoteServiceServlet I can use the Session Beans, which is connected to Entity Beans. So I can make new objects to the database. It works fine. But I would like to be able to retrieve objects as well, so I've created a retrieve call aswell to this Service, and the returned value should be Listhu.krivan.model.Topic (Topic is my Entity Bean). But when I want to compile my project, it says that: [ERROR] Errors in 'file:/home/balint/NetBeansProjects/GWTForum/GWTForum-war/src/java/hu/krivan/client/service/TopicService.java' [ERROR] Line 20: No source code is available for type hu.krivan.model.Topic; did you forget to inherit a required module? (This is in Line 20: public ListTopic retrieveTopics(); ) TopicService is my interface which implements RemoteService. How can I use my ListTopic in the UI (so I would like to build a FlexTable based on these Topic objects.) Very thanks for your help! Regards, Kriván Bálint --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---