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
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