package com.test.jsinterop;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsType(namespace = JsPackage.GLOBAL)
public class Entity {
public Integer id;
public String name;
public Entity(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
How can I fix this? Can someone explain how this thing really works i.e calling Java from js using JsInterop.