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/usingdatastore.html. The easiest way to learn JDO is to use the sample app. called guestbook and see how it works. Best of luck.
Maly http://servetube.appspot.com On Wed, Mar 3, 2010 at 2:04 AM, Stephen Wills <stephenmwi...@gmail.com>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 > 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. > -- Chummar Maly http://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 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.