Re: how to use a server class in client code

2009-11-17 Thread Brian
I've experimented with creating a code generator to use reflection to
generate client side DTOs along with utility classes to convert
between the two. This way, I'm only maintaining the classes in one
place and the rules that the actual server side classes have to follow
are reduced from what GWT-RPC requires. I'm not completely sold on
this idea, but it's working for me for now.

The code generator is very rough right now and in no shape for
sharing, but I may spend some time cleaning it ip eventually. Would
anyone else be interested in a tool like that?

-Brian

On Nov 16, 7:01 am, Ray  wrote:
> Hello,
>
> I have my model classes inside an library on the server-side which I
> want user for different applications (not only GWT)
>
> Copying my domain classes to the client side of the GWT-Client-App
> doesn't seem to be very convienient, as I have to maintain the same
> code in two different locations.
>
> Is there no way to include the library and GWT creates the client-side
> java-script whith the model automatically?
>
> Thanks
> Ray
>
> On 11 Nov., 20:58, Dominik Steiner 
> wrote:
>
>
>
> > Sanjith,
>
> > you can move the model classes to anywhere under the client folder,  
> > the client/domain example is just what i use here with me. And then  
> > the server will reuse those classes on server side where he will read  
> > the jdo annotations.
>
> > Let me know if it works for you
>
> > Dominik

--

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=.




Re: how to use a server class in client code

2009-11-16 Thread Ray
Hello,

I have my model classes inside an library on the server-side which I
want user for different applications (not only GWT)

Copying my domain classes to the client side of the GWT-Client-App
doesn't seem to be very convienient, as I have to maintain the same
code in two different locations.

Is there no way to include the library and GWT creates the client-side
java-script whith the model automatically?

Thanks
Ray


On 11 Nov., 20:58, Dominik Steiner 
wrote:
> Sanjith,
>
> you can move the model classes to anywhere under the client folder,  
> the client/domain example is just what i use here with me. And then  
> the server will reuse those classes on server side where he will read  
> the jdo annotations.
>
> Let me know if it works for you
>
> Dominik

--

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=.




Re: how to use a server class in client code

2009-11-16 Thread Ray
Hello,

I have my DTO (domain model) classes - which are serializeable POJOs
without annotations - inside jar files on the server, as i want to use
them not only in GWT applications.

Is there no other solution of reusing them on my GWT-client-side
without copying the source
code to the client. Because in the case of changes I don't want to
change the DTO classes at two different places (GWT-Client+Server-
api.jar)

Thanks,
Ray


On 11 Nov., 20:58, Dominik Steiner 
wrote:
> Sanjith,
>
> you can move the model classes to anywhere under the client folder,  
> the client/domain example is just what i use here with me. And then  
> the server will reuse those classes on server side where he will read  
> the jdo annotations.
>
> Let me know if it works for you
>
> Dominik

--

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=.




Re: how to use a server class in client code

2009-11-11 Thread Dominik Steiner

Sanjith,

you can move the model classes to anywhere under the client folder,  
the client/domain example is just what i use here with me. And then  
the server will reuse those classes on server side where he will read  
the jdo annotations.

Let me know if it works for you

Dominik


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to use a server class in client code

2009-11-11 Thread Sanjith Chungath
@Dalla: Thanks again for those steps. As i am not familiar with those tools
am finding a bit difficult to handle it.

@Dominik:  Thanks a lot for that information. It will save a lot of life for
me. So is it enough to move my current class definitions from the server to
the client/domain package and use them at both server and client code?

-Sanjith

On Tue, Nov 10, 2009 at 11:12 PM, Dominik Steiner <
dominik.j.stei...@googlemail.com> wrote:

