załaduj sklep List używając json
Tutaj mój kod do listy za pomocą Sencha touch2, mam usługę odpoczynku i muszę mieć możliwość załadowania mojego sklepu do widoku listy
var tab= Ext.create('Ext.List', {
width: 320,
height: 290,
store: {
fields: ['ext_xtype','imgURL','arimg'],
data: [{
ext_xtype: 'Harry Potter 4',
imgURL:'bo.png',
arimg:'arrow.png'
},{
ext_xtype: 'Iphone5 64gb',
imgURL:'mo.png',
arimg:'arrow.png'
},{
ext_xtype: 'Hill Figure',
imgURL:'wa.png',
arimg:'arrow.png'
}]
},
itemTpl: '<img src="{imgURL}" width="35" heigh="35"></img><span>   {ext_xtype}<img src="{arimg}" width="25" height="25" align="right"></img>'
});
wypróbowałem poniższy linkSencha z zadaniem proxy ale nie mógł pomóc w kontynuowaniu. Oto reszta metody JSON.
Method: GET
URL: http://117.218.59.157:8080/WishList/ShowItems/userID=?
Jak zaimportować json do załadowania do LISTY
#EDYTOWAĆ
var tab= Ext.create('Ext.List', {
width: 320,
height: 290,
//ui: 'round',
store: {
proxy: {
type: 'ajax',
url: 'http://117.218.59.157:8080/WishList/ShowItems/userID=1',
reader: {
type: 'json'
}
}
fields: [
{ imgURL: 'itemID' },
{ ext_xtype: 'itemName'},
{ arimg: 'itemImage'},
],
},
itemTpl: '<img src="{imgURL}" width="35" heigh="35"></img><span>   {ext_xtype}<img src="{arimg}" width="25" height="25" align="right"></img>'
});