Re: How to send data back to client side code?
Looks like it has got good material .. Should go through it... btw., i implemented the DTO's and that worked fine for me On Mon, Aug 23, 2010 at 9:52 AM, Tan Duy tanduy2...@gmail.com wrote: Hi, Did you view example at http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html ? Please refer http://blog.hivedevelopment.co.uk/2009/08/google-web-toolkit-gwt-mvp-example.html This is a excellent tutorial. I also think it's so difficult to me, but I will try to learn more :) On Aug 20, 1:56 am, Sree ... gattasrika...@gmail.com wrote: also.. please post back here if you succeed! Am also trying to implement the DTO but not sure how far i can do that :) -- 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. -- -Thanks -Srikanth.G -Google India Ltd -Hyderabad -- 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: How to send data back to client side code?
Hi, Did you view example at http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html ? Please refer http://blog.hivedevelopment.co.uk/2009/08/google-web-toolkit-gwt-mvp-example.html This is a excellent tutorial. I also think it's so difficult to me, but I will try to learn more :) On Aug 20, 1:56 am, Sree ... gattasrika...@gmail.com wrote: also.. please post back here if you succeed! Am also trying to implement the DTO but not sure how far i can do that :) -- 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: How to send data back to client side code?
GTW-RPC can only serialize objects that are emulated or new ones you create that implement Serializable. There are some solutions to get other stuff to serialize, but that's probably not what you want. If you make a Data Transfer Object (DTO) that only contains serializable fields, you'll be able to send it over the wire no problem. -- Arthur Kalmenson On Wed, Aug 18, 2010 at 10:27 AM, Tan Duy tanduy2...@gmail.com wrote: Okay, we try to solve it. I haven't understand GWT RPC yet. I want to use MVP model. But I'm familiar with C# than Java. Hope everything will be better. I'm trying to try because this is my last chance. Thank you. On Aug 18, 9:04 pm, Sree ... gattasrika...@gmail.com wrote: I actually thought of the same.. DTO. But I have no idea how to implement that.. so going through the DTO documentations over net -- 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. -- 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: How to send data back to client side code?
Thanks for your help, I'm trying to read and test some demo. So, I realize something about GWT-RPC. Yeah, I will try to make a Data Transfer Object. On Aug 19, 11:12 pm, Arthur Kalmenson arthur.k...@gmail.com wrote: GTW-RPC can only serialize objects that are emulated or new ones you create that implement Serializable. There are some solutions to get other stuff to serialize, but that's probably not what you want. If you make a Data Transfer Object (DTO) that only contains serializable fields, you'll be able to send it over the wire no problem. -- Arthur Kalmenson -- 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: How to send data back to client side code?
also.. please post back here if you succeed! Am also trying to implement the DTO but not sure how far i can do that :) On Fri, Aug 20, 2010 at 12:22 AM, Tan Duy tanduy2...@gmail.com wrote: Thanks for your help, I'm trying to read and test some demo. So, I realize something about GWT-RPC. Yeah, I will try to make a Data Transfer Object. On Aug 19, 11:12 pm, Arthur Kalmenson arthur.k...@gmail.com wrote: GTW-RPC can only serialize objects that are emulated or new ones you create that implement Serializable. There are some solutions to get other stuff to serialize, but that's probably not what you want. If you make a Data Transfer Object (DTO) that only contains serializable fields, you'll be able to send it over the wire no problem. -- Arthur Kalmenson -- 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. -- -Thanks -Srikanth.G -Google India Ltd -Hyderabad -- 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: How to send data back to client side code?
I also have some problems when I use JDO in GAE + GWT [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/util/ Employee.java' [ERROR] Line 2: The import com.google.appengine cannot be resolved [ERROR] Line 14: Key cannot be resolved to a type [ERROR] Line 33: Key cannot be resolved to a type [ERROR] Line 34: Key cannot be resolved to a type [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/util/PMF.java' [ERROR] Line 7: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget to inherit a required module? [ERROR] Line 8: No source code is available for type javax.jdo.JDOHelper; did you forget to inherit a required module? [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/client/Jdo.java' [ERROR] Line 23: No source code is available for type javax.jdo.PersistenceManager; did you forget to inherit a required module? I don't know what I need to declare in xxx.gwt.xml. What should I check? Thanks for your helps On Aug 18, 4:29 am, lineman78 linema...@gmail.com wrote: Yeah, I ran into this issue a year ago when I was working with GAE + GWT-RPC. The client side objectcannothave references to any code not associated with a GWT module, so there are a few options for you here. 1) create a translator and maintain 2 versions of the class; 1 for the client(without annotations) and 1 for the server(with annotations) 2) use Java serialization to make a deep copy with 2 versions of the class like specified above (serializeable uuids must be equal). 3) write a utility that uses reflection to translate between the objects above 4) use some sort of 3rd party library that allows for persistence and serialization. There are more options that I haven't listed here, but these are a few to start. On Aug 17, 12:55 pm, Jeff Schnitzer j...@infohazard.org wrote: This is a major PITA with GAE+JPA. You'll likely also need to detach your entities from the JPA session, which AFAIK is impossible with the JPA interface - only with the JDO interface. My advice is throw out JPA and use Objectify. You can use your entities in GWT as-is (assuming they are client-safe), even if they reference Key or GeoPt or other datastore classes. Objectify provides GWT emulation for all those classes: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT (I'm the lead developer of Objectify, and I use it with GWT in my applications every day) http://code.google.com/p/objectify-appengine/ Jeff On Sat, Aug 14, 2010 at 2:26 AM, cokol eplisc...@googlemail.com wrote: again - you shall not have any references inside your translatable classes to classes from 3rd party! translatable classes are those to be compiled to javascript and which reside in client and shared packages. 3rd party classes are those where you dont have sourcecode from. consider your Employee just to be a bean or container without any logic just with a purpose to carry payload data. so design the class NOT to use any classes from appengine like Key, BlobKey etc On 14 Aug., 07:05, Sree ... gattasrika...@gmail.com wrote: Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: Theimportcom.google.appenginecannotberesolved [ERROR] Line 11: Theimportcom.google.appenginecannotberesolved [ERROR] Line 19: Keycannotberesolvedto a type [ERROR] Line 101: BlobKeycannotberesolvedto a type [ERROR] Line 141: Keycannotberesolvedto a type [ERROR] Line 189: Keycannotberesolvedto a type [ERROR] Line 190: Keycannotberesolvedto a type [ERROR] Line 305: Keycannotberesolvedto a type [ERROR] Line 306: Keycannotberesolvedto a type [ERROR] Line 424: BlobKeycannotberesolvedto a type [ERROR] Line 425: BlobKeycannotberesolvedto a type [ERROR] Line 431: BlobKeycannotberesolvedto a type [ERROR] Line 432: BlobKeycannotberesolvedto a type Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Why appengineimportstatements are not working! Again they should be only in server folder? On Sat, Aug 14, 2010 at 6:17 AM, Sree ... gattasrika...@gmail.com wrote: okey... thanks alot guys
Re: How to send data back to client side code?
You'll have to build a DTO to transfer these objects to the client side, I don't think GWT understands GAE Key objects. See this: http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html -- Arthur Kalmenson On Wed, Aug 18, 2010 at 8:03 AM, Tan Duy tanduy2...@gmail.com wrote: I also have some problems when I use JDO in GAE + GWT [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/util/ Employee.java' [ERROR] Line 2: The import com.google.appengine cannot be resolved [ERROR] Line 14: Key cannot be resolved to a type [ERROR] Line 33: Key cannot be resolved to a type [ERROR] Line 34: Key cannot be resolved to a type [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/util/PMF.java' [ERROR] Line 7: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget to inherit a required module? [ERROR] Line 8: No source code is available for type javax.jdo.JDOHelper; did you forget to inherit a required module? [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/client/Jdo.java' [ERROR] Line 23: No source code is available for type javax.jdo.PersistenceManager; did you forget to inherit a required module? I don't know what I need to declare in xxx.gwt.xml. What should I check? Thanks for your helps On Aug 18, 4:29 am, lineman78 linema...@gmail.com wrote: Yeah, I ran into this issue a year ago when I was working with GAE + GWT-RPC. The client side objectcannothave references to any code not associated with a GWT module, so there are a few options for you here. 1) create a translator and maintain 2 versions of the class; 1 for the client(without annotations) and 1 for the server(with annotations) 2) use Java serialization to make a deep copy with 2 versions of the class like specified above (serializeable uuids must be equal). 3) write a utility that uses reflection to translate between the objects above 4) use some sort of 3rd party library that allows for persistence and serialization. There are more options that I haven't listed here, but these are a few to start. On Aug 17, 12:55 pm, Jeff Schnitzer j...@infohazard.org wrote: This is a major PITA with GAE+JPA. You'll likely also need to detach your entities from the JPA session, which AFAIK is impossible with the JPA interface - only with the JDO interface. My advice is throw out JPA and use Objectify. You can use your entities in GWT as-is (assuming they are client-safe), even if they reference Key or GeoPt or other datastore classes. Objectify provides GWT emulation for all those classes: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT (I'm the lead developer of Objectify, and I use it with GWT in my applications every day) http://code.google.com/p/objectify-appengine/ Jeff On Sat, Aug 14, 2010 at 2:26 AM, cokol eplisc...@googlemail.com wrote: again - you shall not have any references inside your translatable classes to classes from 3rd party! translatable classes are those to be compiled to javascript and which reside in client and shared packages. 3rd party classes are those where you dont have sourcecode from. consider your Employee just to be a bean or container without any logic just with a purpose to carry payload data. so design the class NOT to use any classes from appengine like Key, BlobKey etc On 14 Aug., 07:05, Sree ... gattasrika...@gmail.com wrote: Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: Theimportcom.google.appenginecannotberesolved [ERROR] Line 11: Theimportcom.google.appenginecannotberesolved [ERROR] Line 19: Keycannotberesolvedto a type [ERROR] Line 101: BlobKeycannotberesolvedto a type [ERROR] Line 141: Keycannotberesolvedto a type [ERROR] Line 189: Keycannotberesolvedto a type [ERROR] Line 190: Keycannotberesolvedto a type [ERROR] Line 305: Keycannotberesolvedto a type [ERROR] Line 306: Keycannotberesolvedto a type [ERROR] Line 424: BlobKeycannotberesolvedto a type [ERROR] Line 425: BlobKeycannotberesolvedto a type [ERROR] Line 431: BlobKeycannotberesolvedto a type [ERROR] Line 432: BlobKeycannotberesolvedto a type Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding
Re: How to send data back to client side code?
Thank you, I'm a new comer. I'll try to learn more. All information in this group is so useful. I'm just don't know how to start. This is my app: http://diaryoftour.appspot.com/ http://code.google.com/p/diaryoftour/ Hope everybody can help me Thanks so much On Aug 18, 7:50 pm, Arthur Kalmenson arthur.k...@gmail.com wrote: You'll have to build a DTO to transfer these objects to the client side, I don't think GWT understands GAE Key objects. See this:http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html -- Arthur Kalmenson -- 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: How to send data back to client side code?
I actually thought of the same.. DTO. But I have no idea how to implement that.. so going through the DTO documentations over net On Wed, Aug 18, 2010 at 6:20 PM, Arthur Kalmenson arthur.k...@gmail.comwrote: You'll have to build a DTO to transfer these objects to the client side, I don't think GWT understands GAE Key objects. See this: http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html -- Arthur Kalmenson On Wed, Aug 18, 2010 at 8:03 AM, Tan Duy tanduy2...@gmail.com wrote: I also have some problems when I use JDO in GAE + GWT [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/util/ Employee.java' [ERROR] Line 2: The import com.google.appengine cannot be resolved [ERROR] Line 14: Key cannot be resolved to a type [ERROR] Line 33: Key cannot be resolved to a type [ERROR] Line 34: Key cannot be resolved to a type [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/util/PMF.java' [ERROR] Line 7: No source code is available for type javax.jdo.PersistenceManagerFactory; did you forget to inherit a required module? [ERROR] Line 8: No source code is available for type javax.jdo.JDOHelper; did you forget to inherit a required module? [ERROR] Errors in 'file:/I:/Workspace/jdo/src/com/jdo/client/Jdo.java' [ERROR] Line 23: No source code is available for type javax.jdo.PersistenceManager; did you forget to inherit a required module? I don't know what I need to declare in xxx.gwt.xml. What should I check? Thanks for your helps On Aug 18, 4:29 am, lineman78 linema...@gmail.com wrote: Yeah, I ran into this issue a year ago when I was working with GAE + GWT-RPC. The client side objectcannothave references to any code not associated with a GWT module, so there are a few options for you here. 1) create a translator and maintain 2 versions of the class; 1 for the client(without annotations) and 1 for the server(with annotations) 2) use Java serialization to make a deep copy with 2 versions of the class like specified above (serializeable uuids must be equal). 3) write a utility that uses reflection to translate between the objects above 4) use some sort of 3rd party library that allows for persistence and serialization. There are more options that I haven't listed here, but these are a few to start. On Aug 17, 12:55 pm, Jeff Schnitzer j...@infohazard.org wrote: This is a major PITA with GAE+JPA. You'll likely also need to detach your entities from the JPA session, which AFAIK is impossible with the JPA interface - only with the JDO interface. My advice is throw out JPA and use Objectify. You can use your entities in GWT as-is (assuming they are client-safe), even if they reference Key or GeoPt or other datastore classes. Objectify provides GWT emulation for all those classes: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT (I'm the lead developer of Objectify, and I use it with GWT in my applications every day) http://code.google.com/p/objectify-appengine/ Jeff On Sat, Aug 14, 2010 at 2:26 AM, cokol eplisc...@googlemail.com wrote: again - you shall not have any references inside your translatable classes to classes from 3rd party! translatable classes are those to be compiled to javascript and which reside in client and shared packages. 3rd party classes are those where you dont have sourcecode from. consider your Employee just to be a bean or container without any logic just with a purpose to carry payload data. so design the class NOT to use any classes from appengine like Key, BlobKey etc On 14 Aug., 07:05, Sree ... gattasrika...@gmail.com wrote: Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: Theimportcom.google.appenginecannotberesolved [ERROR] Line 11: Theimportcom.google.appenginecannotberesolved [ERROR] Line 19: Keycannotberesolvedto a type [ERROR] Line 101: BlobKeycannotberesolvedto a type [ERROR] Line 141: Keycannotberesolvedto a type [ERROR] Line 189: Keycannotberesolvedto a type [ERROR] Line 190: Keycannotberesolvedto a type [ERROR] Line 305: Keycannotberesolvedto a type [ERROR] Line 306: Keycannotberesolvedto a type [ERROR] Line 424: BlobKeycannotberesolvedto a type [ERROR] Line 425: BlobKeycannotberesolvedto a type [ERROR] Line 431: BlobKeycannotberesolvedto a type [ERROR] Line 432: BlobKeycannotberesolvedto a type Finding
Re: How to send data back to client side code?
Okay, we try to solve it. I haven't understand GWT RPC yet. I want to use MVP model. But I'm familiar with C# than Java. Hope everything will be better. I'm trying to try because this is my last chance. Thank you. On Aug 18, 9:04 pm, Sree ... gattasrika...@gmail.com wrote: I actually thought of the same.. DTO. But I have no idea how to implement that.. so going through the DTO documentations over net -- 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: How to send data back to client side code?
This is a major PITA with GAE+JPA. You'll likely also need to detach your entities from the JPA session, which AFAIK is impossible with the JPA interface - only with the JDO interface. My advice is throw out JPA and use Objectify. You can use your entities in GWT as-is (assuming they are client-safe), even if they reference Key or GeoPt or other datastore classes. Objectify provides GWT emulation for all those classes: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT (I'm the lead developer of Objectify, and I use it with GWT in my applications every day) http://code.google.com/p/objectify-appengine/ Jeff On Sat, Aug 14, 2010 at 2:26 AM, cokol eplisc...@googlemail.com wrote: again - you shall not have any references inside your translatable classes to classes from 3rd party! translatable classes are those to be compiled to javascript and which reside in client and shared packages. 3rd party classes are those where you dont have sourcecode from. consider your Employee just to be a bean or container without any logic just with a purpose to carry payload data. so design the class NOT to use any classes from appengine like Key, BlobKey etc On 14 Aug., 07:05, Sree ... gattasrika...@gmail.com wrote: Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: The import com.google.appengine cannot be resolved [ERROR] Line 11: The import com.google.appengine cannot be resolved [ERROR] Line 19: Key cannot be resolved to a type [ERROR] Line 101: BlobKey cannot be resolved to a type [ERROR] Line 141: Key cannot be resolved to a type [ERROR] Line 189: Key cannot be resolved to a type [ERROR] Line 190: Key cannot be resolved to a type [ERROR] Line 305: Key cannot be resolved to a type [ERROR] Line 306: Key cannot be resolved to a type [ERROR] Line 424: BlobKey cannot be resolved to a type [ERROR] Line 425: BlobKey cannot be resolved to a type [ERROR] Line 431: BlobKey cannot be resolved to a type [ERROR] Line 432: BlobKey cannot be resolved to a type Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Why appengine import statements are not working! Again they should be only in server folder? On Sat, Aug 14, 2010 at 6:17 AM, Sree ... gattasrika...@gmail.com wrote: okey... thanks alot guys i ll try to make those changes and will update here also thx for so quick responses.. am loving it On Sat, Aug 14, 2010 at 2:31 AM, cokol eplisc...@googlemail.com wrote: hi the problem is that gwt does not have source of your Employee class, since you have put it into the server package, you always have 3 packages to handle (as per default): client server shared everything under client becomes javascript after compilation and is not aware of anything contained in server package, everything contained in server package is intended to run in java VM and remains java, here you may have references to classes used in client package if you like, this would not break up gwt. the shared package contains everything what is required for client and server package, like the service interfaces AND transfer objects payload classes like your Employee. furthermore everything whats inside client and shared package has to be translatable to javascript, i.e. you shall not use 3rd party libraries in there. so just move the Employee and all related (payload) classes to the shared (or client) package and you are done On 13 Aug., 19:39, Sree ... gattasrika...@gmail.com wrote: Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java'
Re: How to send data back to client side code?
Yeah, I ran into this issue a year ago when I was working with GAE + GWT-RPC. The client side object cannot have references to any code not associated with a GWT module, so there are a few options for you here. 1) create a translator and maintain 2 versions of the class; 1 for the client(without annotations) and 1 for the server(with annotations) 2) use Java serialization to make a deep copy with 2 versions of the class like specified above (serializeable uuids must be equal). 3) write a utility that uses reflection to translate between the objects above 4) use some sort of 3rd party library that allows for persistence and serialization. There are more options that I haven't listed here, but these are a few to start. On Aug 17, 12:55 pm, Jeff Schnitzer j...@infohazard.org wrote: This is a major PITA with GAE+JPA. You'll likely also need to detach your entities from the JPA session, which AFAIK is impossible with the JPA interface - only with the JDO interface. My advice is throw out JPA and use Objectify. You can use your entities in GWT as-is (assuming they are client-safe), even if they reference Key or GeoPt or other datastore classes. Objectify provides GWT emulation for all those classes: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT (I'm the lead developer of Objectify, and I use it with GWT in my applications every day) http://code.google.com/p/objectify-appengine/ Jeff On Sat, Aug 14, 2010 at 2:26 AM, cokol eplisc...@googlemail.com wrote: again - you shall not have any references inside your translatable classes to classes from 3rd party! translatable classes are those to be compiled to javascript and which reside in client and shared packages. 3rd party classes are those where you dont have sourcecode from. consider your Employee just to be a bean or container without any logic just with a purpose to carry payload data. so design the class NOT to use any classes from appengine like Key, BlobKey etc On 14 Aug., 07:05, Sree ... gattasrika...@gmail.com wrote: Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: The import com.google.appengine cannot be resolved [ERROR] Line 11: The import com.google.appengine cannot be resolved [ERROR] Line 19: Key cannot be resolved to a type [ERROR] Line 101: BlobKey cannot be resolved to a type [ERROR] Line 141: Key cannot be resolved to a type [ERROR] Line 189: Key cannot be resolved to a type [ERROR] Line 190: Key cannot be resolved to a type [ERROR] Line 305: Key cannot be resolved to a type [ERROR] Line 306: Key cannot be resolved to a type [ERROR] Line 424: BlobKey cannot be resolved to a type [ERROR] Line 425: BlobKey cannot be resolved to a type [ERROR] Line 431: BlobKey cannot be resolved to a type [ERROR] Line 432: BlobKey cannot be resolved to a type Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Why appengine import statements are not working! Again they should be only in server folder? On Sat, Aug 14, 2010 at 6:17 AM, Sree ... gattasrika...@gmail.com wrote: okey... thanks alot guys i ll try to make those changes and will update here also thx for so quick responses.. am loving it On Sat, Aug 14, 2010 at 2:31 AM, cokol eplisc...@googlemail.com wrote: hi the problem is that gwt does not have source of your Employee class, since you have put it into the server package, you always have 3 packages to handle (as per default): client server shared everything under client becomes javascript after compilation and is not aware of anything contained in server package, everything contained in server package is intended to run in java VM and remains java, here you may have references to classes used in client package if you like, this would not break up gwt. the shared package contains everything what is required for client and server package, like the service interfaces AND transfer objects payload classes like your Employee. furthermore everything whats inside client and shared package has to be translatable to javascript, i.e. you shall not use 3rd party libraries in there. so just move the
Re: How to send data back to client side code?
again - you shall not have any references inside your translatable classes to classes from 3rd party! translatable classes are those to be compiled to javascript and which reside in client and shared packages. 3rd party classes are those where you dont have sourcecode from. consider your Employee just to be a bean or container without any logic just with a purpose to carry payload data. so design the class NOT to use any classes from appengine like Key, BlobKey etc On 14 Aug., 07:05, Sree ... gattasrika...@gmail.com wrote: Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: The import com.google.appengine cannot be resolved [ERROR] Line 11: The import com.google.appengine cannot be resolved [ERROR] Line 19: Key cannot be resolved to a type [ERROR] Line 101: BlobKey cannot be resolved to a type [ERROR] Line 141: Key cannot be resolved to a type [ERROR] Line 189: Key cannot be resolved to a type [ERROR] Line 190: Key cannot be resolved to a type [ERROR] Line 305: Key cannot be resolved to a type [ERROR] Line 306: Key cannot be resolved to a type [ERROR] Line 424: BlobKey cannot be resolved to a type [ERROR] Line 425: BlobKey cannot be resolved to a type [ERROR] Line 431: BlobKey cannot be resolved to a type [ERROR] Line 432: BlobKey cannot be resolved to a type Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Why appengine import statements are not working! Again they should be only in server folder? On Sat, Aug 14, 2010 at 6:17 AM, Sree ... gattasrika...@gmail.com wrote: okey... thanks alot guys i ll try to make those changes and will update here also thx for so quick responses.. am loving it On Sat, Aug 14, 2010 at 2:31 AM, cokol eplisc...@googlemail.com wrote: hi the problem is that gwt does not have source of your Employee class, since you have put it into the server package, you always have 3 packages to handle (as per default): client server shared everything under client becomes javascript after compilation and is not aware of anything contained in server package, everything contained in server package is intended to run in java VM and remains java, here you may have references to classes used in client package if you like, this would not break up gwt. the shared package contains everything what is required for client and server package, like the service interfaces AND transfer objects payload classes like your Employee. furthermore everything whats inside client and shared package has to be translatable to javascript, i.e. you shall not use 3rd party libraries in there. so just move the Employee and all related (payload) classes to the shared (or client) package and you are done On 13 Aug., 19:39, Sree ... gattasrika...@gmail.com wrote: Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java' [ERROR] Line 18: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java' [ERROR] Line 325: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java' [ERROR] Line 19: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this
How to send data back to client side code?
Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java' [ERROR] Line 18: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java' [ERROR] Line 325: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java' [ERROR] Line 19: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- -Thanks -Srikanth.G -Hyderabad -- 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: How to send data back to client side code?
Any object referenced in client-side code must be in a client package. The new version of the GWT plugin for eclipse added a shared package suffix, but it is added to the gwt.xml as a client side package. On Aug 13, 11:39 am, Sree ... gattasrika...@gmail.com wrote: Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java' [ERROR] Line 18: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java' [ERROR] Line 325: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java' [ERROR] Line 19: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- -Thanks -Srikanth.G -Hyderabad -- 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: How to send data back to client side code?
hi the problem is that gwt does not have source of your Employee class, since you have put it into the server package, you always have 3 packages to handle (as per default): client server shared everything under client becomes javascript after compilation and is not aware of anything contained in server package, everything contained in server package is intended to run in java VM and remains java, here you may have references to classes used in client package if you like, this would not break up gwt. the shared package contains everything what is required for client and server package, like the service interfaces AND transfer objects payload classes like your Employee. furthermore everything whats inside client and shared package has to be translatable to javascript, i.e. you shall not use 3rd party libraries in there. so just move the Employee and all related (payload) classes to the shared (or client) package and you are done On 13 Aug., 19:39, Sree ... gattasrika...@gmail.com wrote: Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java' [ERROR] Line 18: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java' [ERROR] Line 325: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java' [ERROR] Line 19: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- -Thanks -Srikanth.G -Hyderabad -- 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: How to send data back to client side code?
okey... thanks alot guys i ll try to make those changes and will update here also thx for so quick responses.. am loving it On Sat, Aug 14, 2010 at 2:31 AM, cokol eplisc...@googlemail.com wrote: hi the problem is that gwt does not have source of your Employee class, since you have put it into the server package, you always have 3 packages to handle (as per default): client server shared everything under client becomes javascript after compilation and is not aware of anything contained in server package, everything contained in server package is intended to run in java VM and remains java, here you may have references to classes used in client package if you like, this would not break up gwt. the shared package contains everything what is required for client and server package, like the service interfaces AND transfer objects payload classes like your Employee. furthermore everything whats inside client and shared package has to be translatable to javascript, i.e. you shall not use 3rd party libraries in there. so just move the Employee and all related (payload) classes to the shared (or client) package and you are done On 13 Aug., 19:39, Sree ... gattasrika...@gmail.com wrote: Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java' [ERROR] Line 18: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java' [ERROR] Line 325: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java' [ERROR] Line 19: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- -Thanks -Srikanth.G -Hyderabad -- 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. -- -Thanks -Srikanth.G -Google India Ltd -Hyderabad -- 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: How to send data back to client side code?
Modified the Employee.java as below *public class Employee implements IsSerializable{* then moved the Employee.java to shared package. [eclipse updated all references well] Now when I GWT to compile its saying Compiling module project.xxx Validating newly compiled units [ERROR] Errors in 'file:/C:/xxx/src/xxx/shared/Employee.java' [ERROR] Line 10: The import com.google.appengine cannot be resolved [ERROR] Line 11: The import com.google.appengine cannot be resolved [ERROR] Line 19: Key cannot be resolved to a type [ERROR] Line 101: BlobKey cannot be resolved to a type [ERROR] Line 141: Key cannot be resolved to a type [ERROR] Line 189: Key cannot be resolved to a type [ERROR] Line 190: Key cannot be resolved to a type [ERROR] Line 305: Key cannot be resolved to a type [ERROR] Line 306: Key cannot be resolved to a type [ERROR] Line 424: BlobKey cannot be resolved to a type [ERROR] Line 425: BlobKey cannot be resolved to a type [ERROR] Line 431: BlobKey cannot be resolved to a type [ERROR] Line 432: BlobKey cannot be resolved to a type Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook Why appengine import statements are not working! Again they should be only in server folder? On Sat, Aug 14, 2010 at 6:17 AM, Sree ... gattasrika...@gmail.com wrote: okey... thanks alot guys i ll try to make those changes and will update here also thx for so quick responses.. am loving it On Sat, Aug 14, 2010 at 2:31 AM, cokol eplisc...@googlemail.com wrote: hi the problem is that gwt does not have source of your Employee class, since you have put it into the server package, you always have 3 packages to handle (as per default): client server shared everything under client becomes javascript after compilation and is not aware of anything contained in server package, everything contained in server package is intended to run in java VM and remains java, here you may have references to classes used in client package if you like, this would not break up gwt. the shared package contains everything what is required for client and server package, like the service interfaces AND transfer objects payload classes like your Employee. furthermore everything whats inside client and shared package has to be translatable to javascript, i.e. you shall not use 3rd party libraries in there. so just move the Employee and all related (payload) classes to the shared (or client) package and you are done On 13 Aug., 19:39, Sree ... gattasrika...@gmail.com wrote: Am not sure this belongs to GWT or GAE or both ... So here's my problem... I have one client/Example.java [contains all GWT code] calls a methods on server/SomeServiceImpl.java [Contains code to talk to dataStore] Wat server/SomeServiceImpl.java does is Featch data from Employee.Java [this is class used to store data in datastore JPA] So now my problem is.. as long as I send data in the form of String or StringArray to client/Example.java am fine, but now I tried to send ListEmployee to client/Example.java Doing so throws me an error as below.. Validating newly compiled units [ERROR] Errors in 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java' [ERROR] Line 18: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java' [ERROR] Line 325: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java' [ERROR] Line 19: No source code is available for type xxx.server.Employee; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'xxx.client.Example' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- -Thanks -Srikanth.G -Hyderabad -- 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