Code Monkey home page Code Monkey logo

Comments (4)

mshabarov avatar mshabarov commented on June 12, 2024 2

Or is this a feature that could be added?

Yes, Vaadin Flow team is going to implement this feature soon and hopefully this will target Vaadin 24.5 (or maybe even 24.4) release.

from flow.

mshabarov avatar mshabarov commented on June 12, 2024 1

@knoobie good point, let's see how development goes, I'm okay to include it into 24.4 even though it's in beta already. Copilot experience was the main point, indeed.

from flow.

chvndb avatar chvndb commented on June 12, 2024

I found a workaround. It is a hack as I have to use the getInternals() method which is not a stable API and should not really be used as I understood.

I basically clear the routerTargetChain in UIInternals using a fake location. Then I do the actual navigation using the NavigationTrigger.PROGRAMMATIC trigger to avoid a browser history entry.

Location location = ...;  // the location corresponding to the route I want to refresh
UI.getCurrent().getInternals().showRouteTarget(new Location("random"), new Div(), null);
UI.getCurrent().getInternals().getRouter().navigate(UI.getCurrent(), location, NavigationTrigger.PROGRAMMATIC);

This results in the behaviour that I need. Did I miss something that can do the same, but in a clean way? Or is this a feature that could be added?

from flow.

knoobie avatar knoobie commented on June 12, 2024

@mshabarov I just came across a use case for this as well. I know it's pretty late for 24.4.. but this looks like a neat and easy addition; some Users and even your Copilot would love to have 😉

from flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.