@GET @Path("/hello") @Produces(MediaType.APPLICATION_JSON)
public JSONArray sayHello() throws JSONException {
List<User> list = new ArrayList<User>();
User user1 = new User();
user1.setUserName("11111");
user1.setUserType("11111");
User user2 = new User();
user2.setUserName("22222");
user2.setUserType("22222");
User user3 = new User();
user3.setUserName("33333");
user3.setUserType("33333");
list.add(user1);
list.add(user2);
list.add(user3);
JSONArray uriArray = new JSONArray();
for (User userEntity : list) {
JSONObject myObject = new JSONObject();
myObject.put("userName", userEntity.getUserName());
myObject.put("userType", userEntity.getUserType());
uriArray.put(myObject);
}
return uriArray;
}
mygrid.load(“http://localhost:8080/w20-seed/rest/flights”, “json”);
This command do trigger normal xmlHttpRequest to the above url, so I’m not sure what is the reason of the problem.
try to add the next to the grid’s init
grid.preventIECaching(false);
it will prevent any url modifications
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan