问题:我从数据库检索数据出来,要显示到jsp的select下拉菜单中
但问题是-----〉我在数据库中筛选出来的数据是按照id已经排好序放在hashmap中的,但从select显示出来的,确是随机的,并没排好
有经验的进来看看<html:select property="gpname" onclick="document.getElementById('gname').value=this.options[this.selectedIndex].value;" size="5" style="width=100%;height=300">
<html:options collection="gpList" property="key" labelProperty="value"/>
</html:select>
但问题是-----〉我在数据库中筛选出来的数据是按照id已经排好序放在hashmap中的,但从select显示出来的,确是随机的,并没排好
有经验的进来看看<html:select property="gpname" onclick="document.getElementById('gname').value=this.options[this.selectedIndex].value;" size="5" style="width=100%;height=300">
<html:options collection="gpList" property="key" labelProperty="value"/>
</html:select>
你这一提醒确实 hasn是无序的 但是我想传两个字段过去 还有没有能放两个字段的有序容器?