countrySelect

Purpose

创建一个HTML 并包含国家名称的选择框.

示例

// create a select for all countries
<g:countrySelect name="user.country" value="${country}"
          noSelection="['':'-Choose your age-']"/>

// create select from a list of ISO3166_3 country codes <g:countrySelect name="user.country" from="['gbr', 'usa', 'deu']" value="${user?.country}"/>

// create country select with internationalized labels // expected properties in messages.properties: // countryname.gbr=My United Kingdom // countryname.usa=Home of the brave // countryname.deu=Germany <g:countrySelect name="user.country" from="['gbr', 'usa', 'deu'] valueMessagePrefix="countryname" />

描述

这个类提供一个选择框和所有 ISO3166_3 国家代码的option , 或者国家代码的list.

ISO 三个字母应格式化为小写字母.

属性

来源

Show Source