I'm expecting that the ListItem only have properties from the store by itemMap
The default result is that all properties for an item store gets injected into the ListItem widget creating a very large js object when the store item has a lot of properties.
It makes the problem worse when the store has a large number of items
[{
"id": 100,
"requestType": "software",
"description": "Description text for id=100",
"status": "open",
"priority": "1-high",
"requestedBy": "jsmith@gmail.com",
"requestedFinishDate": "2013-06-20",
"assignedTo": "jsmith@gmail.com",
"actualFinishDate": null,
"estimatedUnits": 3,
"unitType": "hours",
"createdDate": "2013-01-20T19:20:30",
"updatedDate": "2013-01-21T15:21:30"
}]
When using EdgeToEdgeStoreList
I'm expecting that the ListItem only have properties from the store by itemMap
The default result is that all properties for an item store gets injected into the ListItem widget creating a very large js object when the store item has a lot of properties.
It makes the problem worse when the store has a large number of items [{ "id": 100, "requestType": "software", "description": "Description text for id=100", "status": "open", "priority": "1-high", "requestedBy": "jsmith@gmail.com", "requestedFinishDate": "2013-06-20", "assignedTo": "jsmith@gmail.com", "actualFinishDate": null, "estimatedUnits": 3, "unitType": "hours", "createdDate": "2013-01-20T19:20:30", "updatedDate": "2013-01-21T15:21:30" }]
Example: Data:
<ul data-dojo-type="dojox/mobile/EdgeToEdgeStoreList" data-dojo-attach-point="requests" data-dojo-props="store: this.loadedStores.requests,itemMap:{description:'label'}"> </ul>
Retrieve the ListItem instance widget
listItemWidget =viewWidget.requests.getChildren()[0]
I'm expecting listItemWidget to only contain description since it was the only specified property in itemMap
Or there might might a way to indicate to only pick certain properties from the store item to inject into new ListItem
Actual Result with Dojo 1.9.1 I get all properties from item store
Object {srcNodeRef: null, _connects: Array[0], _supportingWidgets: Array[0], params: Object, label: "Description text for id=100"…} __parent: Array[3] _connects: Array[0] _created: true _handleClick: true _inherited: Object _isOnLine: true _keydownHandle: Object _layoutChildren: Array[0] _onTouchStartHandle: Object _started: true _supportingWidgets: Array[0] _templated: false actualFinishDate: null arrowClass: undefined assignedTo: "jsmith@gmail.com" checkClass: undefined clickable: true containerNode: li#request_100.mblListItem createdDate: "2013-01-20T19:20:30" deleteIcon: undefined deleteIconNode: null deleteIconPos: undefined deleteIconRole: undefined deleteIconRolePos: undefined deleteIconTitle: undefined deleteIconTitlePos: undefined destroy: function (){ domNode: li#request_100.mblListItem estimatedUnits: 3 icon: undefined iconNode: null iconPos: "" id: "request_100" label: "Description text for id=100" labelNode: div.mblListItemLabel ownerDocument: document ownerDocumentBody: body.mblBackground params: Object priority: "1-high" requestType: "software" requestedBy: "jsmith@gmail.com" requestedFinishDate: "2013-06-20" rightIcon: "mblDomButtonArrow" rightIcon2: undefined rightIcon2Node: null rightIcon2Pos: undefined rightIconNode: div.mblListItemRightIcon rightIconPos: undefined srcNodeRef: null status: "open" tabIndex: "0" transition: "slide" transitionOptions: Object uncheckClass: undefined uncheckIcon: undefined uncheckIconNode: null uncheckIconPos: undefined unitType: "hours" updatedDate: "2013-01-21T15:21:30" variableHeight: undefine