I need to know how to call a Struts2 action from a button that does not submit the form. When I click on the button it should call a Struts2 action that will make a web service call to a SSRS server (SQL Server Reporting Services). The server sends the report to a stream that I put in the Response. It then displays a popup to download the PDF file. With JSF it's easy, the commandButton provides an "action" attribute. I'd like the equivalent of this:
<h:commandButton id="editButton" value="Edit" action="#{myBean.edit}" />
public class MyBean {
public String edit() call web service, put the stream on the response return "OK"}}
How in Struts2? Ajaxa? JQuery? Dojo? I am new to Struts2 and Ajax, I do a lot of JSF.
thank you