• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question related to logic:iterate tag

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic