Layout/Router Implementation with Existing Views

4 posts, 0 answers
  1. Ashleigh L
    Ashleigh L avatar
    113 posts
    Member since:
    Jun 2012

    Posted 29 Jun 2015 Link to this post

    After working on a multi-view page for a couple of months, the shareholders have recently added a requirement that the back button work "as expected". I've found the SPA/layout/router functionality of KendoUI, which appears to be what I need, but I'm rather lost as to how to convert my existing functionality to use it. Also, please note that this is my first time using KendoUI, or working w/ a single page application, so my initial solution is probably not ideal in many respects.

    I've hosted an example version of my application here: app.smarteru.com/custom/kendo/index.cfm, as well as attaching the source code as a zip file. I've stripped out a lot of the extraneous UI bits, but I've left the util.js fully intact (including functions that won't actually be called by the example), so you can see the general idea of the page as a whole.

    I would appreciate some general guidance/an example of how I can get my tile and list views working within the layout/router framework. You'll notice in the generateCourseView in util,js, I'm handing the hiding/showing of the tile and list display divs on my own (as well as hiding other views, which I've removed from the example for simplicity).

    I do have a few specific questions, in addition to the general request for guidance:

    • Our standard URLs always include a ?AccountID=1234 parameter, which we'll need to keep. How/will this work w/ the layout/router?
    • Can I link to a specific view from another location, while passing another URL parameter? For example, when a course is completed, we want to link back to the course index view (not included in the example), but we need to pass the course completion ID. In our current system, the URL would look something like "course-index.cfm?AccountID=1234&AULMRID=7894". How do I handle this w/ the layout/router functionality?
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 01 Jul 2015 Link to this post

    Hello,

     

    THe zip you have attached is corrupted, and does not open.

     

    The navigation router features you refer to are supported, and, in fact, documented. Notice that the router is by no means coupled with the view/layout implementation. You may use the router part only.

     

    I may suggest that you contact our services department and provide access to the source code of your project. They will review it and provide the necessary insight on how to integrate the Router/View parts in it.

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Ashleigh L
    Ashleigh L avatar
    113 posts
    Member since:
    Jun 2012

    Posted 02 Jul 2015 in reply to Petyo Link to this post

    Odd, it opens fine for me.

    I don't see any where in that documentation where it explains/shows how it can handle existing URL parameters - ones that have nothing to do w/ the router and need to be there for other pieces of functionality on the page.

    For my second point, I assume you're referring to the parameter parsing section of the documentation, but again, that doesn't explain, or even have an example of how to pass parameters to a router from a page completely outside of the current context - one that doesn't even use Kendo at all.

    And yes, I realize I don't have to use the router w/ views, but since I already have views set up, and all the examples reference views, I thought that was the best way forward.

    Thank you for the link to Services, I'll take a look.

  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 06 Jul 2015 Link to this post

    Hello shimmoril,

    I am not sure what you mean by "existing URL parameters". The router is a wrapper around the location object. You may construct an URL handled by the router externally and navigate to it using the location API. 

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready