Friday, September 17, 2010

Re: Using the same object at the server and client

Hi Alex and Thomas.

This is really fast:D
I guess the Stock.java is persisted:
---
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Stock {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private User user;
@Persistent
private String symbol;
@Persistent
private Date createDate;
---

Alex if I get you right I cannot use this object on the client side?
Is there another way I could move the data to client? Creating a
similar class on the client side is an option, but it is a relatively
bad option, because I would need to code both classes... Any ideas?

Thank you,
janko

On Sep 17, 1:30 pm, Janko <janko.sla...@gmail.com> wrote:
> Thank you for the quick response.
>
> I now get the 13:25:23.531 [ERROR] [homework] Line 9: The import
> com.google.appengine cannot be resolved
> Line 9 is: import com.google.appengine.api.users.User;
>
> I found I need probably inherit it... in what way? what do I need to
> do?
>
> On Sep 17, 1:13 pm, Brett Thomas <brettptho...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I think you need to move the stock class from the .server. package to
> > .shared. so the client knows about it
>
> > On Fri, Sep 17, 2010 at 7:09 AM, Janko <janko.sla...@gmail.com> wrote:
> > > PS: I get the "did you forget to inherit a required module" error..
>
> > > --
> > > 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+unsubscribe@googlegroups.com<google-web-toolkit%2Bunsubs cribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment