HTML

<select class="form-control input-sm css_form_input" name="sjbhtgl.sjly" > 
            <option value="">--请选择--</option>
            <% for(sjly in sjlyList!){ %>
            <option class="css_form_label" value="${sjly.dictid!}" ${escapeXml(sjbhtgl.sjly!)== sjly.dictid ?'selected="selected"':''}>${escapeXml(sjly.name!)}</option> 
            <%}%>                     
</select>

Controller(add,edit,view都加)

 

  	List<Record> sjlyList =	SjbhtglService.service.find_by_sjlyList();
	setAttr("sjlyList", sjlyList);

SQL(view无需转字典,直接查编码)

<sql id="view">
		<![CDATA[ 
		select m.* from  sa.sjjk_sjzl m 
		
		where m.sjzlno = ?
    	]]>
</sql>