spring webflow update view and download file

699 Views Asked by At

My webapplication contains a view to generate a excel report. The view contains some input fields for specify report generation criterias (min/max time and so on).

I have to validate those input values (max != null && min != null && max > min) and to display error messages on failure. If eveyithing is ok, i can generate the report and return the file.

My flow definition looks like:

<view-state id="posteingangView" view="/WEB-INF/views/report.xhtml" model="reportCriteriaBean">      
    <transition on="generateReport">
        <evaluate expression="reportController.createReport()"/>
    </transition>
</view-state>

At the moment i can input my criterias on the view and get messages on validation failures or the report will be downloaded.

But now the quiestion is:

If the user inputs invalid criterias, the messages will appear, after the user changed the input to correct values and hit the generate button, the view has to be updated (remove failure messages) and download the file.

In normal jsp environment i would refresh the page and insert an iframe to download the report file to achive that.

How does it work in spring webflow + jsf?

Thanks in advance.

0

There are 0 best solutions below