Thanks Maly for your reply, I got it going. I'm using GWT and after reading the doco properly and adding a <source path='server/jdo'/> to my gwt.xml file and copying my jdo objects to that dir it all works. Real simple in the end
On Mar 3, 11:36 pm, Chummar Maly <[email protected]> wrote: > All you need to do is put this code in a servlet and then call the servlet > as the button's action. Having said that is always good to learn the basics. > Here is a link for app engine JDO implementation > :http://code.google.com/appengine/docs/java/gettingstarted/usingdatast.... > The easiest way to learn JDO is to use the sample app. called guestbook and > see how it works. > Best of luck. > > Malyhttp://servetube.appspot.com > > On Wed, Mar 3, 2010 at 2:04 AM, Stephen Wills <[email protected]>wrote: > > > > > Hello, > > I have been wanting to know how to do this for a while now, but don't know > > where to find information on how to do this. I simply want to know how to > > setup my project so I can have a JDO object in the "server" package (so I > > can use classes like com.google.appengine.api.datastore.Key and > > javax.jdo.listener.StoreCallback), and request a list of those objects from > > my client side code. Currently I store my JDO object in my "client" package. > > So when a user clicks a button to retrieve all the People objects I can get > > back a List<People>. I'm sure these are some fundamentally basic steps I > > just don't know to acheive. Do you need a persistent object on the server > > side and a transfer object on the client? If so how do you send the data to > > the transfer object. Thanks > > > currently have: (and want it instead in com.myapp.server but also to > > retrieve say List<People> ) > > in com.myapp.client > > > import javax.jdo.annotations.IdGeneratorStrategy; > > import javax.jdo.annotations.IdentityType; > > import javax.jdo.annotations.PersistenceCapable; > > import javax.jdo.annotations.Persistent; > > import javax.jdo.annotations.PrimaryKey; > > > import com.google.gwt.user.client.rpc.IsSerializable; > > > @PersistenceCapable(identityType = IdentityType.APPLICATION) > > public class People implements IsSerializable { > > > @PrimaryKey > > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > > private Long pKeyRiderID; > > > @Persistent > > private String lastName; > > ... > > > currently in com.myapp.server: > > private List<People> get() { > > PersistenceManager pm = PMF.get().getPersistenceManager(); > > > List<People> result = null; > > try { > > String q = "select from " + People.class.getName(); > > result = new ArrayList<People>((List<People>) > > pm.newQuery(q).execute()); > > } finally { > > pm.close(); > > } > > return result; > > } > > > -- > > 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 > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-appengine-java%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- > Chummar Malyhttp://www.tricolormusic.com -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
