전체 글
-
JavaScript에서 생성자를 초기화하면 메소드들이 실행된다.기타 2023. 4. 26. 12:08
// 탭 생성자 class TabsAutomatic { // 탭 구성 constructor(groupNode) { this.tablistNode = groupNode; this.tabs = []; 중략 } // 키다운 이벤트에서 첫 탭과 마지막 탭의 이동을 이어지게 하는 함수 setSelectedToPreviousTab(currentTab) { var index; if (currentTab === this.firstTab) { this.setSelectedTab(this.lastTab); } else { index = this.tabs.indexOf(currentTab); this.setSelectedTab(this.tabs[index - 1]); } // 달력 숨기기 allCalendar.classLi..
-
jquery에서 여러개의 요소에 event를 지정하는 방법JavaScript 2023. 4. 26. 11:54
$("#특정요소").on("click",function(event){ event 실행문 } jquery를 이용해서 특정 요소에 event 태그를 넣는 방법은 다음과 같다. 만약, 이벤트를 넣어줘야하는 특정 요소가 복수의 경우는 어떻게 할 것인가? 위의 태그를 그대로 사용하면, 복수의 특정 요소 중 첫 번째 요소에만 이벤트가 적용된다. 그렇기 때문에, 복수의 요소들에게 같은 이벤트를 부여하고 싶다면, id 가 아닌 클래스를 이용하는 것이 바람직하고 다음과 같은 방법을 이용할 수 있다. $("#특정요소가 있는 위치").on("이벤트종류","특정요소의 클래스명",function(event){ 이벤트 실행문 } 예시)
-
팀프로젝트)예약 달력 만들기학원 프로젝트 2023. 4. 20. 16:47
이번에 팀 프로젝트로 진료예약 웹을 개발하기로 했다. 그 중 특정 날자를 클릭하면 해당 날자에 예약 할 수 있는 시간이 있는지 확인하는 기능을 추가할 것이다. 다음은 우리가 참고한 아산병원의 실시간 진료 예약 페이지의 일부분이다. 해당 기능을 구현하기 위해, javaScript로 작성된 달력을 가져왔고, 달력에 특정 날을 클릭하면 예약 가능한 시간을 나타낼 수있는 기능을 구현하기위해 onclick 이벤트에 다음과 같은 코드를 작성했다. JavaScript function calendarChoiceDay(column) { """ 생략 """ // timeTable 생성 시작 // 이전 timeTable 초기화 while(timeTable.firstChild){ timeTable.removeChild(tim..
-
org.springframework.beans.factory.BeanCreationException기타 2023. 4. 18. 10:56
eclipse로 spring 프로젝트의 서버를 실행시켰는데 해당 에러가 발생했다. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testMapper' defined in file [D:\hojomu\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\TEAM_CONTROL_Reservation\WEB-INF\classes\control\project\mapper\TestMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgument..
-
mySql Connections 설정 ( IP 주소 이용 )Sql 2023. 4. 17. 11:55
기존에 사용하던 mySql의 커넥터는 localhost에만 한정되어 있었기 때문에, 다른 컴퓨터에서는 데이터베이스에 접근할 수가 없었다. Connections를 ip 주소로 생성하면, 다른 컴퓨터에서도 해당 데이터베이스에 접근할 수 있다. 1. IP 주소 찾기 - cmd 에서 ipconfig를 실행하면 해당 컴퓨터의 ip 주소를 알 수 있다. 이번에는 같은 강의실에 있는 컴퓨터들이 접근할 수 있도록 IPv4 주소를 이용할 것이다. 2. 데이터베이스 생성 및 user 생성 - 공유해서 사용하고 싶은 데이터베이스를 생성해준다 - navigator 아래의 administration 탭을 클릭하면 다음과 같은 창이 뜬다 - user and privileges 탭을 클릭하면 계정을 관리하는 창이 나온다. - ad..
-
게시판 파일첨부 ( 2. DB에 저장 및 detail에 Attach )Spring 2023. 4. 14. 15:14
DB에 파일 데이터 저장 및 게시글에 불러오기 : 게시글 쓰기에서 파일을 객체화하고 임시 폴더에 저장하므로써 데이터를 저장할 준비를 마쳤다. 이번에는 기존에 있던 게시글 form에 append 된 파일 객체를 함께 submit 하고 port_attach 테이블에 저장할 것이다. 1 ) BoardVO 변경 기존에 있던 BoardVO에 AttachFileVO 를 ArrayList형태로 저장할 수 있는 필드를 선언했다. 이로서, BoardVO를 매개변수로 선언하면 AttachFileVO 객체 형태의 데이터를 배열로 저장해서 전달할 수 있다. 2 ) Controller, Service Controller와 Service 는 기존과 동일한 형태다 다만, BoardVO내부에 AttachFileVO가 추가되어있다. ..
-
게시판 파일 첨부 (1. 파일을 임시 보관소에 저장하기 )Spring 2023. 4. 14. 15:09
게시판 글쓰기에 파일 첨부 및 파일 불러오기 : 유저들이 게시글에 파일을 첨부하거나 이미지를 불러올 수 있는 기능을 구현해보자. 사실, 이 부분은 textarea의 에디터를 사용하면 더욱 편리하고, 유저가 원한는 위치에 배치 하는 것도 가능하다. 하지만, 스프링에서 해당 기능을 구현해보는 것에 의의를 둔다. 파일을 임시 보관소에 저장하기 : 보내고자 하는 파일을 게시글 작성 브라우저에 미리 등록 시킨 다음 게시글 작성 버튼을 클릭하면 게시글 본문과 함께 데이터베이스에 저장하는 기능을 구현할 것이다. 1) jsp 작성 , AttachFileVO.java 작성 그러기 위해서 upload할 파일을 불러오는 버튼과 임시 저장소로 전송하는 버튼, 임시 저장소에 저장 된 파일을 미리 확인할 수 있도록 썸네일을 불러..