Hi all, I have a <nested:iterate> where I am iterating
over a list of objects. Each object has a property “label”, which
is being displayed as a textbox. Now, I have a hidden field “hdnField”, for
each row of object. I want to call a _javascript_ function
“fnUpdate” onChange of the textbox to update the hidden field. So, I need to pass the index (row number) of the particular
row to the _javascript_ function, so that, the particular hidden field for the
particular row can be updated. I am trying something as follows: <nested:iterate id="functionalities" name="functionalities"
indexId="indxFunc"> <nested:text styleClass="label"
maxlength="100" name="functionalities"
property="label" indexed="true" name="indxFunc"/>');”/> <nested:hidden
name="functionalities" property="hdnField"
indexed="true"/> </nested:iterate> (The above code snippet is also in the attached .txt file,
in case there is a problem in reading). But it is not identifying “indxFunc” for
“nested:text” in “<nested:iterate>”. It works fine for static tags like
“<img>” or “<a>” in “<nested:iterate>”,
eg. <img src=""
name="indxFunc"/>');" /> Any way to solve the problem? A work-around is to update the hidden field in each row
just before submitting the form. But I was wondering if the problem can be
solved the way I am trying. Thanks for your time, Anjishnu.
|
<nested:iterate id="functionalities" name="functionalities" indexId="indxFunc">
<nested:text styleClass="label" maxlength="100" name="functionalities" property="label" indexed="true" onChange=fnUpdate('<bean:write name="indxFunc"/>');/> <nested:hidden name="functionalities" property="hdnField" indexed="true"/> </nested:iterate>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]