wood burning stoves 2.0*
The moose likes Struts and the fly likes question about struts2 and links Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "question about struts2 and links" Watch "question about struts2 and links" New topic

question about struts2 and links

Jordan Smith
Ranch Hand

Joined: Apr 06, 2008
Posts: 89

i have a form with 3 links.

i would like to submit the form content by the user clicking on the link. as well, i the link has to forward a new page that will accept videoId by the link.
for example:

what is the way to submit the form by clicking on a link and sending params?

Abhilash Chander
Ranch Hand

Joined: Oct 18, 2009
Posts: 39
You are telling the page to go in two diffrent directions which is tough. why don't you pass the link values as <s:hidden> in the form.
Jordan Smith
Ranch Hand

Joined: Apr 06, 2008
Posts: 89
because i generate the links in iterator and each link has a different video id:
David Newton

Joined: Sep 29, 2008
Posts: 12617

Use JavaScript.
It is sorta covered in the JavaRanch Style Guide.
subject: question about struts2 and links
Similar Threads
Nested Form problem with IE. How to avoid using struts?
how do i use html:select to forward to different pages?
sx:submt and s:url combination doesn't work
invoke a link in JS ?
Select and trigger an action through a link, doesn't populate the value