Code:
Ext.ns('app');
app.EntryEdit = Ext.extend(Ext.Window, {
initComponent : function()
{
var yesnoStore = new Ext.data.SimpleStore({
fields:['value','label'],
data: [ ["1","Yes"],
["0","No"],
[null,'Unkown']]});
Ext.apply(this,{
width:500,
height:300,
border:false,
layout:'fit',
title:'Edit Entry',
items : {
xtype:'form',
defaults: {width: 200},
defaultType: 'textfield',
bodyStyle:'padding:10px',
monitorValid:true,
items : [
{
fieldLabel:"Title",
name:"title",
allowBlank:false
},
{
xtype:"combo",
store: new Ext.data.SimpleStore({
fields:['value','label'],
data: [ ["OPEN","Open"],
["READY","Ready"],
["REVIEW","On Review"],
["CLOSED","Closed"]
]}),
fieldLabel:"Status",
triggerAction: 'all',
valueField:'value',
displayField:'label',
mode: 'local',
lazyRender:true,
hiddenName:"status"
},{
xtype:"combo",
store: new Ext.data.SimpleStore({
fields:['value','label'],
data: [ ["W","Windows"],
["M","Mac"],
[null,'Unkown']
]}),
fieldLabel:"Win/Mac",
triggerAction: 'all',
valueField:'value',
displayField:'label',
mode: 'local',
lazyRender:true,
hiddenName:"winmac"
},{
xtype:"combo",
store: yesnoStore,
fieldLabel:"Public",
triggerAction: 'all',
valueField:'value',
displayField:'label',
mode: 'local',
lazyRender:true,
hiddenName:"public"
}
]
},
buttons: [
{
text: 'Save',
handler: this.onEntrySave,
scope:this
}
]
});
app.EntryEdit.superclass.initComponent.apply(this, arguments);
}
,onEntrySave : function()
{
}
});
And this to load up the window