• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Select and trigger an action through a link, doesn't populate the value

 
Anand Krishnanandam
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my jsp page there is a <s:select tag and there links that triggers three different actions.
I want the selected option in one of the actions.

For example: there are accept, reject and review links to respective actions. And a select tag for comments to be sent to accept action.

I don't see the selected value being populated in the Accept action.



There is a getter and setter for commentId in the accept action which is not being populated when I select and then click the Accept link

I even tried



Please let me know where I'm going wrong.
Thanks,
Nithya.
 
Tom Rispoli
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the problem with your first method is that when you click on the links you created, the form does not get submitted, so the value of the select tag isn't part of the request.

The problem with your second method is that your parameter is being set before the page is displayed to the user (when the jsp is run), so the parameter won't change when a user selects a different value in the check box.

If you want to use links rather that submitting the form I think you'll have to use javascript to append the parameter to the URL for the link.
 
Anand Krishnanandam
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for explanation.. That worked perfect.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic