• 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

Error in action class

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP where I am showing date and description from database. Every entry has a unique id, but I am not showing on the page(showing checkbox)
These entries are thrown using a "logic:iterate", so the number of rows is always changing based on entries.
Now these fields are shown as a text field so that the user can also update the date or description. A checkbox is to the left so the
user can select what all values they want to update. Remember the logic:iterate above, the checkbox has to be defined using name and
cannot have id.


My error is that if I have three rows and I want to update third row and select third checkbox. My Action class is retrieving the first row date and desc.
How can I edit my action class to retrieve the value against the checked checkboxes?


 
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are way off in what you are trying to accomplish. To begin with, you aren't using Struts tags. Here is a little JSP to show how your elements should be handled:


 
You may have just won ten million dollars! Or, maybe a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic