Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 오블완
- github
- oracle
- mssql
- mysql
- java
- 명령어
- 리눅스
- IntelliJ
- PostgreSQL
- docker
- git
- 넥사크로
- 인터페이스
- spring
- 인덱스
- 티스토리챌린지
- 자바
- SQL
- pandas
- Python
- 네트워크
- Javascript
- 독서
- 후기
- 책
- Linux
- DBMS
- MariaDB
- springboot
Archives
- Today
- Total
hanker
[NEXACRO N V24] Spring framework 데이터 통신 방법 본문
반응형
넥사크로 N v24에서 Spring framework와 통신하는 방법에 대해서 알아보자.
Spring에서 설정을 선행해야 하는데, 아래 URL에서 따라 하면 된다.
https://www.playnexacro.com/#show:learn:4732
play nexacro:플레이 넥사크로
Play Nexacro is a community site for nexacro platform. 넥사크로 플랫폼 사용자 커뮤니티
www.playnexacro.com
1. Nexacro → Spring Framework
넥사크로 내에서 Spring에 URL을 호출시켜 데이터를 받아보자.
// 1번 클릭
this.form.btnSearch_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
// 2번 callMethod 호출
this.callMethod();
};
// 3번 callMethod 실행
this.callMethod = function ()
{
// Parameter 셋팅
this.ds_search.clearData();
var nRow = this.ds_search.addRow();
this.searchParams.setColumn(nRow, "fromDt", this.form.fromDt.value);
this.searchParams.setColumn(nRow, "toDt", this.form.toDt.value);
var sId = "callList"; // 트랜잭션 구분 값 (ID)
var sUrl = "http://localhost:8080/html/callDataSet.do"; // 요청 주소
var sInDs = "params=searchParams"; // 파라미터 DataSet
var sOutDs = "dataSet1=outDataset"; // return 값 Setting
var sArg = ""; // 요청 보낼 때 변수를 문자열로 설정해서 전송
var sfunc = "fn_callback"; // 콜백 함수 설정
var bIsAsync = true; // 동기 비동기 처리 true : 비동기
var dType = 3; // Type 지정 (0: XML, 1 : Binary, 2: SSV, 3: JSON)
// 4번 Spring framework URL 통신
this.transaction(sId,sUrl,sInDs,sOutDs,sArg,sfunc, bIsAsync, dType);
}
// 5번 transaction 호출 이후 콜백함수 실행
this.fn_callback = function(sId, nErrCd, sErrMsg)
{
if (nErrCd == 0) {
// 성공 시 처리 등
} else {
// 에러 처리 등
}
};
- searchParams와 dataSet1이라는 DataSet1이 설정되어 있어야 한다.
2. Spring Framework → Nexacro
@RequestMapping("/html/callDataSet.do")
public NexacroResult callDataSet(@ParamDataSet(name = "params") Map<String, Object> param) {
List<Map<String, Object>> list = testService.getData(param);
NexacroResult result = new NexacroResult();
result.addDataSet("outDataset", list);
return result;
}
여기까지 완료되면 Nexacro로 보내준다.
반응형
'TOOL > nexacro' 카테고리의 다른 글
[넥사크로 N 24] 그리드 내 체크박스에 체크 된 row 값들 가져오기 (4) | 2025.06.26 |
---|---|
[Nexacro N 24] 그리드 체크 박스 전체 선택, 전체 해제 기능 구현 (5) | 2025.06.24 |
[Nexacro N 24] 그리드 안에 checkbox 구현 (9) | 2025.06.23 |
[Nexacro N24] Spring Boot에서 NexacroMappingExceptionResolver - No static resource (경로) 오류 (4) | 2025.06.20 |