Even if it is working in most time sometimes it causes issues because e.g clik on list will generate:
So there is part of address duplicated. - so when I built custom link I have issues with some dynamic parameters. Can I avoid that?
So when I have something custom link like :
after click it renders link at the root not current subpage.
11 Answers, 1 is accepted
The behaviour you observe is by design - this is how Kendo UI Mobile navigates to remote views. I am not sure that I understand your case, though. Do you expect the item request to be relative to the current address?Regards,
the problem I have is quite strange. For navigation in links I'm using site root based addresses.
so when if my original URL is
after enter from mobile it goes to be:
After pressing link it goes to be:
http://mydomain/mysite/#/mysite/subpage/page1 instead of http://mydomain/mysite/subpage/page1
this is not so bad because it still working, however if on new site I have only page relative links like: #interalview?id=1
it behaves wrongly because it cuts whole address and I have:
http://mydomain/mysite/#internalview?id=1 instead of http://mydomain/mysite/subpage/page1/#internalview?id=1
so it is problematic for me to create proper navigation.
Thank you for the clarification. I think that this should be considered a bug in Kendo UI - the behavior you expect (relative URLs) should be supported, in fact. I will file this in our issue tracker, and try to address it in our internal builds, and in the upcoming Q2 release. I am updating your telerik points for this finding.Regards,
It looks like I need some more help with reproducing and addressing the problem.
As far as I understand, the internalview?id=1 is a remote view URL. I tried to reproduce the case in the sample attached (running it in a subdirectory on my local machine); clicking the button successfully requested the relative URL of the foo.html remote view.
Can you please let me know what am I missing?
I did not manage to reproduce the problem with your sample - clicking the tabs did not result in a wrong ajax request to the root url. Can you please let me know the steps which I need to follow?Regards,
I'm opening index file in browser:
Press button and now:
Switch tab and now:
so when I e.g. refresh page
I'm again on index.html but I should stay on foo.html
The chartView id is an id of a local view, which resides in a remote view - there is no way for the mobile application in index.html to determine its location and load it on reload.
You can avoid that by targeting the same view by its remote url - like this:
Thank you for explanation, but the problem is that foo.html is not remote view in my scenario. It is external page with full redirection to page. Not simple view. I cannot make it as remote view because of some business logic and permissions. So I redirect to foo.html (not like in attached example) and then I'm on totally new page. And becuase I'm using mvc I cannot use id as part of main request, because it will cause issue with mvc routing and will cause issue with normal (not mobile) views. I already found workaround but I don't like it. Instead of href when going from first page (index.html) in this case I'm using onclick="window.location.href =foo.html" which is doing what I want - process external request properly.
If your project relies server side processing and business logic implementation, you may consider enabling serverNavigation, which effectively performs regular redirects (like you do in your snippet) instead of ajax loading for remote views. This concept is is also showcased in our Q2 beta release, featuring ASP.NET MVC wrappers for Kendo UI Mobile.Hope this helps,
Thank you for your answer. However this option (serverNavigation) is not what I'm looking for. This affects whole app. So not exactly what I need.
That you for your help. My solution is working so far so I can use it for now.