Struts2 Select UI标记:在Firefox中使用选定项呈现时出现问题
我对Struts2 select UI标记有问题。Firefox不显示所选项目。我有JSP中的代码:Struts2 Select UI标记:在Firefox中使用选定项呈现时出现问题,firefox,xhtml,struts2,Firefox,Xhtml,Struts2,我对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=
<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>
23456
Catg1
更新
类别
当我在IE中打开此操作时,它会呈现良好效果(默认情况下选择选项Catg1)。但Firefox(3.6)将第一个选项显示为选中状态。我如何解决它?我使用Struts2的xhtml主题。您生成的HTML在Firefox 3.6.11中为我正确显示。您是否确认没有查看页面的缓存版本?我看到正在将
gtbFieldDid
添加到渲染输出中。这不是谷歌工具栏上的吗?也许这是在干扰什么
我看不出您的select元素有任何明显的错误,会阻止它在任何浏览器中正常工作。谢谢!真的,这是虚惊一场。我重新部署了应用程序,它工作正常,谢谢!