This is a migrated thread and some comments may be shown as answers.

Replace cached view

1 Answer 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 12 Feb 2013, 09:52 AM
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

1 Answer, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 13 Feb 2013, 12:58 PM
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.
Tags
General Discussions
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Share this question
or