>
> Sanjith,
>
> I'm using GWT on GAE and I also have my data model classes with JDO
> annotations. I have those classes reside under client/domain and GWT
> 2.0 handles/ignores those JDO related annotations well and i don't
> have to use Dozer or another framework in order to be able to use
> those classes on the client.
>
> If you need more help, please let me know.
>
> HTH
>
> Dominik
>
> On Nov 9, 12:40 pm, Dalla  wrote:
> > I´m not sure you can solve this particular problem the way DaveS
> > suggested, not without modifying the class anyway.
> > Even if you created a separate .jar and referenced that from your
> > client project, the GWT compiler wouldn´t understand the annotations.
> >
> > My problem was similar to yours, and would be solved by creating a new
> > even simpler class like this:
> >
> > Public class PhotoSetStoreDTO {
> >
> > private String setid;
> > private String title;
> > private String description;
> >
> > private String primaryPhotoURL;
> > public PhotoSetStore(String id, String title, String descString,
> > String photoURL) {
> > setSetID(id);
> > setTitle(title);
> > setDescrption(descString);
> > setPrimaryPhotoURL(photoURL);
> >
> > }
> > }
> >
> > Then use Dozer or a similar mapping framework to do the mapping
> > between server side and client side objects.
> > I haven´t been working with GAE at all to be honest, so there might be
> > a better approach.
> >
> > On 9 Nov, 18:39, Sanjith Chungath  wrote:
> >
> > > Thanks to all for your suggestions.
> >
> > > As my application needs to be deployed in google app engine, I doubt
> whether
> > > I can move those classes from server to client. I use JDO to persist
> objects
> > > to the GAE data store. The class is a simple class and I have mentioned
> it
> > > below,
> >
> > > @PersistenceCapable(identityType = IdentityType.DATASTORE)
> > > public class PhotoSetStore {
> > > @PrimaryKey
> > > @Persistent
> > > private String setid;
> >
> > > @Persistent
> > > private String title;
> >
> > > @Persistent
> > > private String description;
> >
> > > @Persistent
> > > private String primaryPhotoURL;
> >
> > > public PhotoSetStore(String id, String title, String descString,
> > > String photoURL) {
> > > setSetID(id);
> > > setTitle(title);
> > > setDescrption(descString);
> > > setPrimaryPhotoURL(photoURL);
> >
> > > }
> > > }
> >
> > > Dave, it looks simple approach to have a (java) project to have common
> > > classes defined. I need few clarifications, do you have seperate
> projects
> > > for GWT client code and server code? If not, how did you added the
> common
> > > .jar file to the client code?
> >
> > > Also, I didnt quiet get how the common .jar file is different from the
> class
> > > existing in a server package of same GWt project!
> >
> > > -Sanjith
> >
> > > On Mon, Nov 9, 2009 at 5:10 PM, sathya  wrote:
> >
> > > > Hi,
> > > >You can serialize classes only defined in client side(not server
> > > > side).Class you defined on server side should be moved to client side
> > > > to serialize.
> >
> > > > On Nov 9, 4:01 pm, DaveS  wrote:
> > > > > That's how we did it originally, but then we created a separate GWT
> > > > > project (well, actually it's just a JAR project) that defines all
> our
> > > > > types that are common over the RPC interfaces. We reference that
> > > > > project in both the server and client projects, and the JAR gets
> > > > > pulled into the client side and GWT happily generates JS code from
> it.
> > > > > We now also use it for some 'shared' client-side classes as well so
> > > > > it's effectively just a library project.
> >
> > > > >   DaveS.
> >
> > > > > On Nov 9, 3:35 am, rjcarr  wrote:
> >
> > > > > > Hi Sanjith-
> >
> > > > > > I don't completely follow your question but any shared code
> between
> > > > > > the client and the server has to reside in the client package (by
> > > > > > default).  This is because GWT can only see code in the modules
> you
> > > > > > have defined and the server package isn't a GWT module (again, by
> > > > > > default).
> >
> > > > > > Hope this helps!
> >
> > > > > > On Nov 8, 10:30 am, Sanjith Chungath  wrote:
> >
> > > > > > > Greetings to all,
> > > > > > >I have defined a class in the server and want to get a
> list of
> > > > > > > objects (of that class) as return parameter of an async call.
> But
> > > > while
> > > > > > > compile I got  following error "No source code is available for
> type
> > > > > > > com.abc.pqr.data.XXX; did you forget to inherit a required
> module?".
> > > > I know
> > > > 

