Hi,
I have the same problem in DataItem. Moe specific I am using DataItem inside my DataView.
The question is:
1. How to set an Id on each DataItem?
2. This ID's is dynamically from server.
My idea is below.
Code:
config:{
cls: 'kitten-list-item',
action: 'freeStyleItem',
dataMap:{
setItemId: 'id', // This is What I mean. But it does not work, instead the ID was generated by the framework. "ext-layoutfreestyleitem-1"
getImage: {
setSrc: 'icon'
},
getName: {
setHtml: 'name'
}
},
image:true,
image:{
cls: 'x-img',
itemId: 'id'
},
name:{
cls: 'x-name',
flex: 1
}
},
Here is my JSON file
Code:
{
"widgets": [
{
"order": 1,
"id": "hey-297",
"name": "Product and Services",
"description": "Description soon!",
"icon": "http://vegacrush.com/skyline/img/icongreen_badge.png",
"edit": "arrow_right"
},
{
"order": 2,
"id": "296",
"name": "Sencha touch",
"description": "Description soon!",
"icon": "http://skylinetest2.net/project2/assets/js/jquery/uploadify/features/1327899484-sub-icon-sencha-logo.jpg",
"edit": "arrow_right"
},
{
"order": 3,
"id": "295",
"name": "News Update",
"description": "Description soon!",
"icon": "http://skylinetest2.net/project2/assets/js/jquery/uploadify/upload/renz_logo.gif",
"edit": "arrow_right"
}
]
}
Please help me guys. Thank you in advanced 