개발_참고하기/개발
넥사크로_자바_SQL_체크박스 다중 값 검색
정보 공유 블로그
2021. 5. 21. 15:34
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
그리드 생성후 row0은 displaytype - checkbox 입력 edittype - checkbox 입력 row1은 displaytype - checkbox 입력 edittype - checkbox 입력 text - bind:codeChk 입력 -------------------------------.xfdl //그리드에 type2개 checkbox 설정후 // 값 bind
//체크박스 전체 선택 만들기
this.grdTestList_onheadclick = function(obj:Grid, e:nexacro.GridClickEventInfo)
{
if (obj.getCellProperty("head", e.cell, "edittype") == 'checkbox') {
this.gfn_setGridCheckAll(obj,e); // grid 전체 체크
} else {
if(obj.rowcount > 0){
this.gfn_setGridSort(obj, e); // grid 정렬
}
}
}
//배열에 담아서 Controller로 전송
var codeArray = new Array();
for (var i = 0; i < this.grdTestList.rowcount; i++) {
if (this.grdTestList.getColumn(i, "codeChk") == "1") {
var code = this.gfn_nvl(this.grdTestList.getColumn(i,"code"), "");
codeArray.push("'"+code+"'");
}
}
this.dsSearch.setColumn(0, "codeList", codeArray);
-------------------------------.java 파일
public NexacroResult selectTest(@ParamDataSet(name="dsSearch") TestVO testVO, NexacroResult result) throws Exception {
String[] testList = new String[]{testVO.getCodeList()};
}
-------------------------------.xml 파일
<foreach collection="testList" item="arr" open="(" close=")" separator="," >
${arr}
</foreach>
vo에 testList String으로 set, get 만들기
|
cs |
|
|