开发者

<nested:hidden> field missing id

开发者 https://www.devze.com 2023-01-21 20:02 出处:网络
I\'m trying to define a id of a <nested:hidden filed in struts 1, but with styleId i receive a error:

I'm trying to define a id of a <nested:hidden filed in struts 1, but with styleId i receive a error:

my code looks something like this:

<nested:iterate id="otherPayList" name="myPayListForm" property="otherPayList"  indexId="rowIndex">

<nested:hidden property="rowStat开发者_开发知识库us"/>

.......

Any idea ?


The <nested:iterate> tag is an extension for <logic:iterate>.

The property of <nested:hidden> is:

the name of the corresponding bean property if value is not specified. The corresponding bean property (if any) must be of type String.

The reason you have an error is because Struts can't find a bean of typed to name rowStatus (in the <nested:hidden> tag). You have not specified what errors Struts is throwing (ie, exception logs) so I'm working on what you've given.


If I understand you properly,

you want to do this (provided it's nested in the <nested:iterate> tag).

<nested:hidden name="otherPayList" property="rowStatus" />

For <nested:hidden> tag, there is no attribute called id and setting the id to styleId won't work as styleId looks for a CSS declaration with id matching styleId (i.e. it will look for a css, if styleId="thatId" declared #thatId { }).

See Struts Documentation on nested.tld

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号