フォームを送信しないボタンから Struts2 アクションを呼び出す方法を知る必要があります。ボタンをクリックすると、SSRS サーバー (SQL Server Reporting Services) への Web サービス呼び出しを行う Struts2 アクションが呼び出されます。サーバーは、Response に入れたストリームにレポートを送信します。次に、PDF ファイルをダウンロードするためのポップアップが表示されます。JSF では簡単です。commandButton は「action」属性を提供します。これと同等のものが欲しい:
<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"}}
Struts2 ではどうですか? アヤクサ?JQuery? 道場?私は Struts2 と Ajax は初めてで、多くの JSF を行っています。
ありがとうございました