Search in sources :

Example 1 with WebExportDisplay

use of com.haulmont.cuba.web.filestorage.WebExportDisplay in project cuba by cuba-platform.

the class DomainProvider method run.

@Override
public void run() {
    DomainDescriptionService service = AppBeans.get(DomainDescriptionService.NAME);
    String description = service.getDomainDescription();
    ExportDisplay exportDisplay = AppBeans.get(ExportDisplay.class);
    ((WebExportDisplay) exportDisplay).setNewWindow(true);
    exportDisplay.show(new ByteArrayDataProvider(description.getBytes(StandardCharsets.UTF_8)), "domain-description.html", ExportFormat.HTML);
}
Also used : ByteArrayDataProvider(com.haulmont.cuba.gui.export.ByteArrayDataProvider) WebExportDisplay(com.haulmont.cuba.web.filestorage.WebExportDisplay) ExportDisplay(com.haulmont.cuba.gui.export.ExportDisplay) DomainDescriptionService(com.haulmont.cuba.core.app.DomainDescriptionService) WebExportDisplay(com.haulmont.cuba.web.filestorage.WebExportDisplay)

Aggregations

DomainDescriptionService (com.haulmont.cuba.core.app.DomainDescriptionService)1 ByteArrayDataProvider (com.haulmont.cuba.gui.export.ByteArrayDataProvider)1 ExportDisplay (com.haulmont.cuba.gui.export.ExportDisplay)1 WebExportDisplay (com.haulmont.cuba.web.filestorage.WebExportDisplay)1