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

remote view header button not working when i return to page

3 Answers 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 29 Jan 2014, 06:11 PM
Hi.  I'm running into a problem where I have a logoff button in the navbar.  This navbar is visible across all pages.  When I navigate to my listview to get a list of orders, the logoff button works fine.  When I drill down to get the details of one item of the list, i am taken to another remote view.  This also works fine.  However, if I got BACK to the previous screen using back in the navbar, I am navigated back BUT the logoff button click is not working.  I think I've narrowed it down to this:

http://docs.telerik.com/kendo-ui/getting-started/mobile/application#remote-views

Specifically, the documentation states the following:

"The remote view request will also append (but not initialize) any additional views found in the AJAX
response. Inline style elements, inline script elements, and mobile layout definitions will also be evaluated and appended to the
application. The elements must be available in the root of the response, or nested inside the body element.Scripts and styles from the head element (if present) will not be evaluated.If the remote view needs an additional scripting (widget initialization/binding) logic, it may be defined in the view init event handler, in the AJAX response."


Is this why I am having difficulty? 

My main layout in my index.html looks like this:

    <div data-role="layout" data-id="mt-main-layout">
        <header data-role="header"><br/>
            <div data-role="navbar" id="mt-main-layout-navbar">
                <a data-align="left" data-role="backbutton">Back</a>
                <span data-role="view-title">Test Product</span>
                <a data-align="right" style="display: none" class="mt-main-layout-btn-logoff"
                    data-click="testProduct.loginCompany.viewModel.logOff" data-role="button">Log Off</a>
            </div>
        </header>
    </div>

If this is the issue, is there a workaround to reinitialize the button's data-click event?

Thanks in advance for any insights!

-Brian

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 03 Feb 2014, 02:13 PM
Hi Brian,

this does not sound like a known issue, and is unlikely to be related to the behavior you refer to. Did you check the inspector for any javascript errors? 

Regards,
Petyo
Telerik
Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
0
Brian
Top achievements
Rank 1
answered on 03 Feb 2014, 02:49 PM
I checked but no javascript errors at all.  Any ideas?
0
Steve
Telerik team
answered on 03 Feb 2014, 03:01 PM
Hi Brian,

Please isolate this in a sample project (or better yet a jsfiddle/jsbin sample), so we can review it locally and we would advise you accordingly.

Regards,
Steve
Telerik
Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
Tags
General Discussions
Asked by
Brian
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Brian
Top achievements
Rank 1
Steve
Telerik team
Share this question
or