|
|
|
I have just seen the same thing, but it only seems to be a problem when you use the optionKey attribute. If I don't use optionKey and supply an instance of the object from the list, it works fine. i.e.
from="${myobjectlist}" value="${myobject}" I get a ClassCastException because I think it is expecting value attribute to be of the same type as optionKey attribute, so you cannot pass the whole object to value. So I switched to from="${myobjectlist}" optionKey="id" value="${myobject.id}" That gets rid of the ClassCastException, but there is no "selected" attribute on any of the resulting <option> tags in the HTML. I tried it wil hard-coded id values too any still no joy. Hope that helps, Jason (BTW, this is my first post in this forum, and can I say that Grails ROCKS!) |
|||||||||||||||||||||||||||||||||||||||||||||||||
Can you show a snippet of your relevant code? I can't reproduce the problem.
Thanks.
jb