PDA

View Full Version : Architect only showing first field in Design mode



xtrnssf
14 Aug 2013, 7:01 AM
Hello everybody,

I am having a very frustrating problem with Sencha Architect 2.2 (version: 2.2.2 Build: 991).

I have designed a store and a corresponding model (jsonp Proxy) and the data from that store seems to load fine (when I click on the eye symbol in Archtiect a window opens and I get displayed the correct data (see below).

I then have created a ListView on that store and wanted to display two fields from that store in each line. Architect shows the correct number of rows (that match the number of records in the store), but only the first item in the template is displayed:

45354

The corresponding itemTemplate is defined as

<div>{CAL_CALENDAR_ID} {CAL_SHORT_NAME}</div>
So I expected to see not only the ID (first field), but also the corresponding short name for the ID. I can define any static text - that gets displayed, but it seems that after the processing of the first "variable" the processing stops and the replacement of the second placeholder never is executed. I also have tried other fields but to no avail. The CAL_CALENDAR_ID is defined as the ID field in the store.

The data definitively is within the data:

{
"success": true,
"message": "Loaded data",
"data": [
{
"CAL_CALENDAR_ID": "20",
"CAL_TITLE": "Dr. Dirk Fabrisky",
"CAL_COLOR_ID": "2",
"CAL_SURGEON": "1",
"CAL_SHORT_NAME": "Fabrisky",
"CAL_POSITION": "1"
},
{
"CAL_CALENDAR_ID": "21",
"CAL_TITLE": "Siegfried Turner",
"CAL_COLOR_ID": "27",
"CAL_SURGEON": "1",
"CAL_SHORT_NAME": "Turner",
"CAL_POSITION": "2"
},
{
"CAL_CALENDAR_ID": "22",
"CAL_TITLE": "Dr. Alexander Meier",
"CAL_COLOR_ID": "19",
"CAL_SURGEON": "1",
"CAL_SHORT_NAME": "Meier",
"CAL_POSITION": "3"
},
{
"CAL_CALENDAR_ID": "23",
"CAL_TITLE": "Dr. Benno West",
"CAL_COLOR_ID": "6",
"CAL_SURGEON": "1",
"CAL_SHORT_NAME": "West",
"CAL_POSITION": "4"
},
{
"CAL_CALENDAR_ID": "24",
"CAL_TITLE": "Dr. Andreas Völler",
"CAL_COLOR_ID": "8",
"CAL_SURGEON": "1",
"CAL_SHORT_NAME": "Völler",
"CAL_POSITION": "5"
},
{
"CAL_CALENDAR_ID": "28",
"CAL_TITLE": "Dr. Stanislaus Schultes",
"CAL_COLOR_ID": "24",
"CAL_SURGEON": "1",
"CAL_SHORT_NAME": "Schultes",
"CAL_POSITION": "6"
},
{
"CAL_CALENDAR_ID": "27",
"CAL_TITLE": "Dr. Wolfgang Schmid",
"CAL_COLOR_ID": "14",
"CAL_SURGEON": "0",
"CAL_SHORT_NAME": "Schmid",
"CAL_POSITION": "7"
},
{
"CAL_CALENDAR_ID": "25",
"CAL_TITLE": "Arzthelferin 1",
"CAL_COLOR_ID": "9",
"CAL_SURGEON": "0",
"CAL_SHORT_NAME": "AH1",
"CAL_POSITION": "8"
}
],
"totRows": 10,
"errorNo": 0
}

The store definition:

Ext.define('ArsPilot.store.calendarStore', {
extend: 'Ext.data.Store',

requires: [
'ArsPilot.model.calendarModel'
],

config: {
autoLoad: true,
destroyRemovedRecords: false,
model: 'ArsPilot.model.calendarModel',
storeId: 'storeCalendar',
proxy: {
type: 'jsonp',
url: 'http://localhost/JS/DEV/ars-medic/remote/php/app.php/doctors/view?mode=cal',
callbackKey: 'callbackCalendar',
reader: {
type: 'json',
idProperty: 'CAL_CALENDAR_ID',
messageProperty: 'message',
rootProperty: 'data',
totalProperty: 'totRows'
}
}
}
});

And finally the model definition:

Ext.define('ArsPilot.model.calendarModel', {
extend: 'Ext.data.Model',

config: {
idProperty: 'CAL_CALENDAR_ID',
fields: [
{
allowNull: false,
mapping: 'CAL_CALENDAR_ID',
name: 'CAL_CALENDAR_ID',
type: 'int'
},
{
mapping: 'CAL_TITLE',
name: 'CAL_TITLE',
type: 'string'
},
{
mapping: 'CAL_COLOR_ID',
name: 'CAL_COLOR_ID',
type: 'string'
},
{
mapping: 'CAL_SURGEON',
name: 'CAL_SURGEON',
type: 'string'
},
{
mapping: 'CAL_SHORT_NAME',
name: 'CAL_SHORT_NAME',
type: 'string'
},
{
mapping: 'CAL_POSITION',
name: 'CAL_POSITION',
type: 'string'
}
]
}
});

I have tried everything I could imagine, but until now I have neither found a solution nor any hint as where to look for the error.

Thx in advance for your help - any hint is highly appreciated.

Best regards from Germany,


Steffen Oliver Schulz

aconran
16 Aug 2013, 12:04 PM
I do not see anything wrong with the above :-/

When you open it in the app do you get the same result as what you see in Architect's canvas?

xtrnssf
16 Aug 2013, 1:46 PM
Thx Aaron,

when I open the preview I get all the records displayed as expected (ID plus short name).

Could this be a display bug in Architect ?

best regards,


SOS

aconran
16 Aug 2013, 3:07 PM
a stretch but did you set any mock data and forget to update it?

xtrnssf
16 Aug 2013, 3:27 PM
Believe it or not - I had already shutdown my machine as I am going on vacation tomorrow. Seeing your mail I have rebooted and reopened the project to check for stray data.

Now suddenly the data appears without me making any changes (and I had the project open to check the preview according to your last suggestion when I answered your last mail).

My platform is Mac and I am not rebooting very often (in contrast to my Windows times) and it seems that only a reboot (saving a project does not seem to fix that issue) will reset something internal.

I will close this thread now as it probably only is a paint bug in Architect Mac that can be solved by reboot.

best regards (I will go to bed now - it's 01:30 am our time :-)

SOS

xtrnssf
16 Aug 2013, 3:31 PM
Sorry - forgot: Thx for your help !!

best regards,

SOS

aconran
16 Aug 2013, 3:38 PM
If you notice how to reproduce please let us know!