Questions tagged [gwt-jsinterop]

39 questions
0
votes
1 answer

How to Run GWT Application in Wicket?

I am new to GWT. i have Wicket application and want to run GWT application in one of the panels. both are using maven. should i invoke entry point class from GWT in wicket ? how to interact with GWT XML configurations ?
0
votes
2 answers

Bug? JsNumber toFixed returns different values in SuperDev and JS

I'm using GWT 2.8.2. When I run the following code in SuperDev mode, it logs 123.456, which is what I expect. double d = 123.456789; JsNumber num = Js.cast(d); console.log(num.toFixed(3)); When I compile to JavaScript and run, it logs 123 (i.e. it…
ᴇʟᴇvᴀтᴇ
  • 12,285
  • 4
  • 43
  • 66
0
votes
1 answer

Where to find LinkedHashSet in jsinterop?

I have the following entity in GWT @JsType(namespace = "my.entities") public class MyEntity { private Set texts; public Set getTexts(){ if(this.texts==null) this.texts=new LinkedHashSet(); …
haferblues
  • 2,155
  • 4
  • 26
  • 39
0
votes
1 answer

Stringify JSON from in GWT ArrayList then return to array

Currently attempting to stringify a Java ArrayList object in GWT using an interop method to call the native JSON.stringify(ArrayListobj). This results in a perfect JSON representation of the underlying array list contents in the form of an array.…
dynamphorous
  • 739
  • 1
  • 9
  • 20
0
votes
2 answers

How to cast an object to JsType?

I've declare the following JsType in order to manipulate [GeoJson][1] compliant data : @JsType public class FeatureCollection extends GeoJson { @JsProperty private Feature[] features; public FeatureCollection() { …
Fractaliste
  • 5,777
  • 11
  • 42
  • 86
0
votes
1 answer

How to set a default value for a @JsProperty?

I'm building a Jsinteropted wrapper for Mapbox-gl-js's source objects. I've an abstract class Source which embed default methods like getting/setting the type of the source. @JsType(isNative = true, namespace = GLOBAL, name = JS_OBJECT_NAME) public…
Fractaliste
  • 5,777
  • 11
  • 42
  • 86
0
votes
1 answer

Failed to export Java class to JavaScript via JsInterop in GWT

I'm following the GWT documentation Coding Basics - JavaScript: JsInterop to export a Java class to JavaScript via annotation @JsMethod. However, the Java class is not transpiled into JavaScript. Here's my Java class: package…
Mincong Huang
  • 5,284
  • 8
  • 39
  • 62
0
votes
1 answer

GWT JsType array casting

When I have JSON object like: { "asset": { "properties": [{ "name": "xxx", "id": "yy" }] } } Then I have JsInterop wrappers like so: @JsType public class Asset { @JsProperty public native…
ezpzlmnsqz1337
  • 394
  • 1
  • 5
  • 16
0
votes
1 answer

How can i realize a Circuit Sandbox Client in a GWT app with IsInterop or Babel?

I have to develop a Circuit Sandbox client in GWT. The https://unpkg.com/circuit-sdk uses ES6 so i cannot use GWT JSNI. I am trying coding 'Teaser example to logon and fetch conversations' on https://circuit.github.io/jssdk.html. I have to say, that…
1 2
3