0

目前,我正在使用 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="">
    &nbsp;
    </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>
4

1 回答 1

3

检查您是否使用了正确的 Struts 库版本。看来您使用的是 HDIV 不支持的 Struts 版本。Gotzon Illarramendi(HDIV 团队)

于 2015-12-09T08:47:32.577 回答