I want to ask if there is a "Save As" dialog in Ext Js Modern? So I can save an Object from a web Page into a local file.
Another solution depends on the Portlet Concept:
AjaxController (Ext.app.Controller) you call the function doStandardSubmit
location.href = this.url + '&operation=download¶m1=' + param1val;
in the Backend of the portlet (Java) you write the endPOint method :
@EndpointMethod(encode = false) public void download(DataAccessor dataAccessor, AuthenticationGenerationConfiguration configuration, @RequestKey String param1, ResourceResponse response) throws IOException {
OutputStream outputStream = response.getPortletOutputStream(); try {
// Adjusting content type
response.setContentType("text/plain");
response.setProperty("Content-Disposition", "attachment; filename=\"" + FILENAME + "\"");
outputStream.flush();
} finally {
outputStream.close();
}
}