简体   繁体   English

grails countrySelect标签-默认值

[英]grails countrySelect tag - default value

The countrySelect tag says it has the following attribute: countrySelect标记表示它具有以下属性:

  • default (optional) - The ISO code of the default country to display if value is not set 默认(可选)-如果未设置值,则显示的默认国家/地区的ISO代码

I removed the value attribute altogether, and still can't get it to display "United States" as the default selection when I do: 我完全删除了value属性,但在执行以下操作时仍然无法将其显示为“美国”作为默认选择:

  <g:countrySelect name="ship.country" default="usa" />

     or

  <g:countrySelect name="ship.country" default="United States" />

What am I doing wrong .. what else should I try? 我在做什么错..我还应该尝试什么?

Thanks 谢谢

<g:countrySelect name="ship.country" default="usa" />

Must work! 必须工作! i just tested in my grails 1.3.7 ! 我刚刚在grails 1.3.7中进行了测试! and it worked perfectly! 而且效果很好!

What is the version of grails that you re using? 您正在使用的grails版本是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM