This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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

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
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">
<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>

Rick Hightower
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:
subject: How to Index text box inside the logic:iterate
It's not a secret anymore!