You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.3 KiB
26 lines
1.3 KiB
<%@ page contentType="text/html; charset=UTF-8"%> |
|
<%@ page import="kr.co.kihyun.moumi.doc.table.item.MItem" %> |
|
<%! |
|
String getTypeName(int typeNum) { |
|
String[] typeNameList = {"", "문자", "숫자", "날짜", "타이틀"}; |
|
return typeNameList[typeNum > 0 && typeNum < typeNameList.length ? typeNum : 0]; |
|
} |
|
String reloadExpr(String itemExprs, String[] itemExprList, String[] itemNameList) { |
|
//step 1. 앞글자 0: 를 없앤다. |
|
itemExprs = itemExprs.substring(2,itemExprs.length()); |
|
|
|
//step 2. 번호: 를 없앤다. (step 1,2를 하는이유는 0: 과 100: 에서 0:가 공통으로 들어가는문제가 있기때문.) |
|
for(int i=0; i< itemNameList.length; i++) |
|
itemExprs = itemExprs.replaceAll(MItem.LIST_DELIM+i+":",MItem.LIST_DELIM); |
|
|
|
//step 3. 특수문자 MItem.LIST_DELIM 기준으로 배열에 넣는다. 이때, itemTypeNameList 배열을 사용한다는것에 주의. |
|
itemExprList = itemExprs.split(MItem.LIST_DELIM); |
|
|
|
//step 4. 마지막 수식적용한 번지~배열끝까지 사이가 모두 null일때 배열이 중간에 끊기는현상 보완 |
|
String[] itemExprList_temp = itemExprList; |
|
itemExprList = new String[itemNameList.length]; |
|
for(int i=0; i< itemNameList.length; i++) |
|
itemExprList[i] = i<itemExprList_temp.length ? itemExprList_temp[i] : ""; |
|
return itemExprs; |
|
} |
|
%>
|
|
|