Instead of JsArray, you can use Object[] or JsType[] (will be ready by
2.8), instead of Integer, you can Double (in 2.8 release, Double exactly
maps to number in javascript).

On Thu, Nov 19, 2015 at 6:22 AM, Paul Stockley <[email protected]> wrote:

> We wrote our own RPC mechanism that is based entirely on JSON, mainly for
> performance reasons on mobile. The client works with JS Overlay
> representation of the server DTO objects. We have a tool that automatically
> generates the JSO's, Looking at the new interop spec's it would be really
> nice for the client and server to work with the same Java DTO objects. I
> can see how most of it could work with the new system. However, we handle
> Java object representations for ints, doubles, booleans and also
> enumerations by generating code in the JSO's such as :
>
> public class ContractDoJSO extends PersistentDataObjectBaseJSO {
>
>    protected ContractDoJSO() {}
>
>
>     public final native ContractType getContractTypeDv() /*-{
>
>                return (this.contractTypeDv == null) ? null : 
> @com.ocs.shared.businesslogic.contract.ContractType::valueOf(Ljava/lang/String;)(this.contractTypeDv);
>
>     }-*/;
>
>
>     public final native void setContractTypeDv(ContractType v) /*-{ 
> this.contractTypeDv = (v == null) ? null : 
> [email protected]::name()(); }-*/;
>
>
> public final native java.lang.Integer getPreferredEmployerId() /*-{
>
>           return (this.preferredEmployerId == null) ? null : 
> @java.lang.Integer::valueOf(I)(this.preferredEmployerId);
>
> }-*/;
> public final native void setPreferredEmployerId(java.lang.Integer v) /*-{
>
>      this.preferredEmployerId = (v == null) ? null : 
> [email protected]::intValue()();
>
> }-*/;
>
>
> In addition, if the DTO's contain arrays the client code has to access
> them using the JsArray class rather than the java collection API. Do you
> think there is some way to have a single representation using the new
> Interop mechanism?
>
>
> On Friday, October 23, 2015 at 3:13:55 AM UTC-4, Goktug Gokdogan wrote:
>
>> As we are getting close to 2.8 release I wrote a new document that is
>> concentrating on jsinterop features to be released in 2.8:
>>
>> https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit#
>>
>> Please share your feedback.
>>
>> Thanks,
>>
>> Goktug
>>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit-contributors/1155c295-ecd1-4cdd-86a2-ddf3cffb618c%40googlegroups.com
> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/1155c295-ecd1-4cdd-86a2-ddf3cffb618c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA2j3G%3D0iLTxgmo6oTZE43pEUiYOeAz%2BgmixbfsuY%2Bzekw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to