MPR Vaadin 7 FileDownloader sizing issue

I have a weird problem with my MPR + Vaadin 7 app. When I click “download”, it resizes the screen incorrectly. First of all, here are images of the Vaadin 7 app:

![Vaadin 7 Before]

Figure 1: Vaadin 7 app before clicking “Download”

![Vaadin 7 After]

Figure 2: Vaadin 7 app after clicking “Download”

Now, how things look with my MPR Vaadin 7 app ( virtually the same code, just some minor tweaks to get things working with MPR ):

![MPR Vaadin 7 Before]

Figure 3: MPR Vaadin 7 app before clicking “Download”

![MPR Vaadin 7 After]

Figure 4: MPR Vaadin 7 app after clicking “Download”

what does Download do ?
Unfortunately the images have low quality and I can’t see anything.
But anyway it’s more important what the application does on Download action.

The key with the pictures is the scrollbars. Figure 2 ( pure Vaadin 7 ) has no scrollbars after download ( while it is hard to see the download file in the image, it is still visible at the bottom left corner ). With Figure 4 ( MPR + Vaadin 7 ), it adds scrollbars after the download is complete (the scrollbars on the side and bottom and the download file on the bottom left are visible enough to show the issue, I hope). Sorry for the unclear images. Didn’t think it would matter because the scrollbars are clear ( while a lot of the other stuff is all fuzzy ).

Anyway, as for what the application is doing, it is, in this case, downloading a CSV file from my server using the FileDownloader feature. These are all Vaadin 7 features, not converted yet to pure Flow.

  1. User clicks download button, which is a normal button extended with FileDownloader ( code below )
  2. FileDownloader code talks to backend, telling backend to create a CSV file, and backend gives CSV file back to frontend. This happens in a overriden getFileDownloadResource()
  3. Generated file downloads to machine.

The point is that the same code works fine in pure Vaadin 7 but does weird things with the sizing in MPR + Vaadin 7. I have a similar issue with the exporter add-on, I assume I am hitting some weird style issue. I am currently using MprTheme with my custom Valo theme, if that helps.

First of all, the customer CsvFileDownloader:

	private class CsvFileDownloader extends FileDownloader {

		private static final long serialVersionUID = -1703929900936413587L;

		public CsvFileDownloader(Resource resource) {

		public Resource getFileDownloadResource() {
			FileResource csvFileResource = null;
			try {"Getting CSV file resource for " + type.toString());
				csvFileResource = generateCsvDataFile();
				if( csvFileResource instanceof FileResource ) {"Got CSV file resource " + csvFileResource.getFilename() );
				} else {
					throw new WMSException( "Error getting CSV file resource for " +
							"downloading data for " + type.toString() );
			} catch (WMSException e) {
				String message = e.getMessage();
				if( message == null || message.trim().isEmpty() ) {
					message = "Error getting data file for export.";
				}"CSV Files", message, Type.ERROR_MESSAGE );

			return csvFileResource;

Secondly, how it is used and added to the form:

	protected FileDownloader buildCsvDownloader() {
		FileResource tempResource = new FileResource(new File(""));

		return new CsvFileDownloader(tempResource);
	protected Button buildDownloadDataCsvBtn() {
		csvDataDownloader = buildCsvDownloader();
		//		csvDataDownloader = new FileDownloader(tempResource);
		//		csvDataDownloader.extend(csvDataDownloaderBtn);

		final Button downloadDataBtn = buildDownloadCsvBtn();

		return downloadDataBtn;

So, do I understand correctly that you don’t add anything on the page as a result of the code execution ?
It’s just your FileDownloader extension implementation .
And nothing else is involved in the action ?

So this code with the custom FileDownloader works fine in V7 but has scrolling issue in MPR, right ?
It looks like a bug.
Could you please create a ticket ?

I don’t think anything else is involved. I suppose I might display error messages and what not, but I don’t in this case as far as I know because no errors.

Yes, code works with pure V7. I made one minor change for my MPR + Vaadin 7 code - since FileDownloader, by it’s very nature, starts a new thread and my code requires the UI and Session, I had to pass the local copies of this down to the FileDownloder stuff ( Vaadin 7 does not have this requirement, but Flow of course does, as per the documentation ). I cannot create a ticket ( not that type of account ), but I can submit a bug report to github if you want me to.

Because of my issues with, I feel like it is some style issue. But that is just a guess. Don’t know what to look for to confirm.

Yes, please submit a [Github issue]

Thanks, and added at Hopefully I gave proper information.