File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Error in action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error in action class" Watch "Error in action class" New topic

Error in action class

M sallu
Ranch Hand

Joined: Dec 13, 2009
Posts: 42
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?

Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

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:

I agree. Here's the link:
subject: Error in action class
It's not a secret anymore!