flow-and-components-documentation icon indicating copy to clipboard operation
flow-and-components-documentation copied to clipboard

"Enabling Push in your application" chapter is misleading

Open mvysny opened this issue 4 years ago • 0 comments

https://vaadin.com/docs/v14/flow/advanced/tutorial-push-configuration.html

The chapter suggests that

To enable server push, you need to define the push mode either in the deployment descriptor or with the @Push annotation for the main layout or individual views of your application.

However, that is not true - the Push annotation can only be used in AppShell or the root layout as proven by the customer who got the following exception:

"com.vaadin.flow.server.InvalidApplicationConfigurationException: Found configuration annotations that will not be used in the application.
Move it to a single route/a top router layout/web component of the application.
Non parent Route target:

Please review the documentation, and clarify where exactly the Push annotation can be used.

mvysny avatar Dec 08 '20 12:12 mvysny