*
The moose likes Struts and the fly likes Question related to logic:iterate tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Question related to logic:iterate tag " Watch "Question related to logic:iterate tag " New topic
Author

Question related to logic:iterate tag

Vish Murthy
Greenhorn

Joined: Jan 09, 2010
Posts: 6
Hi,

I do not know how to do. Can you please advise me how to resolve? My requirement is

1. I have three columns in the logic:iterate tag contains 10 records currently but it can change dynamically

InputValue, Customer ID (this is a hyper link), Customer Name

2. I want to recognize that record either user enters any value in the InputValue column or click on that link


Example 1

InputValue Customer ID Customer Name
101010 Test1
101011 Test2
101013 Test3

If I click on the second link from customer ID, then I should recognize the complete record (Null, 101011, Test2)

Example 2

InputValue Customer ID Customer Name
101010 Test1
101011 Test2
Input3 101013 Test3


If I enter the value in the third record, then I should recognize the complete record (Input3, 101013, Test3)


My JSP code
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

I'm a little confused about what exactly do you want. If the user enters a value in the textbox, then you don't have any submit button which can send the values to the server. If the user clicks on the link, then there's no query string which will send the values to the server. Do you want us to tell you how to send the values to the server?? That can be done if you wrap each of the row in a form tag

I've written this code with my limited knowledge of Struts 1.x so there might be a better way of doing it. Now what the code does is each row is in a separate form tag. Now when the user enters a value in the text box and clicks on the save button or clicks on the hyperlink, the form is submitted. The value in the text box along with the other two values which are in the hidden fields are submitted to the server. You can then process them in the way you want...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question related to logic:iterate tag
 
Similar Threads
Iterate List on jsp (struts)
Set bean property values
Simple question
How to Populate ArrayList
javax.servlet.ServletException:javax.servlet.jsp.JspException: Cannot find bean: "riga" in any scope