JqGrid Ajax 데이터 불러오기
프로그래밍/Grid 공통2018. 2. 13. 11:03
datatype : 'local' 로 설정후에 ajax 를 실행하면 데이터를 불러온다
'프로그래밍 > Grid 공통' 카테고리의 다른 글
JqGrid Json 데이터 불러오기 (0) | 2018.02.12 |
---|
JqGrid Json 데이터 불러오기
프로그래밍/Grid 공통2018. 2. 12. 15:42
@RequestMapping(value = "/test6.do", method = RequestMethod.POST) @ResponseBody public String test6(){ JSONObject jsonObject = new JSONObject(); JSONArray listData = new JSONArray(); JSONObject listInfo = new JSONObject(); // 정보 입력 listInfo.put("SEQ", "송강호"); listInfo.put("TITLE", "남자"); listInfo.put("INSERT_TIME", "25"); listInfo.put("INSERT_ID", "남궁민수"); listInfo.put("READ_COUNT", "1"); // Array에 입력 listData.add(listInfo); listInfo = new JSONObject(); listInfo.put("SEQ", "송강호"); listInfo.put("TITLE", "남자"); listInfo.put("INSERT_TIME", "25"); listInfo.put("INSERT_ID", "남궁민수"); listInfo.put("READ_COUNT", "1"); listData.add(listInfo); // 전체의 JSONObject에 사람이란 name으로 JSON의 정보로 구성된 Array의 value를 입력 jsonObject.put("page", "1"); jsonObject.put("total", "2"); jsonObject.put("listData", listData); String jsonInfo = jsonObject.toString(); System.out.println("jsonInfo:" + jsonInfo); return jsonInfo; }
'프로그래밍 > Grid 공통' 카테고리의 다른 글
JqGrid Ajax 데이터 불러오기 (0) | 2018.02.13 |
---|