Yes, I did it, it is there in the link. It works very nicely.
Cheers. -- Kido. On 8 January 2011 14:24, Didier Durand <durand.did...@gmail.com> wrote: > Hi, > > I checked it: interesting! > > Can we obtain the source code of it ? > didier > > On Jan 8, 1:43 pm, Cesar Ruiz <crui...@gmail.com> wrote: > > Hey Ddier, thank you for helping. > > > > I found a better way, that having a same object in a separated way, > (Imagine > > the case when I need to do the same for 20 objects). > > > > The answer is here, it works sweetly. > > > > http://blog.js-development.com/2010/02/gwt-app-engine-and-app-engine-... > > > > Thank you very much. > > > > On 8 January 2011 07:16, Didier Durand <durand.did...@gmail.com> wrote: > > > > > Hi, > > > > > You only have to move the source file of your class from src/package/ > > > name/of/your/appl/client (where it is now) to src/package/name/of/your/ > > > appl/server and change all the references of users of this classes to > > > new name : i.e. package.name.of.your.appl.client to > > > package.name.of.your.appl.srv. > > > > > Then your source code is ready to be compiled and you shouldn't get > > > any more complaint from GWT requiring the source code. > > > > > But, you'll still have to write the dto object that I mentionned > > > earlier and that Ikai Lan from Google also recommends in your new > > > question of this forum (http://groups.google.com/group/google- > > > appengine-java/browse_thread/thread/df0426ab46e25905#) > > > > > regards > > > > > didier > > > > > On Jan 7, 4:13 pm, Cesar Ruiz <crui...@gmail.com> wrote: > > > > Indeed, I am using GWT, oh I understand what you're saying. But the > pojo > > > > that will contain the Text attribute is in the client side (in the > same > > > > package that the MainEntryPoint.java). > > > > > > @Entity > > > > @Table(name = "book") > > > > public class Book implements Serializable { > > > > > > @Id > > > > @GeneratedValue(strategy = GenerationType.IDENTITY) > > > > private Long id; > > > > private String name; > > > > private String uriPath; > > > > private Text content; > > > > > > getters and setters... > > > > > > The method on the server side is: > > > > > > public Book setBookContent(String bookName, String content) throws > > > > GeneralException, BookNotFoundException, NullParameterException { > > > > entityManager = EMF.get().createEntityManager(); > > > > Book book = null; > > > > Text contentText = new Text(content); > > > > try { > > > > book = loadBookByName(bookName); > > > > book.setContent(contentText); //here the pojo will have > the > > > > Text attribute, but the pojo is in the client side > > > > saveBook(book); > > > > } catch (BookNotFoundException b) { > > > > } finally { > > > > entityManager.close(); > > > > } > > > > return book; > > > > } > > > > > > Will I have to move the pojo Book in the server side. If yes can you > > > please > > > > give me a hand, because the other day I tried and I couldnt. > > > > > > Thank you for you help. > > > > > > -- > > > > Kido. > > > > > > On 7 January 2011 15:31, Didier Durand <durand.did...@gmail.com> > wrote: > > > > > > > I think that I understand through the words "inheritance & module": > > > > > aren't you using Google Web Toolkit ? (GWT) > > > > > > > If yes, you can't use the Text class in you front-end: you have to > use > > > > > a String in the front-end move it to the server via the GWT RPC and > > > > > then convert it to a Text in an annotated Pojo that you will then > be > > > > > able to store in the datastore > > > > > > > regards > > > > > > > didier > > > > > > > On Jan 7, 3:08 pm, Cesar Ruiz <crui...@gmail.com> wrote: > > > > > > I realized the jar is included aproperly in the classpath, As it > does > > > it > > > > > > automatically when choosing GAE as a server. > > > > > > > > I also manually added the jar in the classpath, but nothing > happens > > > > > > > > It still is throwing the error. > > > > > > > > The import com.google.appengine cannot be resolved > > > > > > [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 > > > > > > > > -- > > > > > > kido. > > > > > > > > On 7 January 2011 15:04, Didier Durand <durand.did...@gmail.com> > > > wrote: > > > > > > > > > No, you don't need the source code: I use Text very often based > on > > > the > > > > > > > compiled version that is in the jar > appengine-api-1.0-sdk-1.3.8.jar > > > > > > > (for v 1.3.8 under Eclipse) > > > > > > > > > Just obtain from somebody else how to put this jar in you > classpath > > > > > > > and everything will be ok > > > > > > > > > btw, did you install the App Engine SDK in your Netbeans? When > > > > > > > properly done, it should take care of your classpath issue as > it > > > does > > > > > > > under Eclipse (classpath is set up properly for all needed jars > by > > > the > > > > > > > SDK there) > > > > > > > > > regards > > > > > > > > > didier > > > > > > > > > On Jan 7, 2:54 pm, Cesar Ruiz <crui...@gmail.com> wrote: > > > > > > > > :( . When I see the com.google.appengine.api.datastore and > look > > > for > > > > > the > > > > > > > > class Text, I try to open it but I it says: "no source code". > I > > > think > > > > > I > > > > > > > need > > > > > > > > the sourse code, rather than the .class. > > > > > > > > > > I'm stuck :(. > > > > > > > > > > On 7 January 2011 14:51, Didier Durand < > durand.did...@gmail.com> > > > > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > Sorry: I work only on Eclipse. But, I guess other people of > > > this > > > > > forum > > > > > > > > > knowing Netbeans will take over. > > > > > > > > > > > Good luck! > > > > > > > > > > > didier > > > > > > > > > > > On Jan 7, 2:35 pm, Cesar Ruiz <crui...@gmail.com> wrote: > > > > > > > > > > I Compile with NetBeans. How can I set my clathpath > manually, > > > or > > > > > if > > > > > > > you > > > > > > > > > know > > > > > > > > > > in NetBeans even better. > > > > > > > > > > > > regards. > > > > > > > > > > > > César Ruiz. > > > > > > > > > > > > On 7 January 2011 09:53, Didier Durand < > > > durand.did...@gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > If your classname is correct, then the problem most > > > probably > > > > > com > > > > > > > from > > > > > > > > > > > your classpath when compiling / editing > > > > > > > > > > > > > Where do you compile ? In Eclipse ? If yes, you should > > > publish > > > > > > > > > > > your .classpath file (root directory of your project) > > > > > > > > > > > > > regards > > > > > > > > > > > didier > > > > > > > > > > > > > On Jan 7, 9:41 am, Cesar Ruiz <crui...@gmail.com> > wrote: > > > > > > > > > > > > Sorry, I am using the same type (I wrote it wronly > > > before). > > > > > Im > > > > > > > using > > > > > > > > > > > > "com.google.appengine.api.datastore.Text". But it is > > > always > > > > > > > showing > > > > > > > > > me > > > > > > > > > > > the > > > > > > > > > > > > same error when compiling. > > > > > > > > > > > > > > It is somehow not finding the source code. I only > provide > > > it > > > > > the > > > > > > > > > > > Text.class > > > > > > > > > > > > not the .java. I do not know if this has anything to > do. > > > > > > > > > > > > > > Another suggestion?. > > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > > > On 7 January 2011 09:15, Didier Durand < > > > > > durand.did...@gmail.com> > > > > > > > > > wrote: > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > Check > > > > > > > > http://code.google.com/appengine/docs/java/datastore/entities.html#Pr. > > > > > > > > > > > .. > > > > > > > > > > > > > > > The type you want to use is probably : > > > > > > > > > > > > > com.google.appengine.api.datastore.Text (i.e with > > > > > > > api.datatstore, > > > > > > > > > in > > > > > > > > > > > > > the name) and not com.google.appengine.Text as you > say > > > > > > > > > > > > > > > regards > > > > > > > > > > > > > > > didier > > > > > > > > > > > > > > > On Jan 7, 8:52 am, kidowell <crui...@gmail.com> > wrote: > > > > > > > > > > > > > > Hey I'm stuck at something, I just wanted to use > the > > > > > > > > > > > > > > com.google.appengine.Text, so I can store an any > > > sized > > > > > String > > > > > > > > > into > > > > > > > > > > > the > > > > > > > > > > > > > > Datastore. > > > > > > > > > > > > > > > > But when compiling I receive this error: The > import > > > > > > > > > > > com.google.appengine > > > > > > > > > > > > > > cannot be resolved. > > > > > > > > > > > > > > > > I read in another forum a workaround when using > > > > > > > > > > > com.google.appengine.Key. > > > > > > > > > > > > > > But they provided the code for the class Key, > > > something I > > > > > do > > > > > > > not > > > > > > > > > have > > > > > > > > > > > for > > > > > > > > > > > > > > Text. > > > > > > > > > > > > > > > > I need some help. Thank you in advanced. > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > Kido. > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > You received this message because you are > subscribed to > > > the > > > > > > > Google > > > > > > > > > > > Groups > > > > > > > > > > > > > "Google App Engine for Java" group. > > > > > > > > > > > > > To post to this group, send email to > > > > > > > > > > > > > google-appengine-j...@googlegroups.com. > > > > > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > > > > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > <google-appengine-java%2bunsubscr...@googlegroups.com<google-appengine-java%252bunsubscr...@googlegroups.com> > > > > > <google-appengine-java%2bunsubscr...@googlegroups.com<google-appengine-java%252bunsubscr...@googlegroups.com> > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > > > > > > > > > <google-appengine-java%2bunsubscr...@googlegroups.com<google-appengine-java%252bunsubscr...@googlegroups.com> > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > > > > > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > > > > > > > > > > > <google-appengine-java%2bunsubscr...@googlegroups.com<google-appengine-java%252bunsubscr...@googlegroups.com> > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > > > > > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > > > > > > > > > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > > > > > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > <google-appengine-java%2525252bunsubscr...@googlegroups.com<google-appengine-java%252525252bunsubscr...@googlegroups.com> > > > > > > > > > > > > > <google-appengine-java%2bunsubscr...@googlegroups.com<google-appengine-java%252bunsubscr...@googlegroups.com> > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > > > > > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > > > > > > > > > <google-appengine-java%252bunsubscr...@googlegroups.com<google-appengine-java%25252bunsubscr...@googlegroups.com> > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > > > > > <google-appengine-java%25252bunsubscr...@googlegroups.com<google-appengine-java%2525252bunsubscr...@googlegroups.com> > <google-appengine-java%2525252bunsubscr...@googlegroups.com<google-appengine-java%252525252bunsubscr...@googlegroups.com> > > > > > > ... > > > > read more » > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- Cesar Ruiz. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.