If you use the nightly build, you can do this using the indexed=true property,
without using scriptlets.
Dave
[EMAIL PROTECTED] on 08/08/2001 08:30:56 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc: (bcc: David Hay/Lex/Lexmark)
Subject: dynamically setting the html:select property
Hi there,
inside an iterate tag I'm creating multiple textboxes and selects.
to unqiuely identify each item I am appending the index from the iteration
(idx) to the name; e.g.
<input type="text" name="rate#<bean:write name="idx"/>" maxlength="10"
value="<bean:write name="limitBean" property="rate" />">
I also need to do this for drop down selections. However I'm having some
problems with naming the selects dynamically.
<html:select property="lookup#<%= idx %>" >
didn't work, the result was <select name="lookup#<%= idx %>" >
I also tried setting an attribute on my form
<jsp:setProperty name="coverDetailsForm" property="lookupIdx" value="<%=
idx %>" />
<html:select property="coverDetailsForm.lookupIdx" value="
<%= limitBean.getLimit().getLookupDataId().toString() %>" >
<html:options name="limitBean" property="values"
labelName="limitBean" labelProperty="labels"/>
</html:select>
the result was <select name="coverDetailsForm.lookupIdx" >
I've had to resort to scriptlets, please help..
thanks James