Opened 6 years ago

Closed 6 years ago

#17121 closed defect (invalid)

[dojox/mobile] StoreListMixin does never call startup for created list items

Reported by: Paul Christopher Owned by: Eric Durocher
Priority: undecided Milestone: tbd
Component: DojoX Mobile Version: 1.9.0rc2
Keywords: Cc:
Blocked By: Blocking:

Description

Description

I have a strange effect with EdgeToEdgeStoreList used within a dojox/app application: The list is created correctly but all the icons are missing. During creation, the icon is not set because "this._isOnLine" is always "false" (no parent). Thus, the icons are marked as "pending". This would not be a problem if startup were called. However, for some reason, _StoreListMixin never calls startup.

Steps to reproduce the issue

Add the attached controller and view to a dojox/app. I use an app similar to dojox/app/tests/multiSceneApp. Notice: The list is displayed correctly, but all the icons are missing.

Discussion

I tried to put the list inside a dojox/app/widgets/Container widget. But that did non work either. Maybe cjolif or edchat can us tell more on that. I could only fix the issue by applying the attached changes to _StoreListMixin, i.e. by explicitely calling startup on the list items.

Attachments (3)

controller.js (1.1 KB) - added by Paul Christopher 6 years ago.
view.html (472 bytes) - added by Paul Christopher 6 years ago.
_StoreListMixin.js.diff (490 bytes) - added by Paul Christopher 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by Paul Christopher

Attachment: controller.js added

Changed 6 years ago by Paul Christopher

Attachment: view.html added

Changed 6 years ago by Paul Christopher

Attachment: _StoreListMixin.js.diff added

comment:1 Changed 6 years ago by Sebastien Brunot

Hi,

the problem also appears to be solved if you start the list in the init method of your controller:

init: function(){
	// Create simple list
	this.store1 = Observable(new Memory({idProperty:"label", data:this._data1}));
	this.simpleList = new EdgeToEdgeStoreList({ store:this.store1 }, this.simpleList);
	// Start the list
	this.simpleList.startup();
}

comment:2 Changed 6 years ago by Paul Christopher

You are perfectly right! Calling startup on the list solves the issue. Sometimes solutions can be so easy. The only problem is to find them!

As far as I can see, calling startup on the list works becaues _WidgetBase's startup calls startup for each child. I did not know that...

comment:3 Changed 6 years ago by Eric Durocher

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.