Its up to you to implement it, but I would advise you not to do so.

Assume you have a DTO which includes two functions - void serverSideOnly()
and void clientSideFunction().

You would now have to guarantee that clientSideFunction() doesn't somehow
call serverSideOnly()  -- because that would not work in javascript.

And supposing you end up guaranteeing the above, it means you have two sets
of functions in your class which don't speak to each other. Which means they
have no business being together in the same class. You could just make a
ServerSideDTO that extends from your ClientSideDTO and add the extra
methods.

--Sri


2009/9/16 Asko Saura <[email protected]>

>
> On Aug 27, 3:03 am, Christophe <[email protected]> wrote:
> > If I were to create a patch that followed the @ArtificialRescue
> > principle but with a "@ServerOnly" annotation name that was valid on a
> > method and submitted it, do you think it has a chance of getting
> > accepted ?
>
> I don't know about the GWT development team, but I'm working on the
> same thing.
>
> I've got a bunch of DTOs which include some housekeeping methods used
> by another framework, which I use on the server side. Getting to reuse
> these objects on the client side would be absolutely great. I can't
> use them now, because they happen to include some server-only
> dependencies in methods.
>
> My own plan is to add a "@ServerOnly" annotation on those few methods.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to