Execute backing bean action on load?

后端 未结 4 1478
盖世英雄少女心
盖世英雄少女心 2020-12-14 12:19

I would like to build a results page for a report export page. This results page must display the status of the export and offer the download of this export.

The exp

4条回答
  •  清歌不尽
    2020-12-14 13:13

    You can send only one response per request. You cannot send two responses (the page itself and the download file) per request. Best what you can do is to use Javascript to submit a (hidden) form after page load.

    window.onload = function() {
        document.formname.submit();
    }
    

提交回复
热议问题