PDA

View Full Version : [FIXED] grid edit fields lost after upgrade



gatherworks
24 Aug 2012, 5:39 AM
After upgrading the project to ExtJs4.1 with Architect 2.1, all grid panels that had edit properties of type string, were lost. Edit properties with objects starting with {, were not lost.

Other than having to fix lost of missing code in the upgraded projects, Architect 2.1 is so much faster on our large project. Thanks!

jjohnston
24 Aug 2012, 7:31 AM
I'm not following what you mean... what are you referring to when you say "edit properties"? Can you clarify please?

gatherworks
24 Aug 2012, 7:40 AM
When you select a specific column in the grid, you can set the "editor" property. That is lost on conversion.

jjohnston
24 Aug 2012, 7:46 AM
Ah, thanks, that's much clearer.

gatherworks
24 Aug 2012, 9:43 AM
Also, even though the editor properties of type "object" got retained after the convert... it turns out that when you try to edit them, the editor for the "editor" property is empty. If you add it again and look at the source code, you will now see two entries for editor. Now when you edit the editor property, it retains the value, but you still have duplicate json definitions for the editor so that will screw things up later when you make changes and it picks the wrong version to edit vs what is used to execute.

gatherworks
24 Aug 2012, 10:50 AM
This is an example of the metadata:


{
"type": "gridcolumn",
"reference": {
"name": "columns",
"type": "array"
},
"codeClass": null,
"userConfig": {
"designer|userClassName": "MyColumn98",
"dataIndex": "name",
"editor": [
"{",
" xtype: 'textfield',",
" allowBlank: false",
"}"
],
"text": "Name"
},
"designerId": "f731d0b1-f5da-44cf-8f18-6cf3c32a7eeb",
"cn": [
{
"type": "textfield",
"reference": {
"name": "editor",
"type": "object"
},
"codeClass": null,
"userConfig": {
"designer|userClassName": "MyTextField109",
"allowBlank": false
},
"designerId": "d2b5ccdb-93a8-4452-95ce-42bce08f19bb"
}
]
},


This is the code seen inside Architect:


xtype: 'gridcolumn',
dataIndex: 'name',
editor: {
xtype: 'textfield',
allowBlank: false
},
text: 'Name',
editor: {
xtype: 'textfield',
allowBlank: false
}


So my question is, how do i clean this up? How do I remove the duplicate editor definition. I am not able to do this through the Architect GUI.

jjohnston
24 Aug 2012, 12:19 PM
We're working on a fix for these issues. The way that editor is handled got out of sync between 4.0 and 4.1 so upgrading puts it in an in-between state.

In the meantime, you should be able to remove the child textfield from the grid column to get back to a single value. Note that after the next update we will switch it back automatically to using the child textfield, but that should be seamless for you.

gatherworks
24 Aug 2012, 12:21 PM
Thanks - I have too many of these to remove / re-add the textfield. I assume I can just limb along like this until the next release comes out? and it will fix the issues that I am having?

Any rough estimate on timeframe?

Thanks!