• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question related to logic:iterate tag

 
Vish Murthy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic