Changes since 24.8.0.alpha12
Breaking changes
-
Add setter helpers to DownloadEvent and new method for inline
Commit · Pull requestRefactors the DownloadEvent to be a normal class. Removed the getters for file name, type and size and add setters instead that are basically helper methods for setting various attributes to a response. Adds inline method so that you can call DownloadHandler.forFile(new File("path/to/file")).inline() and the download will be inlined onto page.
-
Add setContentLengthLong to VaadinResponse
Commit · Pull requestAdd the setContentLengthLong method to VaadinResponse.
New features
-
Make an Executor available through VaadinService
Commit · Pull requestProvides access to an Executor instance from VaadinService to submit asynchronous tasks. The default single-threaded executor can be replaced by a custom instance by registering it with a VaadinServiceInitListener. The spring add-on tries to detect an existing TaskExecutor bean, otherwise it falls back to the default executor. To provide a specific TaskExecutor bean, different from the application default, the bean definition can be named VaadinTaskExecutor or be annotated with
@VaadinTaskExecutor
.
Fixes
-
Do not set Content-Disposition for null file name
Commit · Pull request -
Improve javadoc and handle unknown content length as -1
Commit · Pull requestBetter explains the methods in DownloadEvent, TransferContext, fromInputStream factory methods in download handler as well as explains -1 for unknown length and handles it accordingly.
-
Inline download in data html elements
Commit · Pull requestAutomatically sets pre-defined download handlers to inline in data html components.
-
Call successhandler from access block
Commit · Pull requestRunning successhandler callback from access so that UI can be updated directly based on the received data.
-
Remove faulty method
Commit · Pull requestremove sendUploadResponse as ResponseHandled is used and should be the one to override for custom responses.
-
Rename allowInert for ElementRequestHandler
Commit · Pull requestRename allowInert to isAllowInert
-
Add IOException to handlers signature
Commit · Pull request -
Read PageTitle annotation from application-defined class
Commit · Pull request · IssueIf a route component instance is proxied by a DI frameworks the PageTitle annotation from the concrete class might not be accessible because it is not inheritable. This change tries to read the annotation from the application-defined class instead of using the route instance class directly.
-
Update JavaDocto be more descriptive
Commit · Pull requestUpdate overload JavaDoc to have description of difference in the first sentence.
-
Add error message and update javadoc on DownloadResponse
Commit · Pull requestAdd possibility to give an error message to the DownloadResponse. Add information on stream handling for DownloadResponse so it is clear that the one using the response is responsible for closing stream.
-
Make addTransferProgressListener protected
Commit · Pull requestaddTransferProgressListener is redundant because we already expose shortcut fluent methods and factory methods where the listener is present. if needed, custom handlers extending the abstract class can use this method in constructors or make it public.
-
Do not lock the session while transferring content
Commit · Pull requestFor common cases let's not lock the session for data transfer and assume that this locking can be done in a custom handler, if required.
-
Update read revision before applying changes
Commit · Pull requestThe logic that determines whether a computed signal or effect should be run again is triggered from a change observer. If the value used by that change observer was already captured in the read transaction, then the old value would be used instead of the new one when the value is changed which would mean that the change remains undetected.
-
Check DisabledUpdateMode and isVisible in element request validation
Commit · Pull requestThis takes into account the DisabledUpdateMode parameter of ElementRequestHandler and isVisible property of the owner element when validating the request in StreamRequestHandler.