I am not 100% sure since I have not used JsInterop for a long time now but I would imagine the following:
Currently GWT will think that your native JS class "Car" is located at com.project.client namespace because that is the package it lives in and you have not provided a namespace to @JsType. You can access the static car field because you have added the global namespace to @JsProperty and your custom JS has created a car field in that global namespace. In your for-loop I am relatively sure that GWT will try to verify that your Java list contains actual JS Cars so the generated JS will somewhere contain "$wnd.com.project.client.Car" which is undefined since your JS did not define it (you have defined everything in the global space, including the class itself) So you should use @JsType(isNative = true, namespace = JsPackage.GLOBAL) on your Car class to tell GWT to use $wnd.Car since that is the location where you have defined that class in JS. -- J. -- You received this message because you are subscribed to the Google Groups "GWT Users" 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/1cddca63-75ee-48d1-ad59-ff7bc03b6b6e%40googlegroups.com.
