#14423 closed defect (fixed)
dojox.mvc.Group prevents dojox.mobile.RoundRectList and dojox.mobile.ListItem select action
Reported by: | Eric Wang | Owned by: | Ed Chatelain |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | DojoX MVC | Version: | 1.7.0 |
Keywords: | todoapp | Cc: | |
Blocked By: | Blocking: |
Description
in dojox.mobile, use dojox.mobile.RoundRectList? select property to do ListItem? select like this:
<ul id="list1" dojoType="dojox.mobile.RoundRectList" select="single"> <li id="item1" dojoType="dojox.mobile.ListItem" checked="true"> Cube </li> <li dojoType="dojox.mobile.ListItem"> Dissolve </li> <li dojoType="dojox.mobile.ListItem"> Ripple </li> </ul>
but dojox.mvc bind data to ListItem? will add dojox.mvc.Group as the parent of ListItem?, so ListItem? failed to find its original parent and the select action failed. dojox.mvc code:
<ul dojoType="dojox.mobile.RoundRectList" select="single"> <div data-dojo-type="dojox.mvc.Repeat" data-dojo-props="exprchar:'#', ref:'listsmodel'"> <div data-dojo-type="dojox.mvc.Group" data-dojo-props="ref: '#{this.index}'"> <li id="configure_item#{this.index}" class="mblVariableHeight" label="#{this.index}" dojoType="dojox.mobile.ListItem" checked="true"> </li> </div> </div> </ul>
Attachments (1)
Change History (8)
comment:1 Changed 9 years ago by
Keywords: | todoapp added |
---|
Changed 9 years ago by
Attachment: | test_14423-mvc.html added |
---|
comment:3 Changed 9 years ago by
edchat, not all but part of this problem is use of the stopParser feature in dojox.mvc._Container, which dojo.parser support, but dojox.mobile.parser doesn't. You should be able to avoid the problem by switching the parser to dojo.parser. I didn't have a plan to add the stopParser feature to dojox.mobile.parser to keep its code size small. But I added it since the necessary code was not that big. The remaining problem I think is finding parent and children.
comment:6 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The solution to this problem is to use the data-dojo-mixin support to mixin the dojox.mvc.Repeat with the dojox.mobile.RoundRectList?, and to not use a dojox.mvc.Group inside the Repeat, like this:
<ul data-dojo-type="dojox.mobile.RoundRectList?" id="repeatId1" select="single"
data-dojo-mixins="dojox.mvc.Repeat" data-dojo-props="exprchar:'#',
ref:'model1.Results'">
<li id="configure_itemmix1#{this.index}" class="mblVariableHeight"
data-dojo-type="dojox.mobile.ListItem?" data-dojo-props="label: dojox.mvc.at('rel:#{this.index}.First', 'value'),
checked: dojox.mvc.at('rel:#{this.index}.Checked', 'value')">
</li>
</ul>
This is a testcase to show the problem. Place this file in dojox/mvc/tests to run it. You will see the problems with the selections and the style.