sencha-SlideNavigation icon indicating copy to clipboard operation
sencha-SlideNavigation copied to clipboard

How to add List to page container?

Open ibrahimyilmaz opened this issue 12 years ago • 0 comments

Hi,

I'm trying to use your library. I'm using your example and I'm trying to add List component. But what ever I do, I couldn't make listview visible.

Could you help me for this?

Here is my simple example code.

model: Ext.define("MyProject.model.XType",{ extend:'Ext.data.Model', config:{ idProperty:"id", fields:[ {name:"id",type:"int"}, {name:"name",type:"string"} ] } })

store: Ext.define("MyProject.store.XTypes",{ extend:'Ext.data.Store', requires: [ "Ext.data.proxy.LocalStorage", "MyProject.model.XType" ], config: { model: "MyProject.model.XType", data: [ { id:"1", name: "A" }, { id:"2", name: "B" }, { id:"3",name: "C" }, { id:"4",name: "D" }, { id:"5",name: "E" }, { id:"6",name: "F" } ] }, initialize:function(){ this.callParent(arguments); console.log("XType::initialize called") } });

view: Ext.define("MyProject.view.XView",{ extend: "Ext.dataview.List", alias: "widget.xView", config: { loadingText: "Loading Notes...", emptyText: '

No notes found.
',
onItemDisclosure: true,
itemTpl: '{name}',
fullscreen: true
},
initialize:function(){
this.callParent(arguments);
    console.log("XView::initialize called");
    //this.setStore(Ext.getStore('XTypes'));
    //console.log(this.getStore());

}

});

in Main.js, I replace arbitrary html content to my view

{ xtype: 'toolbar', title: 'Item 1', docked: 'top' },{ xtype: 'xView', // Mask this item when the container is opened maskOnOpen: true }

app.js

stores:["xTypes"], views: [ "Main", "xView" ], models:["xType"],

ibrahimyilmaz avatar Aug 23 '13 15:08 ibrahimyilmaz