PDA

View Full Version : Help with store timing out when inactive



anthonykulis
21 Jan 2011, 6:10 AM
So I have encountered a situtation where stores fail to connect to the server after about 15 minutes of inactivity. Any reason why? Any way to fix?




//Root element
KMS.SuggestBox = Ext.extend(Ext.form.ComboBox, {

hideTrigger: true,
minChars: 1,
allowBlank: false

});


//Extended element
KMS.PurchasePriceComboBox = Ext.extend(KMS.SuggestBox, {

//what to show
displayField: 'inventory-purchase-price',

//local validation
vtype: 'dollar',

//value submited
valueField: 'inventory-purchase-price',

//how to find
id: 'inventoryform-INVENTORY_purchase-price',

//data store
store: {

//who
xtype: 'inventorystore',

//where
api: {read: KMS.InventoryController.getPurchasePrices },

//what
reader: new Ext.data.JsonReader({
idProperty: 'INVENTORY_purchase-price',
fields: [{name: 'inventory-purchase-price', mapping: 'INVENTORY_purchase-price'}]
})
},

});


Ext.reg('purchase-price-combobox', KMS.PurchasePriceComboBox);



//store
KMS.InventoryStore = Ext.extend(Ext.data.DirectStore, {

writer: new Ext.data.JsonWriter({

encode: false,
writeAllFields: true

}),

autoSave: false

});

Ext.reg('inventorystore', KMS.InventoryStore);

mschwartz
21 Jan 2011, 6:12 AM
Session time out on the server side? 15 minutes is the timeout for PHP.

anthonykulis
21 Jan 2011, 6:34 AM
Thanks. Solved using heartbeat call.