I am trying to save my configuration page in local storage and retrive it later. I am not quite sure how to do that. When i try to load the store using "store.load" but it says load is undefined.
我的组合页码
var flag = 1;
var count = 3;
var apptitle;
Ext.define("InfoImage.view.Settings",{
extend : Ext.form.Panel ,
requires : [
// InfoImage.view.workItemPanel ,
Ext.TitleBar , Ext.field.Text , Ext.field.Toggle ,
Ext.field.Select , Ext.layout.HBox ,
Ext.field.Number , Ext.field.Checkbox ,
Ext.form.FieldSet , Ext.field.Password ,
Ext.field.Url ],
xtype : settingsPanel ,
id : settings ,
config : {
//store: configStore ,
scrollable : {
direction : vertical
},
items : [
{
xtype : toolbar ,
ui : dark ,
docked : top ,
id: myTitle ,
title : InfoImage Settings ,
items : [
{
xtype : button ,
iconCls : home ,
iconMask : true,
ui : normal ,
id : homeSettingbtn
},
{xtype: spacer },
{
xtype : button ,
//text: Save ,
iconCls : save_fin ,
iconMask : true,
ui : normal ,
id : savebtn ,
handler : function() {
}
},
{
xtype : button ,
//text: Default ,
iconCls : default ,
iconMask : true,
ui : normal ,
handler : function() {
var form = Ext.getCmp( settings );
form.reset();
}
}
]
},
{
//fieldset defined for the Server Configuration details to be entered.
xtype : fieldset ,
title : Server Configuration ,
defaults : {
xtype : selectfield ,
labelWidth : 30% ,
},
items : [
{
xtype : urlfield ,
name : servname ,
id : servname ,
label : Server Name ,
labelWidth : 30%
},
{
xtype : numberfield ,
id : port ,
name : port ,
label : Port ,
value : 80 ,
labelWidth : 30%
},
{
xtype : selectfield ,
name : protocol ,
id : protocol ,
label : Protocol ,
labelWidth : 30% ,
usePicker : false,
//ui: action ,
//styleHtmlContent:true,
//visible:true,
//fieldStyle: background-color:#FFF; ,
handler : function() {
},
options : [ {
text : HTTP ,
value : HTTP
}, {
text : HTTPS ,
value : HTTPS
}
]
}
]
},
{
//fieldset defined for the User Configuration details to be entered.
xtype : fieldset ,
title : User Configuration ,
items : [ {
xtype : textfield ,
name : username ,
id : username ,
label : User Name ,
labelWidth : 30%
}, {
xtype : passwordfield ,
name : password ,
id : password ,
label : Password ,
labelWidth : 30%
}, {
xtype : textfield ,
id : domain ,
name : domain ,
label : Domain ,
labelWidth : 30%
} ]
},
{
//fieldset defined for the App Subtitle to be entered.
xtype : fieldset ,
items : [ {
xtype : textfield ,
name : apptitle ,
id : apptitle ,
label : App Subtitle ,
labelWidth : 30% ,
value : Mobile Client Work Manager
} ]
}
]
}
});
以及我的控制员的守则。 j)
Ext.getCmp( settings ).getStore().load();
在当地储存和重新储存这些数据,应该做些什么?