PDA

View Full Version : [FIXED] Group Field property on store is lost when loading a project



bbrookfield
16 Aug 2012, 10:49 AM
I have a Project that has a store with a groupFielld specified. When I exit and re-start Architect 2,1 The groupField is blank. This did not happen in prior version.

aconran
16 Aug 2012, 12:31 PM
Could you provide us a little more details?

I just tried a simple test. Created an Ext JS 4.1.x project, created a json store, set the groupField to "test". Saved the project and reopened the project.

The groupField was still there. Are you binding to a model? What framework? Any details you can give us would be helpful.

bbrookfield
16 Aug 2012, 12:41 PM
Sorry, Should have provided more details

Framework: Touch
Not binding to Model (Fields defined in store)

I have a LIST component tied to store with grouped option checked.

My project has 40 stores with 25 views. This is the only store that has a group field

Here is store def


Ext.define('MyApp.store.InspectionsStore', {
extend: 'Ext.data.Store',
alias: 'store.InspectionsStore',


config: {
autoLoad: false,
clearOnPageLoad: false,
groupDir: 'ASC',
groupField: 'inspector_name',
storeId: 'InspectionsStore',
fields: [
{
name: 'ao_nbr'
},
{
name: 'case_nbr'
},
{
name: 'visit_nbr'
},
{
name: 'route'
},
{
name: 'select_date'
},
{
name: 'inspector'
},
{
name: 'inspector_name'
},
{
name: 'location'
},
{
name: 'violation'
},
{
name: 'viol_desc'
},
{
name: 'case_type_descr'
},
{
name: 'select_date_label'
}
],
sorters: {
property: 'inspector_name'
}
}
});

aconran
16 Aug 2012, 12:50 PM
Still can't reproduce.

Started a Touch Project
Created a List
Created a Store
Added 4 fields to that store: name, model, price, type
Set groupFeld to "type"
Bound store to the list


Save & quit project, reopen still persists. I also tested setting the groupField to a value that wasn't in the store like "foobar", saving & reopening, still persists. Any other steps? can you reproduce this?

bill@perdasys.com
16 Aug 2012, 4:25 PM
OK,

Attached is zip of a simple project that loses the groupField after save.
add the groupfield F2 then save and exit. Then load again and groupField is gone

I created a Sencha touch 2 project.
Added a store
defined 3 fields f1, f2 f3
selected f2 as groupField
add sorter
set property to f2
saved project
exited architech
started architech
groupField was blank (sorter was still there)

Tried it again with no sorter and it works properly
Tried it again with sorter defined and it fails. I deleted the sorter and saved and it still fails.
Very strange

bill@perdasys.com
21 Aug 2012, 3:42 PM
Still an Issue in latest build 588

PlasmaTek
22 Aug 2012, 12:57 AM
I get this error too. The groupField property on my stores is lost every time I reopen my project.

I can confirm that the groupField is saved to the metadata file, but does not seem to be parsed back in on opening the project.



{
"type": "jsonstore",
"reference": {
"name": "items",
"type": "array"
},
"codeClass": null,
"userConfig": {
"designer|userClassName": "SpecialStore",
"storeId": "PermissionsStore",
"defaultSortDirection": "DESC",
"sortRoot": null,
"groupDir": null,
"groupField": "ModuleID"
},


38144



Ext.define('my.SpecialStore, {
extend: 'Ext.data.Store',
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'PermissionsStore',
defaultSortDirection: 'DESC',
proxy: {
type: 'ajax',
directionParam: 'Direction',
extraParams: {
Query: ''
},
limitParam: 'Limit',
simpleSortMode: true,
sortParam: 'Sort',
startParam: 'Start',
url: '/List,
headers: {
'Content-Type': 'application/json',
'Active-WCF': 'true'
},
reader: {
type: 'json',
idProperty: 'ID',
root: 'Roles',
successProperty: 'Success',
totalProperty: 'Count'
}
},
fields: [
{
name: 'ID',
sortType: 'asText',
type: 'string'
},
{
name: 'ModuleName',
sortType: 'asText',
type: 'string'
},
{
name: 'Action',
sortType: 'asText',
type: 'string'
},
{
name: 'ModuleID',
sortType: 'asText',
type: 'string'
},
{
name: 'Description'
},
{
name: 'Selected'
}
]
}, cfg)]);
}
});