Category 222

[javascript] Object Length 구하기

Object Length 구하기 첫번째 방법 ( IE 8 버전 이하는 지원하지 않는다고 한다.)var obj = { id : 'btn', value : '50', txt : 'button'}; var obj_length = Object.keys(obj).length;console.log(obj_length); // 3 두번째 방법var obj = { id : 'btn', value : '50', txt : 'button'}; var getLength = function(obj) {var size = 0, key = null;for (key in obj) {if (obj.hasOwnProperty(key)) size++;}return size;}; console.log(getLength(obj));

[DB] iBatis resultMap null 처리

iBatis resultMap null 처리 org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred while applying a result map. --- The error happened while setting a property on the result object. SELECT 구문 실행시 위와 같은 에러가 나왔다. 내 경우는 VO객체에 생성한 getter, setter가 null값일 경우 나는 에러였는데 null 처리 방법은 여러가지가 있겠지만..

Programming/DB 2015.03.26

[Web] JSTL FUNCTION

JSTL FUNCTION jstl function은 문자열, 컬렉션들을 처리하고, 사용하기 위해서는 fn 접두어를 쓴다. startsWith, endsWith boolean startsWith(String string, String prefix) string이 prefix로 시작하면 true값을 리턴 ${fn:startsWith("javascript", "ava!")} return false boolean endsWith(String string, String substring) string이 suffix로 끝나면 true값을 리턴 ${fn:endsWith("javascript", "ript")} return true contains, containsIgnoreCase boolean contains(St..

Programming/Web 2015.03.10