No description provided.
Testing with a generated Tiles app. There is a problem that routes cannot be bookmarked. Even the sap.m.SplitApp example provided with the SDK does not bookmark.
You should be able to navigate within your app and then bookmark where you are. Upon loading the bookmark you are taken back to where you left off. This does work with routing frameworks such as Director.js that I have tested. However not for jQuery.sap.history.
It seems that when you load the bookmark then history route handler is executed before the view which the page relies on is instantiated - and therefore in the route handler you cannot call to() or back() rendering the logic useless.?!? In fact with Chrome tools you can see the the app does not even GET the view file.
Anyone got example of this working?
See this test app: https://github.com/js1972/test
Added a "route" branch to the above test repo. The test app now uses the new component-based routing mechanism.
Still seems to be an issue in that bookmarked routes do not work. The SDK-provided splitapp example also does not work with bookmarked routes.
Its as if the data binding is not set.
Using the new component-based routing mechanism, the router takes over all navigation and view instantiation responsibilities. Given that this is a totally different application architecture it probably should be give an another option to the user: "add routing".
Is that sth. you just add as a feature or would that be new application template?
See this sample app and readme for details. We just need to think about how to architect this into the generator.
a) Have a completely different set of template apps that include routing out of the box;
b) Have a routing sub-generator that is clever enough to do the refactoring of your app to include routing based on a few questions - this would be fantastic but difficult I expect as you need to wire any views into the routes;
c) Default all generated apps to use routing as standard.
(I'm probably thinking to go with option (a) at the moment.)
Anything else @saschakiefer or anyone else can think of?
The test app https://github.com/js1972/test_ui5_routing has been updated and now works perfectly as expected. After much investigation there are issues with both the real Northwind oData service as well as the mock one provided by the UI5 team.
The real one has DNS issues and does not work from Windows computer here (yet works just fine on my Mac). The fake one does not handle all nuances of oData and crashes the model binding in certain situations (such as when loading from a route).
Answer - write my own bloody test data! Problem solved - routing and model binding work perfectly again!
@saschakiefer if you get a chance can you have a quick look at this app. I want to add the detail screen onto our template Tiles app just so that it displays something and not an empty page as it does currently. You'll also see how the component-based routing works so that we can decide whether not to support it....
This has already been done in the new component-based app templates. Just needs to be merged into master.
Closing. See the TDG app template for an example of routing or scaffold out your project in WebIDE where you will get the latest component based routing mechanism.