Saturday, October 19, 2013

Re: Hiding methods on shared classes - not fields

@GwtIncompatible sounds excellent. Thanks!

On Friday, October 18, 2013 5:19:12 AM UTC-4, Thomas Broyer wrote:
GWT 2.6 will ignore classes and methods (and fields maybe) annotated with @GwtIncompatible (any annotation with this name, independently of its package)
In the mean time, the only alternative is to have a super-source version for client-side use.

On Friday, October 18, 2013 3:08:37 AM UTC+2, Aron Olsen wrote:
Hi there,

I am a very very newbie to GWT and is wondering if the follow pattern is valid in respect of GWT.
My intent is to share some common methods between the client and the server, but to add special methods client-side and server-side respectively.
Is this the way to go, or do I have a more convenient way to get by:

package ...client

class ClientConfiguration extends SharedConfiguration
{
  transient String clientcString:

  public String getClientString()
  {
    return clientString;
  }
}

package ..server

class ServerConfiguration extends SharedConfiguration
{
  private String  serverString;

  public String getServerString()
  {
    return serverString;
  }
}

package ..shared

abstract class SharedConfiguration
{
  String sharedString:

  public String getSharedString()
  {
    return sharedString;
  }
}

I dislike having to have three classes for this. Need a method-annotation telling what "logic" is not to be shared (members and methods).
I do have made use of "transient" but it doesn't cover my need completely for methods. Suggestions anybody?
Thanks in advance.

/Aron








--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate