I already searched the forum for comparable topics, but in none of them was a solution available.
I'm generating an indexed selectbox for every item in a list (of users). By doing this I want to be able to "evaluate" every user according to the selected values from their respective selectbox. So far I am able to generate the select boxes, but somehow it doesn't see the property (for the selectbox) as the indexed attribute. The followinng code generates the required list with the selectboxes.
The only problem is that the selectboxes are not correctly indexed. Normally you would expect something like this: html:select property="formbean.evalId[i]" where evalId contains the index number. But what I get is html:select property="formbean.evalId" where in this case the formbean itself gets indexed. I implemented the property in the formbean as well as a String as a List but I haven't solved the problem yet. Any ideas on this?
Originally posted by Marc Peabody: <bean efine name="formbean" property="evalId" id="evalId"/> <c:forEach.... ... <html:select name="evalId" indexed="true"> ...
Thanks for your reply Marc. One problem: html:select property is required attribute. so what do I put there then?
Update: When I use nested tag for selectbox, it's getting rendered as <select name="evalId"> where evalId gets filled with all the values gathered from all the selectboxes that are generated. So this way I can go further. And the problem I had with indexed formbean appears to be the normal outcome when using indexed selectbox. The question remains on getting the data if it's supposed to be that way (since evalId returns null). [ September 29, 2005: Message edited by: Ergin Er ]