Simply Lift : Chapter 14 - Dynamic html tables created from DB.runQuery()
원문 : http://simply.liftweb.net/index-Chapter-14.html#toc-Chapter-14
Part 2 : 레시피(Recipes)
14장 DB.runQuery()로 생성된 동적인 html table (Dynamic html tables created from DB.runQuery())
14.1 문제점
무엇을 시도하려고 하는가:
- DB.runQuery()를 통해서 SQL 서버에 쿼리합니다.
- 결과(다중 로우와 컬럼들)를 다음과 같은 Table 구조에 넣습니다:
1 2 3 4 5 6 7 8 |
|
14.2 해결책
DB.runQuery(sql_쿼리_문자열) 메서드는 여러분의 뷰에서 보는 것처럼 table안에 넣을 (List[String], List[List[String]])를 리턴합니다.
1 2 3 4 5 6 7 8 |
|
그리고 스니펫은 CSS Selector Transforms(7.10 참고)를 사용하고 다음과 같습니다:
1 2 3 4 5 6 7 8 |
|
Comments