primary key값을 확인하고 DB에 이미 등록되어 있는 데이터인지 확인.
2015년 2월 3일 화요일
Hibernate Error: a different object with the same identifier value was already associated with the session
동일한 primary key로 Insert를 시도할때 발생한다.
2015년 1월 27일 화요일
2015년 1월 23일 금요일
같은 이름으로 이미지를 변경할경우, JQuery
// html// js // 일반적인 이미지 변경 할경우 $('#banner').attr('src', '/image/bb.jpg'); // 같은이름의 이미지로 변경할 경우 $('#banner').attr('src', '/image/bb.jpg?param=123');
이미지를 변경하기 위해 동일한 이름으로 이미지를 교체하는 경우가 있는데, 캐싱문제로 인해 바로 변경되지 않는 경우가 있다.
위와같이 파라미터를 랜덤한 값으로 붙여 해결할수 있다.
선택된 텍스트값 얻기, JavaScript
var selection_text = document.selection.createRange().text; alert(selection_text);
팝업창 옵션, JavaScript
function openPopup() {
var url = '/popup.jsp';
var option = 'width=100, height=100';
window.open(url, '', option);
}
window popup optionwidth : 팝업창 가로사이즈 (px로 표시)
height : 팝업창 세로사이즈 (px로 표시)
top : 화면 상단에서 부터의 팝업창이 뜰 위치 (px로 표시)
left : 화면 왼쪽에서 부터의 팝업창이 뜰 위치 (px로 표시)
toolbar : 도구창 노출 여부 (yes or no로 표시)
menubar : 메뉴 노출 여부 (yes or no로 표시)
location : 메뉴 아이콘 노출 여부 (yes or no로 표시)
directories : 제목 표시줄 노출 여부 (yes or no로 표시)
status : 상태바 노출 여부 (yes or no로 표시)
scrollbars : 스크롤 사용여부 (yes or no로 표시)
resizable : 팝업창 사이즈 변경 가능 여부 (yes or no로 표시)
SpringSource Tool Suite 메뉴등록, Linux mint
STS를 다운받고 /opt 디렉토리로 이동시켜 압축을 해제한다.
sudo gedit /usr/share/applications/STS.desktop
[Desktop Entry]
Name=SpringSource Tool Suite
Comment=SpringSource Tool Suite
Exec=/opt/springsource/sts-3.6.1.RELEASE/STS
Icon=/opt/springsource/sts-3.6.1.RELEASE/icon.xpm
StartupNotify=true
Terminal=false
Type=Application
Categories=Development;IDE;java;
슈퍼키를 눌러 sts를 입력하면 등록된 메뉴를 확인할수 있다.
sudo gedit /usr/share/applications/STS.desktop
[Desktop Entry]
Name=SpringSource Tool Suite
Comment=SpringSource Tool Suite
Exec=/opt/springsource/sts-3.6.1.RELEASE/STS
Icon=/opt/springsource/sts-3.6.1.RELEASE/icon.xpm
StartupNotify=true
Terminal=false
Type=Application
Categories=Development;IDE;java;
슈퍼키를 눌러 sts를 입력하면 등록된 메뉴를 확인할수 있다.
2015년 1월 22일 목요일
TextItem 숫자만 입력, SmartGWT
TextItem ti01 = new TextItem("name", "title");
ti01.setKeyPressFilter("[0-9,]");
피드 구독하기:
글 (Atom)
Using SharedPreference, Android
앱을 개발하면서 간단한 사용자의 설정 정보 또는 무겁지 않은 데이터를 저장할때 사용하면 유용합니다. 저장된 데이터는 앱을 삭제하거나 앱 데이터를 삭제하면 지워지는 데이터 이므로 저장하려는 데이터를 어디에 저장할것인 잘 판단해야 합니다. 데이터 저장 ...
// js
// 일반적인 이미지 변경 할경우
$('#banner').attr('src', '/image/bb.jpg');
// 같은이름의 이미지로 변경할 경우
$('#banner').attr('src', '/image/bb.jpg?param=123');