PDA

View Full Version : load some,distinct data from store in view.View



tmchedlishvili
3 Jul 2013, 11:12 PM
hello
i'm interesting in possibility of loading some,distinct data from store in View.view
i want

var tpl = new Ext.XTemplate( '<font size="5">Title</font> ',
'<tpl for=".">',
'<div style="margin-bottom: 20px;" class="valuer">',
'<p/> some text <span>{#}.{templateId}',
'</div>',
'</tpl>');
me.tpl = tpl;
},

this load all data templateId and how i can load only one for example where templateId=1 ,how can i do this with Proxy?..

dawesi
3 Jul 2013, 11:29 PM
So I'm assuming you want to only load one record into the dataview?

tmchedlishvili
3 Jul 2013, 11:39 PM
yes in my database is many data and it loads all records


1.31
2.12
3.48
.....

and my goal is load only one for example 31

tmchedlishvili
4 Jul 2013, 1:12 AM
i do it my self

var tpl = new Ext.XTemplate(
'<p>title: &nbsp; </p>',
'<tpl for=".">',

'<tpl if="this.funct(templateId)">',
<p> {templateId}

'</tpl>',
'</tpl>',
{
// XTemplate configuration:
disableFormats: true,
// member functions:
funct: function(templateId){
return templateId == "8";
}

}
);