Vaadin 10+: How can I disable Router?
I'm trying to migrate a Vaadin 8 application to Vaadin 11.
I'm trying to use VaadinServlet and UI:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = TestUi.class)
public class TestServlet extends VaadinServlet {
}
public class TestUi extends UI {
@Override
protected void init(VaadinRequest request) {
add(new Label("Test"));
}
}
I get:
Can / do I have to disable Router?
I double checked, there is no class annotated with @Route.
Update: The migration guide states:
So I am still confused about why and where I am supposed to put the Route annotation in this scenario.
vaadin vaadin10
add a comment |
I'm trying to migrate a Vaadin 8 application to Vaadin 11.
I'm trying to use VaadinServlet and UI:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = TestUi.class)
public class TestServlet extends VaadinServlet {
}
public class TestUi extends UI {
@Override
protected void init(VaadinRequest request) {
add(new Label("Test"));
}
}
I get:
Can / do I have to disable Router?
I double checked, there is no class annotated with @Route.
Update: The migration guide states:
So I am still confused about why and where I am supposed to put the Route annotation in this scenario.
vaadin vaadin10
What's the reason that you want to disable router? I don't think it's possible. If you do not want to have navigation by URLs you will need at least the@Route("")
default URL.
– Steffen Harbich
Nov 21 at 7:20
I want to upgrade from 8 with the least amount of changes possible. The old app didn't use Navigator, so I thought Routes might be optional, too. I will try to make it work with@Route("")
.
– Reto Höhener
Nov 21 at 7:38
2
"I want to upgrade from 8 with the least amount of changes possible. " <-- I need to give you slight warning about this. There are some major changes between 8 and 10. So "upgrade" is in most cases a wrong term. So be prepared to refactor things. It depends on your application. If you have very simple application, which does not have any add-ons, any custom client side, only basic components used, no custom theming etc. it might be possible to upgrade with minimal changes. Otherwise it is not possible.
– Tatu Lund
Nov 21 at 9:33
Thank you Tatu. I should have said migrate, I guess. I did say 'least amount possible' however, not 'minimal changes' ;). I did read the migration guide and have already spent several days migrating many parts of the application. Should have started with the navigation part.
– Reto Höhener
Nov 21 at 10:38
add a comment |
I'm trying to migrate a Vaadin 8 application to Vaadin 11.
I'm trying to use VaadinServlet and UI:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = TestUi.class)
public class TestServlet extends VaadinServlet {
}
public class TestUi extends UI {
@Override
protected void init(VaadinRequest request) {
add(new Label("Test"));
}
}
I get:
Can / do I have to disable Router?
I double checked, there is no class annotated with @Route.
Update: The migration guide states:
So I am still confused about why and where I am supposed to put the Route annotation in this scenario.
vaadin vaadin10
I'm trying to migrate a Vaadin 8 application to Vaadin 11.
I'm trying to use VaadinServlet and UI:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = TestUi.class)
public class TestServlet extends VaadinServlet {
}
public class TestUi extends UI {
@Override
protected void init(VaadinRequest request) {
add(new Label("Test"));
}
}
I get:
Can / do I have to disable Router?
I double checked, there is no class annotated with @Route.
Update: The migration guide states:
So I am still confused about why and where I am supposed to put the Route annotation in this scenario.
vaadin vaadin10
vaadin vaadin10
edited Nov 21 at 11:09
asked Nov 20 at 22:49
Reto Höhener
1,50342043
1,50342043
What's the reason that you want to disable router? I don't think it's possible. If you do not want to have navigation by URLs you will need at least the@Route("")
default URL.
– Steffen Harbich
Nov 21 at 7:20
I want to upgrade from 8 with the least amount of changes possible. The old app didn't use Navigator, so I thought Routes might be optional, too. I will try to make it work with@Route("")
.
– Reto Höhener
Nov 21 at 7:38
2
"I want to upgrade from 8 with the least amount of changes possible. " <-- I need to give you slight warning about this. There are some major changes between 8 and 10. So "upgrade" is in most cases a wrong term. So be prepared to refactor things. It depends on your application. If you have very simple application, which does not have any add-ons, any custom client side, only basic components used, no custom theming etc. it might be possible to upgrade with minimal changes. Otherwise it is not possible.
– Tatu Lund
Nov 21 at 9:33
Thank you Tatu. I should have said migrate, I guess. I did say 'least amount possible' however, not 'minimal changes' ;). I did read the migration guide and have already spent several days migrating many parts of the application. Should have started with the navigation part.
– Reto Höhener
Nov 21 at 10:38
add a comment |
What's the reason that you want to disable router? I don't think it's possible. If you do not want to have navigation by URLs you will need at least the@Route("")
default URL.
– Steffen Harbich
Nov 21 at 7:20
I want to upgrade from 8 with the least amount of changes possible. The old app didn't use Navigator, so I thought Routes might be optional, too. I will try to make it work with@Route("")
.
– Reto Höhener
Nov 21 at 7:38
2
"I want to upgrade from 8 with the least amount of changes possible. " <-- I need to give you slight warning about this. There are some major changes between 8 and 10. So "upgrade" is in most cases a wrong term. So be prepared to refactor things. It depends on your application. If you have very simple application, which does not have any add-ons, any custom client side, only basic components used, no custom theming etc. it might be possible to upgrade with minimal changes. Otherwise it is not possible.
– Tatu Lund
Nov 21 at 9:33
Thank you Tatu. I should have said migrate, I guess. I did say 'least amount possible' however, not 'minimal changes' ;). I did read the migration guide and have already spent several days migrating many parts of the application. Should have started with the navigation part.
– Reto Höhener
Nov 21 at 10:38
What's the reason that you want to disable router? I don't think it's possible. If you do not want to have navigation by URLs you will need at least the
@Route("")
default URL.– Steffen Harbich
Nov 21 at 7:20
What's the reason that you want to disable router? I don't think it's possible. If you do not want to have navigation by URLs you will need at least the
@Route("")
default URL.– Steffen Harbich
Nov 21 at 7:20
I want to upgrade from 8 with the least amount of changes possible. The old app didn't use Navigator, so I thought Routes might be optional, too. I will try to make it work with
@Route("")
.– Reto Höhener
Nov 21 at 7:38
I want to upgrade from 8 with the least amount of changes possible. The old app didn't use Navigator, so I thought Routes might be optional, too. I will try to make it work with
@Route("")
.– Reto Höhener
Nov 21 at 7:38
2
2
"I want to upgrade from 8 with the least amount of changes possible. " <-- I need to give you slight warning about this. There are some major changes between 8 and 10. So "upgrade" is in most cases a wrong term. So be prepared to refactor things. It depends on your application. If you have very simple application, which does not have any add-ons, any custom client side, only basic components used, no custom theming etc. it might be possible to upgrade with minimal changes. Otherwise it is not possible.
– Tatu Lund
Nov 21 at 9:33
"I want to upgrade from 8 with the least amount of changes possible. " <-- I need to give you slight warning about this. There are some major changes between 8 and 10. So "upgrade" is in most cases a wrong term. So be prepared to refactor things. It depends on your application. If you have very simple application, which does not have any add-ons, any custom client side, only basic components used, no custom theming etc. it might be possible to upgrade with minimal changes. Otherwise it is not possible.
– Tatu Lund
Nov 21 at 9:33
Thank you Tatu. I should have said migrate, I guess. I did say 'least amount possible' however, not 'minimal changes' ;). I did read the migration guide and have already spent several days migrating many parts of the application. Should have started with the navigation part.
– Reto Höhener
Nov 21 at 10:38
Thank you Tatu. I should have said migrate, I guess. I did say 'least amount possible' however, not 'minimal changes' ;). I did read the migration guide and have already spent several days migrating many parts of the application. Should have started with the navigation part.
– Reto Höhener
Nov 21 at 10:38
add a comment |
1 Answer
1
active
oldest
votes
You will need to have at least one @Route
in Vaadin 10. Since you're migrating, you might want to check the documentation here: https://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10.html
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
1
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
2
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53402758%2fvaadin-10-how-can-i-disable-router%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You will need to have at least one @Route
in Vaadin 10. Since you're migrating, you might want to check the documentation here: https://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10.html
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
1
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
2
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
add a comment |
You will need to have at least one @Route
in Vaadin 10. Since you're migrating, you might want to check the documentation here: https://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10.html
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
1
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
2
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
add a comment |
You will need to have at least one @Route
in Vaadin 10. Since you're migrating, you might want to check the documentation here: https://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10.html
You will need to have at least one @Route
in Vaadin 10. Since you're migrating, you might want to check the documentation here: https://vaadin.com/docs/v10/flow/migration/1-migrating-v8-v10.html
answered Nov 21 at 7:54
ollitietavainen
39618
39618
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
1
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
2
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
add a comment |
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
1
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
2
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
Thank you for confirming. Seeing that you are a Vaadin developer, I will just take your word for it. I am confused now about whether it makes ever sense to use VaadinServlet / UI at all.
– Reto Höhener
Nov 21 at 10:42
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
The migration guide states: "You can of course still configure the servlet yourself, and it happens the same way as previously". vaadin.com/docs/v11/flow/migration/3-general-differences.html
– Reto Höhener
Nov 21 at 11:07
1
1
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
This is one of the big changes in Vaadin 10. The UI and its init method isn't really the entry point of the application. Instead, you define a root component with a Route and build from there. The VaadinServlet is still there and you get one automatically, but you don't need to touch it if you don't need e.g. custom bootstrapping or something.
– ollitietavainen
Nov 23 at 8:07
2
2
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
Yes thank you very much, it's starting to work out nicely now, once I figured out about route (wildcard) parameters. I'll post my results when I am reasonably satisfied and convinced that it works. I must say I love Vaadin 11 soo much better than 8 so far. It feels like I've been waiting for 15 years for a java web framework to give me this clear, straightforward access to the DOM, CSS and JavaScript.
– Reto Höhener
Nov 23 at 8:15
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53402758%2fvaadin-10-how-can-i-disable-router%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What's the reason that you want to disable router? I don't think it's possible. If you do not want to have navigation by URLs you will need at least the
@Route("")
default URL.– Steffen Harbich
Nov 21 at 7:20
I want to upgrade from 8 with the least amount of changes possible. The old app didn't use Navigator, so I thought Routes might be optional, too. I will try to make it work with
@Route("")
.– Reto Höhener
Nov 21 at 7:38
2
"I want to upgrade from 8 with the least amount of changes possible. " <-- I need to give you slight warning about this. There are some major changes between 8 and 10. So "upgrade" is in most cases a wrong term. So be prepared to refactor things. It depends on your application. If you have very simple application, which does not have any add-ons, any custom client side, only basic components used, no custom theming etc. it might be possible to upgrade with minimal changes. Otherwise it is not possible.
– Tatu Lund
Nov 21 at 9:33
Thank you Tatu. I should have said migrate, I guess. I did say 'least amount possible' however, not 'minimal changes' ;). I did read the migration guide and have already spent several days migrating many parts of the application. Should have started with the navigation part.
– Reto Höhener
Nov 21 at 10:38