Reputation: 71
I have a view that inherits dojox.mobile.View that contains this template:
<div>
<div id="listId" data-dojo-type="widgets.myproj.SomeList" data-dojo-attach-point="mylist">
<h1 data-dojo-type="dojox.mobile.Heading">Hits</h1>
</div>
<div id="summary" data-dojo-type="dojox.mobile.View" data-dojo-attach-point="summaryView">
<h1 data-dojo-type="dojox.mobile.Heading" back="Hitlist" movetTo: "listId">Some heading</h1>
</div>
</div>
widgets.myproj.SomeList
pupulates itself with ListItems. Each ListItem has a moveTo property set to the view with id="summary"
.
Problem is that the back behaviour here makes the browser go back in history. I only want it to behave according to the code, back="Hitlist" movetTo: "listId"
. I.e. I want it to activate the widgets.myproj.SomeList
widget again. (that also inherits dojox.mobile.View)
Upvotes: 0
Views: 63
Reputation: 396
Your code contains "movetTo" while this should be "moveTo". Is this just a typo here, or is it the same in your actual code? The second point is that the "back" and "moveTo" are widget properties which should be set in markup using the data-dojo-props attribute:
<h1 data-dojo-type="dojox.mobile.Heading"
data-dojo-props="back:'Hitlist', moveTo: 'listId'">Some heading</h1>
At a quick testing, fixing these 2 issues makes it work as expected.
Hope this helps,
Adrian
Upvotes: 1