1 2 3 4 | def mlist = { if(!params.max) params.max = 5 [airportList:Airport.list(params)] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 | <% response.setContentType("application/xhtml+xml")%> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> <link rel="stylesheet" href="${createLinkTo(dir:'css',file:'main.css')}" /> <meta name="layout" content="main" /> <title>Airport List</title> </head> ... </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <table> <tr> <g:sortableColumn property="id" title="Id" /> <g:sortableColumn property="name" title="Name" /> </tr> <g:each in="${airportList}" status="i" var="airport"> <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> <td> <g:link action="show" id="${airport.id}">${airport.id?.encodeAsHTML()} </g:link> </td> <td>${airport.iata?.encodeAsHTML()}<br/> ${airport.name?.encodeAsHTML()} </td> </tr> </g:each> </table> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |