Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining the theme for a super class of a view does not work #3384

Closed
Artur- opened this issue Jan 24, 2018 · 4 comments
Closed

Defining the theme for a super class of a view does not work #3384

Artur- opened this issue Jan 24, 2018 · 4 comments

Comments

@Artur-
Copy link
Member

Artur- commented Jan 24, 2018

@Theme(Lumo.class)
public class AbstractView extends Div {
@Route("Upload")
public class UploadView extends AbstractView {

Fails on deployment with

com.vaadin.flow.server.InvalidApplicationConfigurationException: Found configuration annotations that will not be used in the application. 
Move the following annotations to a single route or the top RouterLayout of the application: 
Non RouterLayout: test.AbstractView contains: Theme
@caalador
Copy link
Contributor

Neither AbstractView nor UploadView is a RouterLayout nor do they define @Route.

@Artur-
Copy link
Member Author

Artur- commented Jan 24, 2018

Added missing @Route, which is present on the view class

@pleku
Copy link
Contributor

pleku commented Jan 24, 2018

Why is not AbstractView actually abstract ? We could skip the error for abstract class and interface and instead just log on trace level.

The use case for having just one location for the @Theme for all views in the app is very valid. Same kind of goes for the PageConfigurator also. But is it too cumbersome to have a RouterLayout just for that ?

@pleku
Copy link
Contributor

pleku commented Feb 1, 2018

Should also update our flow-component-base to apply @Theme(Lumo.class) after this to make it apply the theme for all of out demos.

@caalador caalador self-assigned this Feb 1, 2018
@pleku pleku closed this as completed Feb 2, 2018
@pleku pleku added this to the 1.0.0.alpha19 milestone Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants