Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add List to page container? #60

Open
ibrahimyilmaz opened this issue Aug 23, 2013 · 0 comments
Open

How to add List to page container? #60

ibrahimyilmaz opened this issue Aug 23, 2013 · 0 comments

Comments

@ibrahimyilmaz
Copy link

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"],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant