私はこのGWTメソッドを持っています:
public static native JavaScriptObject getJsValue() /*-{
var res = $wnd.product;
return res;
}-*/;
これは HTML/JS 部分です。
<script type="text/javascript" language="javascript">
var product = products({id:1}).first();
</script>
<!-- GWT -->
<script type="text/javascript" language="javascript" src="app/app.nocache.js"></script>
オブジェクトproduct
は Firebug では次のようになります。
Object { id=1, categoryid=0, name="Sample Product", more...}
その後、
Object obj = getJsValue(); // what cast?
ただし、結果の値を解析して、製品 ID などのフィールド値を取得するにはどうすればよいですか?