Replace cached view

2 posts, 0 answers
  1. James
    James avatar
    16 posts
    Member since:
    Jan 2013

    Posted 12 Feb 2013 Link to this post

    Hi!

    I am not sure on how will I explain this.
    I have a list of all the nearest addresses from a web sql and it has a specific view/template to show a single address. My case is that it is caching the first address that I am choosing. It is a sort of caching but I want to clear the content and show the other addresses into that specific view/template. I hope you've got what I mean.

    Here is an example

    List view:

    <script type="text/x-kendo-template" id="addresses-listview-template">
            <a class="clear" data-role="listview-link" href='views/address.html?id=${id}'>${name}</a>
        </script>
        
        <!--page-addresses-->
        <div data-role="view" id="page-addresses" data-title="Addresses" data-init="getAddressesInit" data-before-show="addressesBeforeShow">
            <ul data-role="listview" data-style="inset" data-type="group">
                <li>
                    <ul id="addresses-listview" data-role="listview" data-template="addresses-listview-template" data-auto-bind="false">
                        
                    </ul>
                </li>
            </ul>
        </div>

    Single View (Second hit will cache the first hit)

    <script type="text/x-kendo-template" id="address-single-template">
            <h1>#= name #</h1>
            <p>Address: #= address #</p>
        </script>
        
        <!--page-address-->
        <div data-role="view" id="page-address" data-title="Address" data-init="getAddressInit">
            <ul id="address-single-view" data-template="address-single-template">
            
            </ul>
            <div id="map_canvas_address"></div>
        </div>

    Thanks!
    James
  2. James
    James avatar
    16 posts
    Member since:
    Jan 2013

    Posted 13 Feb 2013 Link to this post

    I just want to inform you that I were able to solve the problem already by using data-show and data-model rather than data-init. Anyway thanks.

    Don't hesitate to ask if someone will stumble into this kind of situation.
  3. Kendo UI is VS 2017 Ready
Back to Top