aspose file tools*
The moose likes Struts and the fly likes need to send value along with button click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "need to send value along with button click" Watch "need to send value along with button click" New topic
Author

need to send value along with button click

Sriram Sharma
Ranch Hand

Joined: Apr 12, 2006
Posts: 97
Hi All,

I have a JSP with following code snippet



This code has edit button for each message. And once the edit button is clicked, editMessage.jsp is called and based on the messageId, I would display the message for amending.
Now, I have to send the messageId of respective record for that specific edit button click.
I am not sure as how this messageId could be tagged for the specific edit click.
Please help!

Regards,
Sriram
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Sriram,

Question is bit unclear to me but if i take my assumption then you want to send the message id.

You can get it in the form object or you can send it into the hidden parameter.

Regards
Jatan

Sriram Sharma
Ranch Hand

Joined: Apr 12, 2006
Posts: 97
Hi Jatan,

Thanks for the info. The catch is inside the iterate part is what I feel.
I am trying to pass the value as a part of hidden parameter.
The stuff works when I work in debug mode.
But it fails when I run the web application normally.

What happens is, when I run in debug mode the message id comes out correctly.
But, when I run the application in normal mode, only the message id of the first record is getting passed irrespective of any record's button click.
Even if I press the approve button of 5th record, message id of the 1st record only goes to the action class.

Code of the JSP is here below... could someone help me out please???



Regards,
Sriram
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need to send value along with button click