目前,我正在使用 struts 1 将 HDIV 库的最新版本集成到应用程序中。
它似乎运作良好。但是,在我使用select
标签的某些页面中,我收到以下错误:
java.lang.NoSuchFieldError:在 org.apache.struts.taglib.html.OptionTag.doEndTag(OptionTag.java:225) 在 org.hdiv.taglib.html.OptionTagHDIV.renderOptionElement(OptionTagHDIV.java:124) 过滤。 hdiv.taglib.html.OptionTagHDIV.doEndTag(OptionTagHDIV.java:91)
显然,问题来自option
标签。
我的代码如下:
<html:select property="profilId" styleId="profileCriteria">
<html:option value="">
</html:option>
<html:optionsCollection name="profilesManager" property="profiles" value="ID" label="name" />
</html:select>
HDIV 中是否有办法修复此错误并显示select
选项?
谢谢您的帮助。
编辑:
这个简单的代码也不起作用:
<html:select property="profilId" styleId="profileCriteria">
<html:option value="1">Profile1</html:option>
<html:option value="2">Profile2</html:option>
</html:select>