I have a problem with a store that carries the data in a List, the thing is that the store is doing the load but the List stays in Loading, what I'm doing wrong, thanks
Ext.regModel('Properties', {
fields: [
{name: 'idcounty', type: 'string'},
{name: 'county', type: 'string'}
]
});
store = new Ext.data.Store({
model : 'Properties',
proxy: {
type: 'ajax',
url: 'php/response_grid.php?module=countys',
reader: {
type: 'json',
root: 'results',
totalCount: 'total'
}
},
autoLoad:true
});
var listPanel = {
dockedItems: [
{
title: 'Results',
xtype: 'toolbar',
ui: 'light',
dock: 'top'
}
],
layout: 'fit',
scroll: 'vertical',
items: [
{
xtype: 'list',
itemTpl : '{county}',
store: store,
singleSelect: true,
onItemDisclosure: function(record, btn, index){
}
}
],
flex:1
};
and the json answer from the php
({"total":"67","results":[{"idcounty":"1","county":"Broward"},{"idcounty":"2","county":"Dade"},{"idcounty":"3","county":"Palm Beach"},{"idcounty":"4","county":"Osceola"},{"idcounty":"5","county":"Lake"},{"idcounty":"6","county":"Orange"},{"idcounty":"7","county":"Seminole"},{"idcounty":"8","county":"Volusia"},{"idcounty":"9","county":"Hillsborough"},{"idcounty":"10","county":"Polk"},{"idcounty":"11","county":"Pasco"},{"idcounty":"12","county":"Pinellas"},{"idcounty":"13","county":"Sarasota"},{"idcounty":"14","county":"Manatee"},{"idcounty":"15","county":"Charlotte"},{"idcounty":"16","county":"Alachua"},{"idcounty":"17","county":"Baker"},{"idcounty":"18","county":"Bay"},{"idcounty":"19","county":"Bradford"},{"idcounty":"20","county":"Brevard"},{"idcounty":"21","county":"Calhoun"},{"idcounty":"22","county":"Citrus"},{"idcounty":"23","county":"Clay"},{"idcounty":"24","county":"Collier"},{"idcounty":"25","county":"Columbia"},{"idcounty":"34","county":"Duval"},{"idcounty":"35","county":"Escambia"},{"idcounty":"36","county":"Flagler"},{"idcounty":"37","county":"Franklin"},{"idcounty":"38","county":"Gadsden"},{"idcounty":"39","county":"Gilchrist"},{"idcounty":"40","county":"Glades"},{"idcounty":"41","county":"Gulf"},{"idcounty":"42","county":"Hamilton"},{"idcounty":"43","county":"Hardee"},{"idcounty":"44","county":"Hendry"},{"idcounty":"45","county":"Hernando"},{"idcounty":"46","county":"Highlands"},{"idcounty":"47","county":"Holmes"},{"idcounty":"48","county":"Jackson"},{"idcounty":"49","county":"Jefferson"},{"idcounty":"50","county":"Lafayette"},{"idcounty":"52","county":"Lee"},{"idcounty":"53","county":"Leon"},{"idcounty":"54","county":"Levy"},{"idcounty":"55","county":"Liberty"},{"idcounty":"56","county":"Madison"},{"idcounty":"58","county":"Martin"},{"idcounty":"59","county":"Monroe"},{"idcounty":"60","county":"Nassau"},{"idcounty":"61","county":"Okaloosa"},{"idcounty":"62","county":"Okeechobee"},{"idcounty":"63","county":"Putnam"},{"idcounty":"64","county":"Sumter"},{"idcounty":"65","county":"Taylor"},{"idcounty":"66","county":"Union"},{"idcounty":"67","county":"Wakulla"},{"idcounty":"68","county":"Walton"},{"idcounty":"69","county":"Washington"},{"idcounty":"70","county":"DeSoto"},{"idcounty":"71","county":"IndianRiver"},{"idcounty":"72","county":"SantaRosa"},{"idcounty":"75","county":"St Johns"},{"idcounty":"77","county":"St Lucie"},{"idcounty":"78","county":"Dixie"},{"idcounty":"80","county":"Suwannee"},{"idcounty":"81","county":"Marion"}]})
I got your example to work but I had to change a few things, I wrapped it in an application just to get to work. Specifically I had to move the model AFTER the Application so that the Store was available.
In the above example you just do:
store = new Ext.data.Store({...
I think you need to do:
var stor = new Ext.data.Store({...
Anyway here is the code I got to work, so your data is good...
Ext.ns("Test", "Test.stores");
Test = new Ext.Application({
defaultTarget : 'viewport',
name : 'test',
icon : 'icon.png',
glossOnIcon : false,
tabletStartupScreen : 'tablet_startup.png',
phoneStartupScreen : 'phone_startup.png',
launch : function() {
console.log('begin');
this.viewport = new Ext.Panel({
fullscreen : true,
dockedItems : [ {
title : 'Results',
xtype : 'toolbar',
ui : 'light',
dock : 'top'
} ],
layout : 'fit',
scroll : 'vertical',
items : [ {
xtype : 'list',
itemTpl : '<span id="{idcounty}">{county}</span>',
store : Test.stores.Properties,
singleSelect : true,
itemSelector : 'span.id',
onItemDisclosure : function(record, btn, index) {
}
} ],
flex : 1
});
}
});
Ext.regModel('Properties', {
fields : [ {
name : 'idcounty',
type : 'string'
}, {
name : 'county',
type : 'string'
} ]
});
Test.stores.Properties = new Ext.data.Store({
model : 'Properties',
proxy : {
type : 'ajax',
url : 'test.json',
reader : {
type : 'json',
root : 'results',
totalCount : 'total'
}
},
autoLoad : true
});
Related
I have followed a Sencha guide step-by-step but I don't seem to be getting a response from my server. I'm not getting any errors in the console so I'm a bit stumped. Any help would be amazing.
Here is the store config in my view
store: {
fields: ['title', 'description', 'time', 'date', 'image', 'longdesc'],
proxy: {
type: 'jsonp',
url: 'http://mydomain.co.uk/scheduledata.json',
reader: {
type: 'json',
rootProperty: 'scheduleData'
}
}
},
itemTpl: '<div class="white-circle">{time}</div> <div class="list-title">{title}</div> <div class="list-desc">{description}</div><div class="arrow-right"></div>'
and the JSON file hosted on my server.
{
"scheduleData" : [
{
"title" : "Event One",
"description" : "Meet and Greet",
"time" : "10:45",
"date" : "Friday",
"image" : "./resources/imageone.jpg",
"longdesc" : "This is a longer description"
},
{
"title" : "Event Two",
"description" : "Q and A",
"time" : "11:00",
"date" : "Friday",
"image" : "./resources/imagetwo.jpg",
"longdesc" : "This is a longer description still"
}
]
}
UPDATE: Here is the full JS file with config:
Ext.define('scheduleApp.view.Home', {
//extend: 'Ext.Panel',
//xtype: 'homepanel',
extend: 'Ext.navigation.View',
xtype: 'schedulepanel',
id: 'sched',
config: {
navigationBar: {
hidden: true
},
title: '<span class="logo"></span>',
items: [
{
xtype: 'container',
layout: 'vbox',
items: [
{
xtype: 'container',
flex: 2,
items: [
{
xtype: 'container',
layout: {
type: 'hbox'
},
items: [
{
html: '<img src="./resources/map.jpg" width="100%" height="100%"/>'
}
]
}
]
},
{
xtype: 'container',
flex: 5,
layout: {
type: 'fit'
},
items: [
{
xtype: 'list',
store: {
type: 'tree',
sorters: 'date',
fields: ['title', 'description', 'time', 'date', 'image', 'longdesc'],
proxy: {
type: 'jsonp',
url: 'http://www.mydomain.co.uk/scheduledata.json',
reader: {
type: 'json',
rootProperty: 'scheduleData'
}
}
},
itemTpl: '<div class="white-circle">{time}</div> <div class="list-title">{title}</div> <div class="list-desc">{description}</div><div class="arrow-right"></div>'
}
]
}
]
}
]
}
});
did you try to set the store to autoload: true?
I'm just learning sencha touch 2, MVC. I would to make a simple form that get a value, pass to a PHP file (for an API call to a web-service), move to a Nested List and show results.
But, my app doesn't show nothing after submit... Value is captured correctly (I see it in console log).
Please someone could me help?
Consider for testing that for now I don't pass value, and my API call calls directly with a hard-coded value. In future I'll work to pass form value...
Thank you in advance!
This is "app.js"
Ext.application({
name: 'Appre',
icon: 'resources/icons/icon.png',
phoneStartupScreen: 'resources/images/phone_startup.png',
//tabletStartupScreen: 'tablet_startup.png',
glossOnIcon: false,
//profiles: ['Phone', 'Tablet'],
views : ['Viewport','SearchCap','ElencoRistoranti'],
models: ['ElencoRistoranti'],
stores: ['RistorantiCap'],
controllers: ['SearchCap'],
viewport: {
layout: {
type: 'card',
animation: {
type: 'slide',
direction: 'left',
duration: 300
}
}
},
launch: function() {
Ext.create('Appre.view.Viewport')
} // launch: function() {
}) // Ext.application
This is form "search cap"
Ext.define('Appre.view.SearchCap', {
extend: 'Ext.form.Panel',
xtype: 'appre-searchCap',
config: {
items: [{
xtype: 'fieldset',
layout: 'vbox',
items: [{
xtype: 'textfield',
name: 'cap',
placeHolder: 'Cap'
},
{
xtype: 'button',
text: 'Cerca',
action :'searchCap',
id:'btnSubmitLogin'
}] // items
}] // items
}, // config
initialize: function() {
this.callParent(arguments);
console.log('loginform:initialize');
}
});
This is controller
Ext.define('Appre.controller.SearchCap', {
extend : "Ext.app.Controller",
config : {
refs : {
btnSubmitLogin: 'button[action=searchCap]',
form : 'appre-searchCap'
},
control : {
btnSubmitLogin : {
tap : "onSubmitLogin"
}
}
},
onSubmitLogin : function() {
console.log("onSubmitLogin");
var values = this.getForm().getValues();
console.log(values);
var $this=this;
Ext.Ajax.request({
url: 'cerca-ristoranti-cap.php',
method: 'POST',
params: {
values: Ext.encode({form_fields: values})
},
success: function(response, opts) {
var obj = Ext.decode(response.responseText);
//Ext.Msg.alert('Contact Complete!', obj.responseText);
$this.resetForm();
Ext.Viewport.add(Ext.create('Appre.view.ElencoRistoranti'));
Ext.Viewport.setActiveItem(Ext.create('Appre.view.ElencoRistoranti'));
},
failure: function(response, opts) {
console.log('server-side failure with status code ' + response.status);
}
});
},
resetForm: function() {
this.getForm().reset();
},
launch : function() {
this.callParent();
console.log("LoginForm launch");
},
init : function() {
this.callParent();
console.log("LoginForm init");
}
});
And this is Nested List
Ext.define('Appre.view.ElencoRistoranti', {
extend: 'Ext.Panel',
xtype: 'appre-elencoristoranti',
config: {
xtype: 'nestedlist',
title: 'Cap',
displayField: 'name',
store: {
type: 'tree',
fields: [
'id_restaurant', 'name',
{name: 'leaf', defaultValue: true}
],
root: {
leaf: false
},
proxy: {
type: 'ajax',
url: 'cerca-ristoranti-cap.php',
reader: {
type: 'json',
rootProperty: 'restaurants'
} //reader
} // proxy
},
detailCard: {
xtype: 'panel',
scrollable: true,
styleHtmlContent: true
},
listeners: {
itemtap: function(nestedList, list, index, element, post) {
this.getDetailCard().setHtml(post.get('name'));
}
}
} // config
});
cerca-ristoranti-cap.php it's a simple function that returns an array like this:
{
"restaurants":[{
"id_restaurant":"40",
"name":"La Saliera",
"zip":"00128",
"lat":"41.7900229",
"lgt":"12.4513128"
}, {
"id_restaurant":"64",
"name":"Osteria del Borgo",
"zip":"00128",
"lat":"41.7887363",
"lgt":"12.5149867"
}]
}
Hi #sineverba sorry for response a little late, but here something this how you want show,
Viewport.js
Ext.define('myapp.view.Viewport' , {
extend : 'Ext.viewport.Default',
xtype : "viewport",
config: {
fullscreen: true,
styleHtmlContent: true,
style: 'background:#ffffff;',
layout : 'card',
autoDestroy : false,
cardSwitchAnimation : 'slide',
items: [
{
xtype: 'appre-searchCap'
},
],
}
})
app.js
Ext.Loader.setConfig({
enabled: true
})
Ext.application({
name: 'myapp',
requires: [
'myapp.view.SearchCap',
'myapp.view.ElencoRistoranti',
'myapp.view.SearchElenco',
],
controllers: ['SearchCap'],
models: ['myapp.model.SearchCapModel'],
launch: function() {
Ext.create('myapp.view.Viewport')
}
});
SearchCapModel.js
Ext.define('myapp.model.SearchCapModel', {
extend: 'Ext.data.Model',
config: {
idProperty: 'id_restaurant',
fields: [
{ name: 'id_restaurant', type: 'string' },
{ name: 'name', type: 'string'},
{ name: 'zip', type: 'string' },
{ name: 'lat', type: 'string'},
{ name: 'lgt', type: 'string'}
],
}
})
SearchCapStore.js
Ext.define('myapp.store.SearchCapStore', {
extend: 'Ext.data.Store',
config: {
model: 'myapp.model.SearchCapModel',
autoLoad: true,
proxy: {
type: 'ajax',
url : 'cerca-ristoranti-cap.json',
reader: {
type: 'json',
rootProperty: 'restaurants'
} //reader
},
}
});
SearchCap.js
Ext.define('myapp.controller.SearchCap', {
extend : "Ext.app.Controller",
views: ['SearchElenco'],
config : {
refs : {
elencoListContainer: 'elencolistcontainer',
btnSubmitLogin: 'button[action=searchCap]',
form : 'appre-searchCap',
},
control : {
btnSubmitLogin : {
tap : "onSubmitLogin"
}
}
},
onSubmitLogin : function() {
console.log("onSubmitLogin");
var values = this.getForm().getValues();
console.log(values);
Ext.Ajax.request({
url: 'cerca-ristoranti-cap.json',
method: 'POST',
params: {
values: Ext.encode({form_fields: values})
},
success: function(response, opts) {
var obj = response.responseText;
Ext.Msg.alert('Contact Complete!', obj);
Ext.Viewport.add(Ext.create('myapp.view.SearchElenco'));
Ext.Viewport.setActiveItem(1);
},
failure: function(response, opts) {
console.log('server-side failure with status code ' + response.status);
}
});
},
resetForm: function() {
this.getForm().reset();
},
launch : function() {
this.callParent();
console.log("LoginForm launch");
},
init : function() {
this.callParent();
console.log("LoginForm init");
}
});
SearchElenco.js
Ext.define('myapp.view.SearchElenco', {
extend: 'Ext.Container',
xtype: 'elencolistcontainer',
requires: ['myapp.store.SearchCapStore'],
initialize: function() {
this.callParent(arguments);
var s = Ext.create('myapp.store.SearchCapStore')
var notesList = {
xtype: 'appre-elencoristoranti',
store: Ext.getStore(s).setAutoLoad(true),
listeners: {
disclose: {
fn: this.onNotesListDisclose,
scope: this
}
}
};
this.add([notesList])
},
onNotesListDisclose: function(list, record, target, index, event, options) {
console.log('editNoteCommand');
this.fireEvent('editNoteCommand', this, record);
},
config: {
layout: {
type: 'fit'
}
}
});
ElencoRistoranti.js
Ext.define('myapp.view.ElencoRistoranti', {
extend: 'Ext.dataview.List',
xtype: 'appre-elencoristoranti',
id: 'appreElenco',
config: {
emptyText: '<pre><div class="notes-list-empty-text">No list found.</div></pre>',
onItemDisclosure: false,
itemTpl: '<pre><div class="list-item-title">{id_restaurant}</div><div class="list-item-narrative">{name}</div></pre>',
}
});
SearchCap.js - View
Ext.define('myapp.view.SearchCap', {
extend: 'Ext.form.Panel',
xtype: 'appre-searchCap',
id: 'appreSearchCap',
config: {
layout: {
type: 'vbox',
},
items: [
{
xtype: 'fieldset',
title: 'Cap',
instructions: 'Enter Cap',
items: [
{
xtype: 'textfield',
name: 'cap',
placeHolder: 'Cap'
},
{
xtype: 'button',
text: 'Cerca',
ui: 'confirm',
action :'searchCap',
id:'btnSubmitLogin'
}
] // items
}
] // items
}, // config
initialize: function() {
this.callParent(arguments);
console.log('loginform:initialize');
}
});
I hope help you and if you have a dude please let me know. :)
I'm a new sencha learner , what i want to do is adding an image to the nested list text.
I tried to modify kithcensink exapmle code,This is my nestedlist
Ext.require('Ext.data.TreeStore', function() {
Ext.define('Kitchensink.view.NestedList', {
requires: ['Kitchensink.view.EditorPanel', 'Kitchensink.model.Kategori'],
extend: 'Ext.Container',
config: {
layout: 'fit',
items: [{
xtype: 'nestedlist',
store: {
type: 'tree',
id: 'NestedListStore',
model: 'Kitchensink.model.Kategori',
root: {},
proxy: {
type: 'ajax',
url: 'altkategoriler.json'
}
},
displayField: 'text',
listeners: {
leafitemtap: function(me, list, index, item) {
var editorPanel = Ext.getCmp('editorPanel') || new Kitchensink.view.EditorPanel();
editorPanel.setRecord(list.getStore().getAt(index));
if (!editorPanel.getParent()) {
Ext.Viewport.add(editorPanel);
}
editorPanel.show();
}
}
}]
}
});
});
I modified the store file
var root = {
id: 'root',
text: 'Lezzet Dünyası',
items: [
{
text: 'Ana Menü',
id: 'ui',
cls: 'launchscreen',
items: [
{
text: 'Et Yemekleri',
leaf: true,
view:'NestedList3',
id: 'nestedlist3'
},
{
text: 'Makarnalar',
leaf: true,
view: 'NestedList2',
id: 'nestedlist2'
},
{
text: 'Tatlılar',
leaf: true,
view: 'NestedList4',
id: 'nestedlist4'
},
{
text: 'Çorbalar',
view: 'NestedList',
leaf: true,
id: 'nestedlist'
}
]
}
]
};
How should I edit the code to add image near the nested list text ?
For example , in this site you can see a nested list example , I need an images near Blues,Jazz,Pop,Rock.
Generally, you can do more than what you need by customizing your getItemTextTpl (place it into your Ext.NestedList definition, for example:
getItemTextTpl: function(node) {
return '<span><img src="image_url" alt="alternative_text">{text}</span>';
}
Define whatever template you like through that returning string.
I've seen quite a few examples of a sencha touch app with a nestedList that creates a view within the getDetailCard method and all of that works fine. BUT I have not seen this implemented in an MVC setup. More specifically, a splitview MVC app where the nestedList is docked to the left and the detail pane to the right.
I can use setActiveItem to display a fullscreen detail view with the relevant data all day but when doing so, the left docked nestedlist is removed. How do I keep the split-view setup and update the detailView?
Controller: Products.js
/**
* #class Products
* #extends Ext.Controller
*/
Ext.regController('Products', {
// index action
index: function(){
if ( ! this.indexView){
this.indexView = this.render({
xtype: 'ProductIndex',
});
}
this.application.viewport.setActiveItem(this.indexView);
},
detail: function(options){
var record = options.params[0].attributes.record.data;
console.log(record);
if ( ! this.detailView){
this.detailView = this.render({
xtype: 'ProductDetail',
//data: record
});
//var detailsView = this.indexView.query('#detailsView')[0];
this.detailView.update(record);
}
//this.application.viewport.setActiveItem(this.detailView, options.animation);
}
});
Model: Product.js
Ext.regModel('Product', {
fields: [
{name: "id", type: "int"},
{name: "pid", type: "int"},
{name: "type", type: "string"},
{name: "status", type: "string"},
{name: "title", type: "string"},
{name: "content", type: "auto"},
{name: "date", type: "string"},
{name: "modified", type: "string"}
]
});
MVCApp.ProductStore = new Ext.data.TreeStore({
model: 'Product',
autoLoad: true,
storeId: 'ProductStore',
proxy: {
type: 'ajax',
id: 'ProductStore',
url: 'data/nestedProducts.json',
reader: {
type: 'tree',
root: 'items'
}
}
});
View: ProductIndexView.js
KCI.views.ProductIndex = Ext.extend(Ext.Panel, {
layout: 'hbox',
dockedItems: [
{
dock: 'left',
xtype: 'nestedlist',
width: '320',
height: '100%',
store: 'ProductStore',
displayField: 'title',
useToolbar: Ext.is.Phone ? false : true,
getDetailCard : function(record, parentRecord){
Ext.dispatch({
controller : 'Products',
action : 'detail',
historyUrl : 'Products/index',
params : [record, parentRecord]
});
}
}
],
items: [
{
xtype: 'ProductDetail',
itemId: 'detailView',
width: "704",
height: '100%'
}
]
});
Ext.reg('ProductIndex', KCI.views.ProductIndex);
View: ProductDetailView.js
KCI.views.ProductDetail = Ext.extend(Ext.Panel, {
scroll: 'vertical',
styleHtmlContent: true,
background: '#464646',
html: '<h1>Product Detail</h1>',
tpl: ['{title}<br />{id}<br />{pid}<br />{leaf}<br />{date}<br />{modified}<br />{type}<br />{status}<div>{content}</div>']
});
Ext.reg('ProductDetail', KCI.views.ProductDetail);
Try creating a sub viewport which will contain detail pane. Then you can just setActiveItem for that viewport instead of the application viewport.
I have the answer, this will slide the detail card out, update it and slide it back in.
In my Products controller, I needed to alter my detail view:
detail: function(options)
{
this.currentItem = options.params[0].attributes.record.data;
var rightPanel = this.application.viewport.query('#rightPanel')[0];
if ( ! this.detailView)
{
this.detailView = this.indexView.query('#detailView')[0];
this.dummyView = this.indexView.query('#dummyView')[0];
this.dummyView.on('activate', function()
{
this.detailView.update(this.currentItem);
rightPanel.setActiveItem(this.detailView, {type: 'slide'});
}, this);
}
rightPanel.setActiveItem(this.dummyView, {type: 'slide', reverse: true});
}
Then in my Product Index view, create a sub panel and a dummyview:
var rightPanel = new Ext.Panel({
layout: 'card',
xtype: 'rightPanel',
itemId: 'rightPanel',
items: [
{
xtype: 'ProductDetail',
itemId: 'detailView',
width: "704",
height: '100%',
html: 'right panel'
},
{
itemId: 'dummyView'
}
]
});
EDIT: Wanted to reference my source, and highly talented ST dev: CAM
I am trying to pull few records from the Database and show it as a list on one of the panels(or screen). But I cant see anything on the screen. Please help me where I'm wrong.
The server returns a JSON response
{"success":true,"savedDeals":[
{"dealId":"17","dealName":"$2 Off Any Sandwich","dealText":"Valid with the purchase of any drink on Tuesday through Thursday from 11am to 4pm. Cannot be combined with other offers.","dealCategory":"Restaurant","dealCount":"0","dealRemaining":99999},
{"dealId":"21","dealName":"$10 OFF Kid's Clothing & Gifts","dealText":"Spend $50 and receive $10 off your total purchase","dealCategory":"Baby\/Kids","dealCount":"3","dealRemaining":3}
]}
The Model looks like :
myapp.models.SavedDeals = Ext.regModel("myapp.models.savedDeals", {
fields: [
{name : "dealId", type: "int"},
{name : "dealName", type : "string"},
{name : "dealText", type : "string"},
{name : "dealImg", type : "string"},
{name : "dealCategory", type : "string"},
{name : "dealCount", type : "int"},
{name : "dealRemaining", type : "int"},
]
});
The store Looks like
myapp.stores.SSavedDeals = new Ext.data.Store({
model: 'myapp.models.savedDeals',
autoload: true,
id : 'savedDealsStore',
proxy: {
type: 'ajax',
url: '/myappfiles/savedDeals.php',
params: {
UserID: '62'
},
reader: {
type: 'json',
root: 'savedDeals',
}
},
});
and the view looks like
myapp.views.DealraiserSavedDeals = Ext.extend(Ext.Panel,{
fullscreen : true,
standardSubmit : false,
dockedItems: [{
xtype: 'toolbar',
title: 'Deals List',
dock: 'top',
items: [{
xtype: 'button',
text: 'Home',
ui: 'Home',
handler: function(){
myapp.views.viewport.setActiveItem(myapp.views.dealraiserHome , 'slide');
}
}]
},
],
items: [{
xtype: 'list',
id : 'savedList',
emptyText : 'No data available.',
store: myapp.stores.SSavedDeals,
itemTpl: '{dealName}'
}]
initComponent: function() {
myapp.stores.SSavedDeals.load();
myapp.views.DealraiserHome.superclass.initComponent.apply(this, arguments);
}
});
Please help, what should I do to fix this issue.
Thanks.
I think the culprit is the fact your are calling a different class' superclass' initComponent method, if that makes sense!
initComponent: function() {
myapp.stores.SSavedDeals.load();
myapp.views.**DealraiserSavedDeals**.superclass.initComponent.apply(this, arguments);
}
You are also missing a comma after the 'items' array just before the initComponent definition.
After making those changes the list was showing up for me on a local copy - the only difference being I loaded the data in as an array rather than from your PHP file.