PDA

View Full Version : cars.json



mseto
18 Oct 2010, 10:58 AM
Trying to follow the "Getting Started" example.
http://docs.sencha.com/designer/Designer-Getting-Started.pdf

Can someone upload the cars.json file?

jayrobinson
18 Oct 2010, 5:01 PM
Here is the contents of the cars.json file used in the demo video:




{
data: [{
manufacturer: 'Porsche',
model: '911',
price: 135000,
wiki: 'http://en.wikipedia.org/wiki/Porsche_997',
img: '2004_Porsche_911_Carrera_type_997.jpg'
},{
manufacturer: 'Nissan',
model: 'GT-R',
price: 80000,
wiki:'http://en.wikipedia.org/wiki/Nissan_Gt-r',
img: '250px-Nissan_GT-R.jpg'
},{
manufacturer: 'BMW',
model: 'M3',
price: 60500,
wiki:'http://en.wikipedia.org/wiki/Bmw_m3',
img: '250px-BMW_M3_E92.jpg'
},{
manufacturer: 'Audi',
model: 'S5',
price: 53000,
wiki:'http://en.wikipedia.org/wiki/Audi_S5#Audi_S5',
img: '250px-Audi_S5.jpg'
},{
manufacturer: 'Audi',
model: 'TT',
price: 40000,
wiki:'http://en.wikipedia.org/wiki/Audi_TT',
img: '250px-2007_Audi_TT_Coupe.jpg'
}]
}

lostuser
20 Feb 2011, 2:02 PM
How you load this data to the Ext Designer...
You create a Folder named cars and inside cars.json or how ?


Forget it...
Hahaha Finally got it...

rlc
16 Mar 2011, 5:03 AM
Hello,

I am pretty new to the whole ExtJS thing and trying the Designer with the "Getting Started" example.

Can you tell me, where to put the cars.json file?

Regards,
Richard

lostuser
17 Mar 2011, 8:19 PM
hummm... i cant remember... i will reply you tomorrow, but i think you must create a folder named 'cars' with a cars.json inside... try this, tomorrow i check the pdf again

rlc
18 Mar 2011, 12:35 AM
I tried that. Actually I tried 'cars', 'data' and 'data/cars', but no result :-(

lostuser
18 Mar 2011, 7:52 AM
Ehm... zip-it and attach it here... i will check it fast in the next 2 hours...

rlc
18 Mar 2011, 8:06 AM
25226

thanks for looking!

lostuser
18 Mar 2011, 8:27 AM
Im having troubles with my xampp server... hate it... I will go back to wamp, let me install and run ur cars

rlc
18 Mar 2011, 8:31 AM
no need to hurry! I appreciate the help!

lostuser
18 Mar 2011, 8:41 AM
Man, your app is working fine...
Just download xampp or wamp, install and copy it to the localhost server folder
xampp--> c:\xamp\htdocs
wamp---> c:\wamp\www
Copy the files in your Ext designer folder to one of those, and just run localhost/xds_index.html in your browser... the images are not loading because the link is broken, you need to copy them in your "server" and rename the url's... If you want to see the project just like in the tutorial (in the Ext designer preview), I have no idea how to do it... I have always used wamp for preview

rlc
18 Mar 2011, 9:19 AM
installed wamp and it worked. Thnx again :-)

bmckenna1982
21 Mar 2012, 1:37 PM
Here is the contents of the cars.json file used in the demo video:




{
data: [{
manufacturer: 'Porsche',
model: '911',
price: 135000,
wiki: 'http://en.wikipedia.org/wiki/Porsche_997',
img: '2004_Porsche_911_Carrera_type_997.jpg'
},{
manufacturer: 'Nissan',
model: 'GT-R',
price: 80000,
wiki:'http://en.wikipedia.org/wiki/Nissan_Gt-r',
img: '250px-Nissan_GT-R.jpg'
},{
manufacturer: 'BMW',
model: 'M3',
price: 60500,
wiki:'http://en.wikipedia.org/wiki/Bmw_m3',
img: '250px-BMW_M3_E92.jpg'
},{
manufacturer: 'Audi',
model: 'S5',
price: 53000,
wiki:'http://en.wikipedia.org/wiki/Audi_S5#Audi_S5',
img: '250px-Audi_S5.jpg'
},{
manufacturer: 'Audi',
model: 'TT',
price: 40000,
wiki:'http://en.wikipedia.org/wiki/Audi_TT',
img: '250px-2007_Audi_TT_Coupe.jpg'
}]
}


This file doesn't show anything about "quality" which the tutorial (http://www.sencha.com/learn/build-a-car-store-with-ext-designer-1-2-and-ext-js-4/) mentions. Is there an update version of cars.json??

johnpavlin
14 Apr 2012, 10:17 AM
put the "cars" folder in the same location as the carListings.xds. Then put the cars.json into the cars folder.

The preferred json format includes quotes, etc. Try this one....
{
"data": [{
"manufacturer": "Porsche",
"model": "911",
"price": 135000,
"wiki": "http://en.wikipedia.org/wiki/Porsche_997",
"img": "2004_Porsche_911_Carrera_type_997.jpg"
},{
"manufacturer": "Nissan",
"model": "GT-R",
"price": 80000,
"wiki":"http://en.wikipedia.org/wiki/Nissan_Gt-r",
"img": "250px-Nissan_GT-R.jpg"
},{
"manufacturer": "BMW",
"model": "M3",
"price": 60500,
"wiki":"http://en.wikipedia.org/wiki/Bmw_m3",
"img": "250px-BMW_M3_E92.jpg"
},{
"manufacturer": "Audi",
"model": "S5",
"price": 53000,
"wiki":"http://en.wikipedia.org/wiki/Audi_S5#Audi_S5",
"img": "250px-Audi_S5.jpg"
},{
"manufacturer": "Audi",
"model": "TT",
"price": 40000,
"wiki":"http://en.wikipedia.org/wiki/Audi_TT",
"img": "250px-2007_Audi_TT_Coupe.jpg"
}]
}