spaceman123
24 Jan 2011, 5:39 AM
I wonder if somebody could help me please. I am trying to build my very first Sencha Touch app and although I am enjoying it I'm finding a few problems that I'm having trouble sorting. I have a strange problem at the moment and didn't know how to fix it.
I've been testing my app as I go on an iPad and in Safari and it all works fine. This morning however I decided to test it on an iPhone. It all loaded okay and the forms loaded no problems. The problem occurred when I tried to load the nestedList stuff - on an iPhone it was completely blank :( I've not got a clue why it's not loadinging them on an iPhone.
Does anybody here know why this is happening and how I can fix it?
Thanks.
By the way the nestedList code is:
// wrap in closure to avoid global vars.
(function() {
Ext.regModel('Album', {
fields: [
{name: 'text', type: 'string'}
]
});
var txtFld = new Ext.form.Text({
label: 'Name'
});
var calculateDesiredWidth = function() {
var viewWidth = Ext.Element.getViewportWidth(),
desiredWidth = Math.min(viewWidth, 400) - 10;
return desiredWidth;
};
var editPnl = new Ext.Panel({
floating: true,
centered: true,
modal: true,
width: calculateDesiredWidth(),
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
title: 'Review Album'
},{
dock: 'bottom',
xtype: 'toolbar',
items: [{
text: 'Cancel',
handler: function() {
editPnl.hide();
}
},{
xtype: 'spacer'
},{
text: 'Change',
ui: 'action',
handler: function() {
var activeList = demos.NestedList.getActiveItem(),
record = activeList.getSelectedRecords()[0];
record.set('text', txtFld.getValue());
// Workaround: selection *should* be maintained.
activeList.getSelectionModel().select(record);
editPnl.hide();
}
}]
}],
items: [{
xtype: 'form',
items: [{
xtype: 'fieldset',
items: [txtFld]
}]
}]
});
Ext.EventManager.onOrientationChange(function() {
editPnl.setWidth(calculateDesiredWidth());
});
var editBtn = new Ext.Button({
text: 'Review',
disabled: true,
handler: function() {
editPnl.show();
var activeList = demos.NestedList.getActiveItem(),
record = activeList.getSelectedRecords()[0];
txtFld.setValue(record.get('text'));
}
});
var actionBar = new Ext.Toolbar({
ui: 'decline',
ui: 'action',
ui: 'confirm',
dock:'bottom',
items:[
{ ui: 'confirm', text: 'View' },
{ ui: 'action', text: 'Review' },
{ ui: 'decline', text: 'Report' }
]
});
var one = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../one.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.one = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: one
});
var two = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../two.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.two = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: two
});
var three = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../three.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.three = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: three
});
var four = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../four.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.four = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: four
});
var five = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../five.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.five = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: five
});
var six = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../six.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.six = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: six
});
var seven = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../seven.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.seven = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: seven
});
var eight = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../eight.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.eight = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: eight
});
var nine = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../nine.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.nine = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: nine
});
var ten = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../ten.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.ten = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: ten
});
var eleven = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../eleven.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.eleven = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: eleven
});
var twelve = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twelve.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twelve = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twelve
});
var thirteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../thirteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.thirteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: thirteen
});
var fourteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../fourteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.fourteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: fourteen
});
var fifteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../fifteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.fifteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: fifteen
});
var sixteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../sixteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.sixteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: sixteen
});
var seventeen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../seventeen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.seventeen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: seventeen
});
var eighteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../eighteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.eighteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: eighteen
});
var nineteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../nineteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.nineteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: nineteen
});
var twenty = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twenty.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twenty = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twenty
});
var twentyone = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyone.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyone = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyone
});
var twentytwo = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentytwo.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentytwo = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentytwo
});
var twentythree = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentythree.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentythree = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentythree
});
var twentyfour = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyfour.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyfour = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyfour
});
var twentyfive = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyfive.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyfive = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyfive
});
var twentysix = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentysix.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentysix = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentysix
});
var twentyseven = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyseven.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyseven = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyseven
});
var twentyeight = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyeight.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyeight = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyeight
});
var twentynine = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentynine.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentynine = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentynine
});
// leafselected event is provided by the LeafSelectedPlugin.js
demos.NestedList.on('leafselected', function(enabled) {
editBtn.setDisabled(!enabled);
});
})();
I've been testing my app as I go on an iPad and in Safari and it all works fine. This morning however I decided to test it on an iPhone. It all loaded okay and the forms loaded no problems. The problem occurred when I tried to load the nestedList stuff - on an iPhone it was completely blank :( I've not got a clue why it's not loadinging them on an iPhone.
Does anybody here know why this is happening and how I can fix it?
Thanks.
By the way the nestedList code is:
// wrap in closure to avoid global vars.
(function() {
Ext.regModel('Album', {
fields: [
{name: 'text', type: 'string'}
]
});
var txtFld = new Ext.form.Text({
label: 'Name'
});
var calculateDesiredWidth = function() {
var viewWidth = Ext.Element.getViewportWidth(),
desiredWidth = Math.min(viewWidth, 400) - 10;
return desiredWidth;
};
var editPnl = new Ext.Panel({
floating: true,
centered: true,
modal: true,
width: calculateDesiredWidth(),
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
title: 'Review Album'
},{
dock: 'bottom',
xtype: 'toolbar',
items: [{
text: 'Cancel',
handler: function() {
editPnl.hide();
}
},{
xtype: 'spacer'
},{
text: 'Change',
ui: 'action',
handler: function() {
var activeList = demos.NestedList.getActiveItem(),
record = activeList.getSelectedRecords()[0];
record.set('text', txtFld.getValue());
// Workaround: selection *should* be maintained.
activeList.getSelectionModel().select(record);
editPnl.hide();
}
}]
}],
items: [{
xtype: 'form',
items: [{
xtype: 'fieldset',
items: [txtFld]
}]
}]
});
Ext.EventManager.onOrientationChange(function() {
editPnl.setWidth(calculateDesiredWidth());
});
var editBtn = new Ext.Button({
text: 'Review',
disabled: true,
handler: function() {
editPnl.show();
var activeList = demos.NestedList.getActiveItem(),
record = activeList.getSelectedRecords()[0];
txtFld.setValue(record.get('text'));
}
});
var actionBar = new Ext.Toolbar({
ui: 'decline',
ui: 'action',
ui: 'confirm',
dock:'bottom',
items:[
{ ui: 'confirm', text: 'View' },
{ ui: 'action', text: 'Review' },
{ ui: 'decline', text: 'Report' }
]
});
var one = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../one.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.one = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: one
});
var two = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../two.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.two = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: two
});
var three = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../three.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.three = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: three
});
var four = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../four.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.four = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: four
});
var five = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../five.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.five = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: five
});
var six = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../six.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.six = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: six
});
var seven = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../seven.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.seven = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: seven
});
var eight = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../eight.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.eight = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: eight
});
var nine = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../nine.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.nine = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: nine
});
var ten = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../ten.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.ten = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: ten
});
var eleven = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../eleven.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.eleven = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: eleven
});
var twelve = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twelve.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twelve = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twelve
});
var thirteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../thirteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.thirteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: thirteen
});
var fourteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../fourteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.fourteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: fourteen
});
var fifteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../fifteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.fifteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: fifteen
});
var sixteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../sixteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.sixteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: sixteen
});
var seventeen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../seventeen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.seventeen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: seventeen
});
var eighteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../eighteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.eighteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: eighteen
});
var nineteen = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../nineteen.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.nineteen = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: nineteen
});
var twenty = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twenty.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twenty = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twenty
});
var twentyone = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyone.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyone = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyone
});
var twentytwo = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentytwo.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentytwo = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentytwo
});
var twentythree = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentythree.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentythree = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentythree
});
var twentyfour = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyfour.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyfour = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyfour
});
var twentyfive = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyfive.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyfive = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyfive
});
var twentysix = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentysix.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentysix = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentysix
});
var twentyseven = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyseven.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyseven = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyseven
});
var twentyeight = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentyeight.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentyeight = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentyeight
});
var twentynine = new Ext.data.TreeStore({
model: 'Album',
proxy: {
type: 'ajax',
url: '../../twentynine.asp',
reader: {
type: 'tree',
root: 'items'
}
}
});
demos.twentynine = new Ext.NestedList({
plugins: [new Ext.LeafSelectedPlugin()],
toolbar: {
items: [{xtype: 'spacer'},actionBar]
},
store: twentynine
});
// leafselected event is provided by the LeafSelectedPlugin.js
demos.NestedList.on('leafselected', function(enabled) {
editBtn.setDisabled(!enabled);
});
})();