Foren

Request mapping

Yann Mougenel, geändert vor 7 Jahren.

Request mapping

New Member Beiträge: 3 Beitrittsdatum: 08.07.16 Neueste Beiträge
Hello everyone, I'm working on and project and encountering some technical issues.
My portlet has two main options:
  • Saving the user input data, based on aui:form, the submit is done with a actionURL
  • Exporting a zip file: this time with a button using a resourceURL, the controller writes into the requestOutputStream

I decided to combined the two options (since exporting logically implies saving), and wanted for the same submit button to do both the saving and the zip export, yet it's seems way more difficult than it should be emoticon:
The thing is that if my aui:form use the resourceURL, since the controller action is void, the page is not refreshed and the button submit cannot be clicked twice.
And doing the exporting in a ActionMappingcontroller is impossible since the zip generation requires an ResourceResponse.

It kind of blown my mind, I tried various weird things such as refreshing the page via some JS. But it turns out that none of these hacks worked and I kind of out of ideas. Is there any ways to it simply? Or are there hacks I didn't think about?

thank you for your help emoticon
Sincerly,