DTOs and that it's good and useful, but I'm talking about compilation. I want to be able to use a server-side class on the client GWT code. Whether I need to pass it around between client and server is another story. Right now I'm just trying to use it. The problem comes when the class has fields that are not GWT serializable. In that case I'm wondering if there's a way to use deferred binding (or something else) to provide alternate implementations for those uncompilable fields' types.
The base deferred binding obviously doesn't work since it's not a straight replacement of a type for its implementation (it's more a way to generate instances, and thus its use through GWT.create). But I'm wondering if there's something more obcure that I have missed. At least having an annotation (already proposed and logged in a ticket http://code.google.com/p/google-web-toolkit/issues/detail?id=3769&q=serveronly) for the compiler to ignore such fields, would be a partial solution. But I really wish there's a replacement option. On May 21, 5:42 am, José González Gómez <[email protected]> wrote: > Use DTOs and some mapping helpers to communicate with the presentation > layer (GWT). There's a prior discussion in the group regardin this, > search forDozer/Gilead. > > HTH, best regards > José > > On 20 mayo, 23:16, Raziel <[email protected]> wrote: > > > > > > > Hi, currently I create modules in order to access server-side classes > > in my GWT client code. Until now all these classes have not referred > > (directly or indirectly) to classes outside of the GWT JRE emulation. > > > However, now I need to be able to compile a bean with a reference to > > javax.xml.namescape.QName. And in general I see how it might soon be > > needed to compile classes with references to uncompilable classes > > either because it's a third party class and we don't have the source > > available, or it's a JRE class for which there's no emulation yet, > > etc. > > > So I'm wondering if there's a way to use deferred binding to provide > > the compiler with a "client-side specific" implementation of those > > classes. The caveat of course is that the class containing the > > offending reference to uncompilable code should not be changed. For > > example: > > > class MyBean { > > > QName q; > > > MyBean(QName q) { > > this.q = q; > > } > > > } > > > Maybe something along the lines of ... > > > <replace-with class="com.mycompany.gwt.bind.MyQName"> > > <when-type-is class="javax.xml.namescape.QName"/> > > </replace-with> > > > For what I read nothing of the like is possible, since for starters > > the deferred implementation has to go through GWT.create(), but I'm > > hoping there's another way I haven't thought about. > > > Thanks > > > -- > > 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 > > athttp://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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://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 [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.
