Hi there, I am new to kendoui, but I really like the way kendoui can show native feels on android, blackberry and ios devices.
I am trying to follow the sushi demo apps. But looking at the code, I notice that the checkout button doesn't do any actual server call. Unlike the menu who actually use a read transport. So, I am trying to do my practice by continuing upon the sushi demo. I have setup my rails server to response to /menus and give back array of menu json object. And I also create a separate url for order /orders. My Idea is to use order as a wrapper of menus so generally order json object will look like so:
{ id: "1", date: "today", menu: {...../*menu json object here*/} }
But I am having trouble to make this works. So I created two data source for this:
one for /menus and the other one for /orders
var ds = kendo.data.DataSource.create({
schema: schema,
transport: { read: { url: "menus", dataType: "json" } },
group: "category",
error: function() { console.log(arguments); }
});
var cartDataSource = kendo.data.DataSource.create({
//data: [],
schema: schema2,
transport: { create: { url: "orders", type: "POST" }, read: { url: "orders", dataType: "json" }},
aggregate: [{ field: "menu.price", aggregate: "sum" }]
});
Any idea on what do I do wrong?
Thank you in advance,
Fajar
I am trying to follow the sushi demo apps. But looking at the code, I notice that the checkout button doesn't do any actual server call. Unlike the menu who actually use a read transport. So, I am trying to do my practice by continuing upon the sushi demo. I have setup my rails server to response to /menus and give back array of menu json object. And I also create a separate url for order /orders. My Idea is to use order as a wrapper of menus so generally order json object will look like so:
{ id: "1", date: "today", menu: {...../*menu json object here*/} }
But I am having trouble to make this works. So I created two data source for this:
one for /menus and the other one for /orders
var ds = kendo.data.DataSource.create({
schema: schema,
transport: { read: { url: "menus", dataType: "json" } },
group: "category",
error: function() { console.log(arguments); }
});
var cartDataSource = kendo.data.DataSource.create({
//data: [],
schema: schema2,
transport: { create: { url: "orders", type: "POST" }, read: { url: "orders", dataType: "json" }},
aggregate: [{ field: "menu.price", aggregate: "sum" }]
});
Thank you in advance,
Fajar