In a complex enterprise application you will have some classes which
are not serializable or even translatable to Javascript. If you want
to serialize a bean which has a field with this class the compilation
will fail. For example, let's suppose that you have this bean:

@Entity
public class User {
  ................
  private Calendar loginDate;
  .................
}

@Entity
public class Document {
  private String title;

  @ManyToOne
  @GwtTransient
  private User author;

  public void setAuthor(User author);
  public User getAuthor();
}

Now, you want to use the Document bean in your GWT application. It
only has a dependency on the non serializable class User as a relation
and you are completely sure that you will not call any getter or
setter of the field it in your code. You can:

- Include Document in the client package and leave User outside. Even
if the source code of User is available in the same jar, the
compilation will fail complaining that User.class does not have source
code.
- Include both classes in the client package. The compilation will
fail because User is not translatable to Javascript due to the use of
Calendar.

So this annotation is only useful to leave already simple classes
outside of the serialization, but it's not useful if you want to
ignore a type which is too complex for GWT to handle.

On 5 feb, 12:05, Diego Lovison <[email protected]> wrote:
> you can explain more "but not for Enterprise like apps with all kind
> of decouples buses/queues and security"
>
> On 4 fev, 18:19, Ed <[email protected]> wrote:
>
>
>
> > Thanks for the idea Diego....
> > This is nice for Hello World applications, but not for Enterprise like
> > apps with all kind of decouples buses/queues and security
> > restrictions....
>
> > Thanks anyway :)

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