*
The moose likes Struts and the fly likes How to Index text box inside the logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to Index text box inside the logic:iterate" Watch "How to Index text box inside the logic:iterate" New topic
Author

How to Index text box inside the logic:iterate

vikram nalagampalli
Ranch Hand

Joined: Oct 08, 2001
Posts: 91
Hi all,
This is what i am trying to achieve, Based on user choice i am generating that many text boxes for the user to enter certain values. The values that user entered in the text boxes need to be captured and evaluated. I am not able to figure out how i can capture this data in textboxes which are indexed in my action class. My logic tag is as follows
if i look at the (view Source) in html this is how the below code is seen
Bean[0].testValues
..
...
....
Bean[n].testValues
where "testValue" is the name of my textbox i am trying to capture. I am wondering if i need to do something different in my MachineDataViewBean. Currently it only have getter setter methods for "testValues"
<logic:iterate id="blisterView" name="MachineDataViewBean" property="blisterList" scope="session">
<tr>
<td height="24" width="25%" class="odd"><bean:write name="blisterView" property="cavityName"/> </td>
<td height="24" width="40%" class="odd"><so:text property="testValues" viewBean="MachineTestViewBean" indexed="true"></so:text> </td>
<td height="20" width="25%" class="odd"><bean:write name="MachineTestViewBean" property="testResult"/></td>
</tr>

</logic:iterate>
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
The indexed attribute of html:text is used to render indexed property names. The indexed attribute only works in the context of the logic:iterate tag.
<html:text property="foo" indexed="true" ...


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Index text box inside the logic:iterate
 
Similar Threads
Problem Passing Parameter values to action
How to add new row in response page
Problem in hiding the row of data
logic iterate
Logic:iterate How to break the loop for a certain value in collection