※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
※HeloController package gralisapp import java.net.Authenticator.RequestorType; class HeloController { def index() { def arr = [ 'title':"Sample Page", 'msg':"お名前は?", 'value':'' ]; arr; } def form() { def arr = [ 'title':"Sample Page", 'msg':"お名前は?", 'value':'' ]; if (request.method=='POST'){ if (params['input'] != null){ arr['value'] = params.input; arr['msg'] = 'ハロー、' + params.input + 'さん!' } } render(view:'index', model:arr) } } ※index.gsp <!DOCTYPE html> <html> <head> <title>Grails Helo</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body {color: #006600;} h1 {background: #99ff99;font-size: 14pt;padding: 5px;} h2 {font-size: 12pt; font-weight: bold;} p {font-size: 10pt;} </style> </head> <body> <h1>${title}</h1> <h2>${msg}</h2> <g:form controller="helo"> <g:textField name="input" value="${value}"></g:textField> <g:actionSubmit value="送信" action="form" /> </g:form> </body> </html>
<< 前へ |