Re: how to use a server class in client code

2009-11-10 Thread Dominik Steiner

Sanjith,

I'm using GWT on GAE and I also have my data model classes with JDO
annotations. I have those classes reside under client/domain and GWT
2.0 handles/ignores those JDO related annotations well and i don't
have to use Dozer or another framework in order to be able to use
those classes on the client.

If you need more help, please let me know.

HTH

Dominik

On Nov 9, 12:40 pm, Dalla  wrote:
> I´m not sure you can solve this particular problem the way DaveS
> suggested, not without modifying the class anyway.
> Even if you created a separate .jar and referenced that from your
> client project, the GWT compiler wouldn´t understand the annotations.
>
> My problem was similar to yours, and would be solved by creating a new
> even simpler class like this:
>
> Public class PhotoSetStoreDTO {
>
> private String setid;
> private String title;
> private String description;
>
> private String primaryPhotoURL;
> public PhotoSetStore(String id, String title, String descString,
> String photoURL) {
> setSetID(id);
> setTitle(title);
> setDescrption(descString);
> setPrimaryPhotoURL(photoURL);
>
> }
> }
>
> Then use Dozer or a similar mapping framework to do the mapping
> between server side and client side objects.
> I haven´t been working with GAE at all to be honest, so there might be
> a better approach.
>
> On 9 Nov, 18:39, Sanjith Chungath  wrote:
>
> > Thanks to all for your suggestions.
>
> > As my application needs to be deployed in google app engine, I doubt whether
> > I can move those classes from server to client. I use JDO to persist objects
> > to the GAE data store. The class is a simple class and I have mentioned it
> > below,
>
> > @PersistenceCapable(identityType = IdentityType.DATASTORE)
> > public class PhotoSetStore {
> > @PrimaryKey
> > @Persistent
> > private String setid;
>
> > @Persistent
> > private String title;
>
> > @Persistent
> > private String description;
>
> > @Persistent
> > private String primaryPhotoURL;
>
> > public PhotoSetStore(String id, String title, String descString,
> > String photoURL) {
> > setSetID(id);
> > setTitle(title);
> > setDescrption(descString);
> > setPrimaryPhotoURL(photoURL);
>
> > }
> > }
>
> > Dave, it looks simple approach to have a (java) project to have common
> > classes defined. I need few clarifications, do you have seperate projects
> > for GWT client code and server code? If not, how did you added the common
> > .jar file to the client code?
>
> > Also, I didnt quiet get how the common .jar file is different from the class
> > existing in a server package of same GWt project!
>
> > -Sanjith
>
> > On Mon, Nov 9, 2009 at 5:10 PM, sathya  wrote:
>
> > > Hi,
> > >    You can serialize classes only defined in client side(not server
> > > side).Class you defined on server side should be moved to client side
> > > to serialize.
>
> > > On Nov 9, 4:01 pm, DaveS  wrote:
> > > > That's how we did it originally, but then we created a separate GWT
> > > > project (well, actually it's just a JAR project) that defines all our
> > > > types that are common over the RPC interfaces. We reference that
> > > > project in both the server and client projects, and the JAR gets
> > > > pulled into the client side and GWT happily generates JS code from it.
> > > > We now also use it for some 'shared' client-side classes as well so
> > > > it's effectively just a library project.
>
> > > >   DaveS.
>
> > > > On Nov 9, 3:35 am, rjcarr  wrote:
>
> > > > > Hi Sanjith-
>
> > > > > I don't completely follow your question but any shared code between
> > > > > the client and the server has to reside in the client package (by
> > > > > default).  This is because GWT can only see code in the modules you
> > > > > have defined and the server package isn't a GWT module (again, by
> > > > > default).
>
> > > > > Hope this helps!
>
> > > > > On Nov 8, 10:30 am, Sanjith Chungath  wrote:
>
> > > > > > Greetings to all,
> > > > > >        I have defined a class in the server and want to get a list 
> > > > > > of
> > > > > > objects (of that class) as return parameter of an async call. But
> > > while
> > > > > > compile I got  following error "No source code is available for type
> > > > > > com.abc.pqr.data.XXX; did you forget to inherit a required module?".
> > > I know
> > > > > > that it is because GWT dont know the java script code for
> > > coresponding
> > > > > > class. What is the general practice to use a object of class in
> > > server side
> > > > > > at client code, serialize it? or any other better way.
>
> > > > > > -Sanjith.- Hide quoted text -
>
> > > > - Show quoted text -
>
>
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/grou

Re: how to use a server class in client code

2009-11-09 Thread Dalla

I´m not sure you can solve this particular problem the way DaveS
suggested, not without modifying the class anyway.
Even if you created a separate .jar and referenced that from your
client project, the GWT compiler wouldn´t understand the annotations.

My problem was similar to yours, and would be solved by creating a new
even simpler class like this:

Public class PhotoSetStoreDTO {

private String setid;
private String title;
private String description;

private String primaryPhotoURL;
public PhotoSetStore(String id, String title, String descString,
String photoURL) {
setSetID(id);
setTitle(title);
setDescrption(descString);
setPrimaryPhotoURL(photoURL);

}
}

Then use Dozer or a similar mapping framework to do the mapping
between server side and client side objects.
I haven´t been working with GAE at all to be honest, so there might be
a better approach.


On 9 Nov, 18:39, Sanjith Chungath  wrote:
> Thanks to all for your suggestions.
>
> As my application needs to be deployed in google app engine, I doubt whether
> I can move those classes from server to client. I use JDO to persist objects
> to the GAE data store. The class is a simple class and I have mentioned it
> below,
>
> @PersistenceCapable(identityType = IdentityType.DATASTORE)
> public class PhotoSetStore {
> @PrimaryKey
> @Persistent
> private String setid;
>
> @Persistent
> private String title;
>
> @Persistent
> private String description;
>
> @Persistent
> private String primaryPhotoURL;
>
> public PhotoSetStore(String id, String title, String descString,
> String photoURL) {
> setSetID(id);
> setTitle(title);
> setDescrption(descString);
> setPrimaryPhotoURL(photoURL);
>
> }
> }
>
> Dave, it looks simple approach to have a (java) project to have common
> classes defined. I need few clarifications, do you have seperate projects
> for GWT client code and server code? If not, how did you added the common
> .jar file to the client code?
>
> Also, I didnt quiet get how the common .jar file is different from the class
> existing in a server package of same GWt project!
>
> -Sanjith
>
>
>
> On Mon, Nov 9, 2009 at 5:10 PM, sathya  wrote:
>
> > Hi,
> >    You can serialize classes only defined in client side(not server
> > side).Class you defined on server side should be moved to client side
> > to serialize.
>
> > On Nov 9, 4:01 pm, DaveS  wrote:
> > > That's how we did it originally, but then we created a separate GWT
> > > project (well, actually it's just a JAR project) that defines all our
> > > types that are common over the RPC interfaces. We reference that
> > > project in both the server and client projects, and the JAR gets
> > > pulled into the client side and GWT happily generates JS code from it.
> > > We now also use it for some 'shared' client-side classes as well so
> > > it's effectively just a library project.
>
> > >   DaveS.
>
> > > On Nov 9, 3:35 am, rjcarr  wrote:
>
> > > > Hi Sanjith-
>
> > > > I don't completely follow your question but any shared code between
> > > > the client and the server has to reside in the client package (by
> > > > default).  This is because GWT can only see code in the modules you
> > > > have defined and the server package isn't a GWT module (again, by
> > > > default).
>
> > > > Hope this helps!
>
> > > > On Nov 8, 10:30 am, Sanjith Chungath  wrote:
>
> > > > > Greetings to all,
> > > > >        I have defined a class in the server and want to get a list of
> > > > > objects (of that class) as return parameter of an async call. But
> > while
> > > > > compile I got  following error "No source code is available for type
> > > > > com.abc.pqr.data.XXX; did you forget to inherit a required module?".
> > I know
> > > > > that it is because GWT dont know the java script code for
> > coresponding
> > > > > class. What is the general practice to use a object of class in
> > server side
> > > > > at client code, serialize it? or any other better way.
>
> > > > > -Sanjith.- Hide quoted text -
>
> > > - Show quoted text -
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to use a server class in client code

