开发者

Grails - Multiple Drop Down Boxes Values

开发者 https://www.devze.com 2023-01-15 22:34 出处:网络
Hey I am learning Grails. I\'ve been playing with it for a while but nothing too serious. And let\'s say I have two drop down boxes, one with the type of animal and the second with the breed. How do I

Hey I am learning Grails. I've been playing with it for a while but nothing too serious. And let's say I have two drop down boxes, one with the type of animal and the second with the breed. How do I give the second box the values?? For example, If I select dog, it should only show me dog breeds, not the cat ones.

开发者_如何学JAVA

Thanks in advance.


One way is to use AJAX to do this (if you don't mind making a server call each time you change the selection on the first dropdown). Take a look here:

http://www.grails.org/AJAX-Driven+SELECTs+in+GSP

0

精彩评论

暂无评论...
验证码 换一张
取 消