Opened 8 years ago

Closed 7 years ago

#13685 closed defect (fixed)

dojox.mvc - mobile widgets cannot startup in dojox.mvc.Group / dojox.mvc.Repeat

Reported by: Eric Wang Owned by: Ed Chatelain
Priority: blocker Milestone: 1.8
Component: DojoX MVC Version: 1.7.0b1
Keywords: Cc: rahul
Blocked By: Blocking:

Description

If dojox.mvc.Group or dojox.mvc.Repeat contains dojox.mobile widgets, the widgets cannot startup because dojox.mvc.Group/dojox.mvc.Repeat not start up it's children.

To fix this issue, a solution is let dojox.mvc.Group inherit dijit._container, but it's failed in my test case. So just start up the children in dojox.mvc._patches startup() will workaround this problem.

Put the test case file in dojox/mvc/tests directory will reproduce this issue, and the patch will workaround it.

Attachments (4)

test_mvc_repeat.html (3.7 KB) - added by Eric Wang 8 years ago.
test case of startup issue
dojox.mvc.diff (1003 bytes) - added by Eric Wang 8 years ago.
patch of dojox.mvc startup issue
mvc-13685-patch.txt (24.2 KB) - added by Ed Chatelain 8 years ago.
This patch contains updates to repeat to handle useParentId to remove the repeat node. It also includes a couple of tests to see how it would work. I did not add the support to mvc.Group. But I wanted to put this out so we could talk about it.
mvc-13685-patch.2.txt (56.8 KB) - added by Ed Chatelain 8 years ago.
Another updated patch, includes extra tests still has problem on IE.

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by Eric Wang

Attachment: test_mvc_repeat.html added

test case of startup issue

Changed 8 years ago by Eric Wang

Attachment: dojox.mvc.diff added

patch of dojox.mvc startup issue

comment:1 Changed 8 years ago by ben hockey

Cc: ben hockey added

comment:2 Changed 8 years ago by Ed Chatelain

Your fix helps, but there is still a problem with the styling which is caused by the repeat and group nodes between the ul and the li nodes. I had worked on adding a useParentId option for repeat, which would move the repeat contents into the node with the id set passed in useParentId parm. That update never made it into 1.7, but I could add it if others (Rahul & Ben)? think it is a good idea.

There are a couple of issues I have with that update at the moment: 1) I have the code working if you do not use a group inside the repeat, I have not added the support to group, but I can work on that. 2) The way the code is currently written, I am replacing the entire content of the parentId node with the repeat content, so in your example the li with the label="test" would be lost because it is inside the parent ul, but outside of the repeat. So I guess I would need to clean that up too.

Changed 8 years ago by Ed Chatelain

Attachment: mvc-13685-patch.txt added

This patch contains updates to repeat to handle useParentId to remove the repeat node. It also includes a couple of tests to see how it would work. I did not add the support to mvc.Group. But I wanted to put this out so we could talk about it.

comment:3 Changed 8 years ago by Ed Chatelain

I have made some updates to the patch, and tests. Now it works when you change the ref for the repeat. If I do not hear any objections tonight I will try to have this patch applied tomorrow, so if you have any concerns speak up now. Thanks,

P.S. I should have replaced the previous patch with the update, but I forgot to check the box.

comment:4 Changed 8 years ago by Ed Chatelain

The last patch does not work correctly on IE, so I am not having it applied at this time. It works fine on all other browsers that I have tested, including mobile browsers. On IE it does not seem to be parsing correctly, I am not seeing the expected classes setup for the mobile widgets. I thought it might have to do with the _Container using dojo.parser, but even if I switched that to use dojox.mobile.parser the IE problem still occurred.

Changed 8 years ago by Ed Chatelain

Attachment: mvc-13685-patch.2.txt added

Another updated patch, includes extra tests still has problem on IE.

comment:5 Changed 8 years ago by Ed Chatelain

The changes for ticket 13892: http://bugs.dojotoolkit.org/ticket/13892 and ticket 13886: http://bugs.dojotoolkit.org/ticket/13886 Remove the check in the for getParent() in the parser before calling startup(), so the change included in Eric's patch (http://bugs.dojotoolkit.org/attachment/ticket/13685/dojox.mvc.diff) are no longer needed, his test should work without that patch. But we still have the problem with the styling which is caused by the repeat and group nodes between the ul and the li nodes, so those problems will still need to be addressed.

comment:6 Changed 7 years ago by Adam Peller

Cc: Ed Chatelain ben hockey removed
Owner: changed from rahul to Ed Chatelain

comment:7 Changed 7 years ago by bill

Shouldn't set milestone unless someone has committed to do the work for that milestone.

comment:8 Changed 7 years ago by Colin Snover

Priority: highblocker

Bulk update of open ticket priorities.

comment:9 Changed 7 years ago by Ed Chatelain

Milestone: tbd1.8
Resolution: fixed
Status: newclosed

This is fixed by similar tickets in 1.8.

Note: See TracTickets for help on using tickets.