2009-11-09 Thread Sanjith Chungath
Thanks to all for your suggestions.

As my application needs to be deployed in google app engine, I doubt whether
I can move those classes from server to client. I use JDO to persist objects
to the GAE data store. The class is a simple class and I have mentioned it
below,

@PersistenceCapable(identityType = IdentityType.DATASTORE)
public class PhotoSetStore {
@PrimaryKey
@Persistent
private String setid;

@Persistent
private String title;

@Persistent
private String description;

@Persistent
private String primaryPhotoURL;

public PhotoSetStore(String id, String title, String descString,
String photoURL) {
setSetID(id);
setTitle(title);
setDescrption(descString);
setPrimaryPhotoURL(photoURL);
}
}

Dave, it looks simple approach to have a (java) project to have common
classes defined. I need few clarifications, do you have seperate projects
for GWT client code and server code? If not, how did you added the common
.jar file to the client code?

Also, I didnt quiet get how the common .jar file is different from the class
existing in a server package of same GWt project!

-Sanjith

On Mon, Nov 9, 2009 at 5:10 PM, sathya  wrote:

>
> Hi,
>You can serialize classes only defined in client side(not server
> side).Class you defined on server side should be moved to client side
> to serialize.
>
>
> On Nov 9, 4:01 pm, DaveS  wrote:
> > That's how we did it originally, but then we created a separate GWT
> > project (well, actually it's just a JAR project) that defines all our
> > types that are common over the RPC interfaces. We reference that
> > project in both the server and client projects, and the JAR gets
> > pulled into the client side and GWT happily generates JS code from it.
> > We now also use it for some 'shared' client-side classes as well so
> > it's effectively just a library project.
> >
> >   DaveS.
> >
> > On Nov 9, 3:35 am, rjcarr  wrote:
> >
> >
> >
> > > Hi Sanjith-
> >
> > > I don't completely follow your question but any shared code between
> > > the client and the server has to reside in the client package (by
> > > default).  This is because GWT can only see code in the modules you
> > > have defined and the server package isn't a GWT module (again, by
> > > default).
> >
> > > Hope this helps!
> >
> > > On Nov 8, 10:30 am, Sanjith Chungath  wrote:
> >
> > > > Greetings to all,
> > > >I have defined a class in the server and want to get a list of
> > > > objects (of that class) as return parameter of an async call. But
> while
> > > > compile I got  following error "No source code is available for type
> > > > com.abc.pqr.data.XXX; did you forget to inherit a required module?".
> I know
> > > > that it is because GWT dont know the java script code for
> coresponding
> > > > class. What is the general practice to use a object of class in
> server side
> > > > at client code, serialize it? or any other better way.
> >
> > > > -Sanjith.- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to use a server class in client code

2009-11-09 Thread sathya

Hi,
You can serialize classes only defined in client side(not server
side).Class you defined on server side should be moved to client side
to serialize.


On Nov 9, 4:01 pm, DaveS  wrote:
> That's how we did it originally, but then we created a separate GWT
> project (well, actually it's just a JAR project) that defines all our
> types that are common over the RPC interfaces. We reference that
> project in both the server and client projects, and the JAR gets
> pulled into the client side and GWT happily generates JS code from it.
> We now also use it for some 'shared' client-side classes as well so
> it's effectively just a library project.
>
>   DaveS.
>
> On Nov 9, 3:35 am, rjcarr  wrote:
>
>
>
> > Hi Sanjith-
>
> > I don't completely follow your question but any shared code between
> > the client and the server has to reside in the client package (by
> > default).  This is because GWT can only see code in the modules you
> > have defined and the server package isn't a GWT module (again, by
> > default).
>
> > Hope this helps!
>
> > On Nov 8, 10:30 am, Sanjith Chungath  wrote:
>
> > > Greetings to all,
> > >        I have defined a class in the server and want to get a list of
> > > objects (of that class) as return parameter of an async call. But while
> > > compile I got  following error "No source code is available for type
> > > com.abc.pqr.data.XXX; did you forget to inherit a required module?". I 
> > > know
> > > that it is because GWT dont know the java script code for coresponding
> > > class. What is the general practice to use a object of class in server 
> > > side
> > > at client code, serialize it? or any other better way.
>
> > > -Sanjith.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to use a server class in client code

