Hi,

try something like this and see

<table>   
        <struts2:iterator value="Questions" status="status">
<tr> <td>Question <struts2:property value="questionID" /><struts2:property
value="route" /></td>
        </tr>
    <tr>
        <td>

        <struts2:textfield id="${status.index}" tooltip="Please enter text here." 
>
        </struts2:textfield>
        </td>
    </tr>
    </struts2:iterator>
    </table>


Thanks,

Nuwan


Subhani Shaik wrote:u
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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to