我正在尝试在struts 1中定义<nested:hidden
字段的id,但是使用styleId我收到错误:
我的代码看起来像这样:
<nested:iterate id="otherPayList" name="myPayListForm" property="otherPayList" indexId="rowIndex">
<nested:hidden property="rowStatus"/>
.......
有什么想法吗?
答案 0 :(得分:0)
<nested:iterate>
标记是<logic:iterate>
的扩展名。
<nested:hidden>
的属性是:
相应bean的名称 如果未指定值,则为property。 相应的bean属性(如果 any)必须是String类型。
您遇到错误的原因是因为Struts找不到名为rowStatus
的类型的bean(在<nested:hidden>
标记中)。你没有指定Struts抛出的错误(即异常日志),所以我正在研究你所提供的内容。
如果我理解你,
你想要这样做(只要它嵌套在<nested:iterate>
标签中)。
<nested:hidden name="otherPayList" property="rowStatus" />
对于<nested:hidden>
标记,没有名为id
的属性,并且将id设置为styleId
将不起作用,因为styleId查找id为styleId的CSS声明(即它将如果styleId="thatId"
声明为#thatId { }
),请查找css。
请参阅nested.tld