2009-11-09 Thread DaveS

That's how we did it originally, but then we created a separate GWT
project (well, actually it's just a JAR project) that defines all our
types that are common over the RPC interfaces. We reference that
project in both the server and client projects, and the JAR gets
pulled into the client side and GWT happily generates JS code from it.
We now also use it for some 'shared' client-side classes as well so
it's effectively just a library project.

  DaveS.

On Nov 9, 3:35 am, rjcarr  wrote:
> Hi Sanjith-
>
> I don't completely follow your question but any shared code between
> the client and the server has to reside in the client package (by
> default).  This is because GWT can only see code in the modules you
> have defined and the server package isn't a GWT module (again, by
> default).
>
> Hope this helps!
>
> On Nov 8, 10:30 am, Sanjith Chungath  wrote:
>
> > Greetings to all,
> >        I have defined a class in the server and want to get a list of
> > objects (of that class) as return parameter of an async call. But while
> > compile I got  following error "No source code is available for type
> > com.abc.pqr.data.XXX; did you forget to inherit a required module?". I know
> > that it is because GWT dont know the java script code for coresponding
> > class. What is the general practice to use a object of class in server side
> > at client code, serialize it? or any other better way.
>
> > -Sanjith.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to use a server class in client code

2009-11-08 Thread rjcarr

Hi Sanjith-

I don't completely follow your question but any shared code between
the client and the server has to reside in the client package (by
default).  This is because GWT can only see code in the modules you
have defined and the server package isn't a GWT module (again, by
default).

Hope this helps!

On Nov 8, 10:30 am, Sanjith Chungath  wrote:
> Greetings to all,
>        I have defined a class in the server and want to get a list of
> objects (of that class) as return parameter of an async call. But while
> compile I got  following error "No source code is available for type
> com.abc.pqr.data.XXX; did you forget to inherit a required module?". I know
> that it is because GWT dont know the java script code for coresponding
> class. What is the general practice to use a object of class in server side
> at client code, serialize it? or any other better way.
>
> -Sanjith.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to use a server class in client code

2009-11-08 Thread Dalla

I guess it depends on what your server side object looks like.

I´ve been using a mapping framework called Dozer in a couple of
projects where
I needed to use EJB-classes on the client side. What you do in that
case is basically create a
POJO that is a mirror of your EJB, but without all the annotations.
The resulting object is something that the GWT-compiler
can understand. So on the server side you do the mapping, EJB -> POJO,
and then transfer the POJO to the client side.
If you need to persist some changes to the EJB, you just send your
POJO back to the server side, and reverse the mapping, that is POJO ->
EJB.

However I´m not sure this is relevant info in your case.
Maybe if you post your server side object we can help better.

On 8 Nov, 19:30, Sanjith Chungath  wrote:
> Greetings to all,
>        I have defined a class in the server and want to get a list of
> objects (of that class) as return parameter of an async call. But while
> compile I got  following error "No source code is available for type
> com.abc.pqr.data.XXX; did you forget to inherit a required module?". I know
> that it is because GWT dont know the java script code for coresponding
> class. What is the general practice to use a object of class in server side
> at client code, serialize it? or any other better way.
>
> -Sanjith.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



how to use a server class in client code

2009-11-08 Thread Sanjith Chungath
Greetings to all,
   I have defined a class in the server and want to get a list of
objects (of that class) as return parameter of an async call. But while
compile I got  following error "No source code is available for type
com.abc.pqr.data.XXX; did you forget to inherit a required module?". I know
that it is because GWT dont know the java script code for coresponding
class. What is the general practice to use a object of class in server side
at client code, serialize it? or any other better way.

-Sanjith.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---