おい。私はこのコントローラーを持っています:
def participated_favourite = {
def user = User.get(1)
def conferenceUser
def original = ConferenceUser.findAllByUser(user)
def temp = ConferenceUser.findAllByUserAndIsFavourite(user, 1) // all conferenceUser filtered by User
def priz = [:]
def subm = [:]
...
...
[temp: temp, priz: priz, subm: subm, orig: original]
}
selectBoxで、「original」(particeded_favourite.gsp内)によって渡された会議のリストを選択できるようにしたいと思います。
どうやってやるの?
<g:select name="" from="${orig.list()}" optionKey="id" value="" />
これは私に空の選択ボックスを与えています。私のデータベースには1つのレコードがあるからです。私は何が間違っているのですか?よろしくお願いします、
編集_____ __ _ __ _ __ _ _ _
私は同じgspで次のことをしています:
<g:each var="it" in="${orig}">
<table cellspacing="2">
<tbody><tr>
<th>Name</th>
</tr>
<tr>
<td class="color1">${it.conference}
</td>
</tr>
</tbody>
</table>
</g:each>
そして、それは値をp+rintingしています。だから私はselectの問題が何であるかわかりません。