The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Here is the link:

I am basically trying to alternate between displaying a form and the payments grid.

Message was edited by:
I have posted on the Sencha forum too, yes.
solved the problem using inserts vs a load.

however, on subsequent returns to the grid, after the viewport center panel has displayed other forms, the fields are no longer editable for some reason.

i did a removeAll on the store prior to inserting the new detail records for the new master.

any ideas?
I have a viewport. The west region has a list of cases. The center region is for displaying content. The content varies according to menu selection option and case selected.

I display forms and grids in the variable content area. The forms work fine. The editorgrid only works (permits editing) on the initial display.

I could use tabs or cards but I would prefer to do it this way if possible.

I would greatly appreciate any suggestions. Maybe this is impossible to do with Ext, I don't know.

I couldn't find an example of this situation in the book but hope somebody has a solution. I am reloading an editorgrid store each time the user clicks on a new case. Everything seems fine as far as the object it's trying to load and the load succeeds, but no data appears from the reload. The insert does produce data on the grid however. Weird.

Here's the button code that triggers the action:

text : 'Payment Calculations',
handler : function() {
var centerRegion = Ext.getCmp('centerRegion');
if (updateForm.caseId != "") {
var record = caseStore.getAt(updateForm.idx);
jsonStr = localStorage.getItem(record.get("Case"));
if (jsonStr == null) {
var newRecord = new paymentsStore.recordType({
paymentsStore.insert(0, newRecord);
jsonObj = Ext.util.JSON.decode(jsonStr);
One other thing. I am actually not reloading the store. I am removingALL and inserting the new records. I suspect that the problem lies in the relationship between the store and the grid.
The other day you asked for a program listing and I provided you one. Now you imply you haven't the time and suggest "I try the community".

I have tried the community. Many other people have the same question and no answer has been forthcoming.

You want people to get interested in Ext and buy your little book?

Answer the questions.

You don't want to answer my question (or can't)?

Then stop wasting my time.
This is driving me NUTZ!!!

What could possibly cause the editorgrid to disable editing cells on subsequent displays?

This initial display always works fine.


Suppose I did something like this and pointed contentPanel to the various forms and grids as required?:

var vp = new Ext.Viewport({
layout : 'border',
boxMaxWidth: 980,
defaults : {
frame : true,
split : true
items : [
region : 'north',
height : 40,
items : mainTBar
region : 'west',
width : 375,
items : {}
region : 'center',
width : 605,
xtype : 'container',
layout : 'fit',
id : 'content',
items : contentPanel
Nope. I have found similar questions posted in the past but the responses are either non-existant or wrong.
I have to remove the grid if the user requests a form to display in that content area.

Then, if they request to see the grid again, perhaps for a different case, then I have to display the grid again and of course reload the store.

Again, I am working with a variable content area in the center region of a viewport..
You can test the app at

Message was edited by:
I am unable to sort by the date columns in the editorgrid. I specified sortable: true in the column model. Amounts sort fine but not the dates!

Is this a known limitation?
ok, i placed the registration code at the end of the script, but it still doesn't work.

I am referencing the id of the checkbox as the target. Is there anything else I need to place in the checkbox or form definition to sync it up?
Still doesn't work.

I suspect the problem may be in the way I am defining the form. I am using an xtype instead of an Ext.form.Panel constructor (and then adding it to a viewport region):

var switchForm = {
id : 'switchform',
xtype : 'form',
title : 'Switch Settings',
buttonAlign : 'center',
frame : true,
labelAlign : 'right',
defaultType : 'checkbox',
padding : 10,
defaults : {
padding : 10
items : [
name : 'Principal',
id : 'principal',
boxLabel : "Apply payments to principal and interest",
inputValue : true,
name : 'Oldest',
boxLabel : "Apply payments to the oldest amount due",
inputValue : true,
checked : true
yes, it's registered at the top of the script right below the Ext.QuickTips.init();
I am unable to get this to work. Registered the quicktip but doesn't display.

target: 'principal',
title: 'My Tooltip',
text: 'This tooltip was added in code',
width: 100,
dismissDelay: 20

'principal' is the id associated with the checkbox.

Ext.QuickTips.init(); is first thing executed in script.
I am reading a JSON file from localStorage and attempting to load it into a DataStore and display it in a List. Nothing is being displayed. Same code works fine when I substitute a url for the proxy.

Any ideas?

Here's the code (works fine for loading from a url):

jsonStr = localStorage.getItem("Cases");

jsonObj = Ext.util.JSON.decode(jsonStr);

var testStore = new{
proxy: new,
reader: new{
root: 'Cases',
['Case', 'Name', 'Plaintiff', 'Defendant', 'Client', 'Adverse', 'CaseNo', 'Dept', 'Docket']
Got it to work using eval. Yes, I know they're "evil", but damned useful in this case.

e.g. jsonObj = eval("(" + Ext.util.JSON.decode(jsonStr) + ")");

However, I also want to be able to write the store to the server for a backup (and read it back again for a restore).

I see there is an "each" method that would allow me to write each record out, but I would ideally like to grab the entire store object (or a stringified version of it) and write/read that.

Is this possible? Do I need a PHP program?
That'll work, thanks.

How can I best write the data object to the server?

This is all in aid of a backup/restore capability. I know how to restore from a server file, but getting it from the client to the server (from ExtJS) is the issue. Do I need a PHP program?
I would like to avoid setting each individual style class if possible. I have a List View and a Form.
Can EXTJS Be Used To Load XML Data From Local Disk?