我对Struts2 select UI标记有问题。Firefox不显示所选项目。我在JSP中有代码:
<s:select list="allCategories" value="2" listKey="id" listValue="categoryName" name="selectedCategory" key="shortcut.add.category" required="true" />
它呈现为:
<select gtbfieldid="49" name="selectedCategory" id="inputShortcuts_selectedCategory">
<option value="1">23456</option>
<option value="2" selected="selected">Catg1</option>
<option value="3">updated</option>
<option value="6">Category</option>
</select>
当我在IE中打开此操作时,它渲染得很好(默认情况下选择选项Catg1)。但是Firefox(3.6)显示了第一个选项。我该怎么解决?我使用Struts2的xhtml主题。