Hi, I have the following code...
<table> <struts2:iterator value="Questions"> <tr> <td>Question <struts2:property value="questionID" /><struts2:property value="route" /></td> </tr> <tr> <td> <!-- How to give dynamic name to this text box? This answer is needed in next pages. --> <struts2:textfield id="THIS NAME SHOULD BE DYNAMIC. I WANT THIS TO BE 'questionID' VALUE" tooltip="Please enter text here." > </struts2:textfield> </td> </tr> </struts2:iterator> </table> Here, 'Questions' is a class that contains 'questionID' as a field. And this returns 'List' over here. When i am iterating i'll get single item from the list. And my textfield name should be as the value of questionID (this is the key). I want something like this... <struts2:textfield id="Qn1"/> <struts2:textfield id="Qn2"/> <struts2:textfield id="Qn3"/> ... so on Regards, Subhani. -- View this message in context: http://www.nabble.com/How-to-give-a-text-field-name-dynamically--tf4358482.html#a12421314 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]