0
내 클래스 radion 버튼을 저장하는 방법 :Grails의에서
package com
class Cafe {
String cafeteriasurvey
static constraints = {
cafeteriasurvey nullable:true
}
}
& form.gsp을 : 라디오 버튼을 저장하는 방법을
<%@ page import="com.Cafe" %>
<style>
h1{
text-align:center;
Color:#680000;
}
h2{
text-align:center;
font-weight:normal;
}
p{
font-style:Arial;
background-color:#b2b2b2;
}
.wrapper{
text-align:center;
}
.save{
text-align:center;
}
</style>
<h1>Cafeteria Survey</h1><br>
<h2 style="Color:#87212e">Caterer:Abhiruchi Caterers</h2><br>
<p>1.How would you rate for overall 'Breakfast' food items?</p><br>
<g:radioGroup name="cafeteriasurvey"
values="['Muslim', 'Hindu', 'Christian', 'Buddhist']"
labels="['Muslim', 'Hindu', 'Christian', 'Buddhist']"
value="${cafeInstance?.cafeteriasurvey}">
<p>${it.label}: ${it.radio}</p>
</g:radioGroup>
모든 솔루션을 제공합니다.
이것은 거의 grails 질문에 가깝지 않습니다. HTML을 사용하여 항목을 게시 하시겠습니까? 양식? 제출 URL이있는 양식 : form controller = "something"action = "someAction"> radioButton SUBMIT 버튼. grails 애플리케이션을 시도하기 전에 몇 가지 기본 html 파일을 먼저 공부하십시오. – Vahid