vaadin:锚点在浏览器中设置内部URL,但不导航

发布于 2025-02-09 20:17:33 字数 1237 浏览 2 评论 0原文

在vaadin 23.1.0应用程序中的登录图中,我有一个导航到Microsoft Azure login url:add(new Anchor(“/oauth2/oputerization/authization/azure”,“使用MS Azure AD”);

问题:当我单击该锚/链接时,浏览器中的URL(Firefox 101.0.1和Chromium 103)更新为http:// http:// localhost:8080/oauth2/proleinization/proleminization/azure,但是浏览器不导航。

问题:如何使该锚定向给定目标?

我尝试的

  1. 当我单击锚点时,然后击中F5时,它可以正常工作。 (这是目前的解决方法。它表明URL是可联系的。)
  2. 当我更改该href and> aNDEM>的href eg eg eg到“ https:// google”。 com”,然后导航。

其他观察结果: 当我单击锚点时,带有此请求的请求是从浏览器到vaadin服务器的请求:{“ csrftoken”: :“已发布”,“节点”:1,“ TemplateEventMethodname”:“ ConnectClient”,“ TemplateEventMethodargs”:[“ Flow-Container-root-2521314”,“ root-2521314”,“ root-2521314”,“ ,null],“ Promise”:4}],“ syncid”:4,“ clientId”:4},并在此响应中: for(;;); [{{“ syncid”:5,“ clientId”:5,“ execute”:[[“ SystemanAnmeldung”,“ document.title = $ 0”],[“ SystemanAnmeldung”,“文档”。 title = $ 0”],[false,[0,3],“ return(function(){this.serverConnected($ 0)})。应用($ 1)”],[4,null,[0,1],” return(function(){this。$ server ['} p']($ 0,true,$ 1)})。应用($ 2)”]]}]>

In a LoginView in a Vaadin 23.1.0 application I've got an Anchor to navigate to Microsoft Azure Login URL: add(new Anchor("/oauth2/authorization/azure", "Login with MS Azure AD"));.

Problem: When I click that anchor / link then the URL in the browser (Firefox 101.0.1 and also Chromium 103) updates to http://localhost:8080/oauth2/authorization/azure, but the browser does not navigate.

Question: How can I get that anchor to navigate to the given target?

What I tried:

  1. When I click the anchor and then hit F5 it just works fine. (This is the workaround for the moment. And it shows that the URL is reachable.)
  2. When I change the href of that Anchor e.g. to "https://google.com", then it navigates.

Additional observations:
When I click the anchor, there is a request from the browser to the Vaadin server with this request: {"csrfToken":"10c44508-3e55-455c-b4b1-86b7d2390f44","rpc":[{"type":"publishedEventHandler","node":1,"templateEventMethodName":"connectClient","templateEventMethodArgs":["flow-container-root-2521314","ROOT-2521314","oauth2/authorization/azure","",null],"promise":4}],"syncId":4,"clientId":4} and with this response:
for(;;);[{"syncId":5,"clientId":5,"execute":[["Systemanmeldung","document.title = $0"],["Systemanmeldung","document.title = $0"],[false,[0,3],"return (function() { this.serverConnected($0)}).apply($1)"],[4,null,[0,1],"return (function() { this.$server['}p']($0, true, $1)}).apply($2)"]]}]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

装纯掩盖桑 2025-02-16 20:17:33

使用Anchor.getElement()。setAttribute(“路由器-Ignore”,true);如果您需要服务来处理给定的URL而不是客户端端路由器。

Use anchor.getElement().setAttribute("router-ignore", true); if you need your service to handle the given URL instead of the client-side router.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文