0
Ext.application({
launch: function() {
Ext.define("User", {
extend: "Ext.data.Model",
config: {
fields: [{name: "title", type: "string"}]
}
});
var myStore = Ext.create("Ext.data.Store", {
model: "User",
proxy: {
type: "ajax",
url : "http://www.imdb.com/xml/find?json=1&nr=1&tt=on&q=twilight",
reader: {
type: "json",
rootProperty: "title_popular"
}
},
autoLoad: true
});
var view = Ext.Viewport.add({
xtype: 'navigationview',
//we only give it one item by default, which will be the only item in the 'stack' when it loads
items: [{
xtype:'formpanel',
title: 'SEARCH IMDB MOVIES ',
padding: 10,
items: [{
xtype: 'fieldset',
title: 'Search Movies from IMDB',
items: [{
xtype: 'textfield',
name : 'Movie Search',
label: 'Search Movie'
}, {
xtype: 'button',
text: 'Submit',
handler: function() {
view.push({
//this one also has a title
title: 'List of Movies',
padding: 10,
//once again, this view has one button
items: [{
xyz.show();
}]
});
}
}]
}]
}]
});
var xyz = new Ext.create("Ext.List", {
fullscreen: true,
store: myStore,
itemTpl: "{title}"
});
}
});
錯誤是與xyz.show(); 它會正常工作,如果我刪除xyz.show(); 但我想點擊按鈕移到
這之後,顯示列表上的按鈕,點擊導航視圖我想顯示列表On Button點擊顯示清單...在sencha
你在'var view = ...'之前用'var xyz = ...'試過了嗎? – 2013-03-06 07:36:54
是的....但它也沒有工作..我也想知道如何getvalue我們設置的文本框,然後點擊提交按鈕 – alpha 2013-03-06 11:32:16