-1

I am trying to integrate the bryntum component(schedule) in php. I am not much aware in ext js. Please see the images here

Here, Name fields are fetching properly, whereas Capacity is not accessing. These values are coming from Zoho CRM. My code is like Click, whereas r-read.php file is the responsible file for fetching the record from CRM and store it in a json format. It is like

{
    "success": true,
    "total": 9,
    "root": [{
        "Id": 1,
        "Name": "Sri Test",
        "Capicity": "190.0"
    }, {
        "Id": 2,
        "Name": "tester_test01",
        "Capicity": "500.0"
    }, {
        "Id": 3,
        "Name": "Tesing room 23",
        "Capicity": "5000.0"
    }, {
        "Id": 4,
        "Name": "Test for 6th product",
        "Capicity": "5000.0"
    }, {
        "Id": 5,
        "Name": "Banquet hall test-01",
        "Capicity": "500.0"
    }, {
        "Id": 6,
        "Name": "test room",
        "Capicity": "1000.0"
    }, {
        "Id": 7,
        "Name": "Grande Ballroom",
        "Capicity": "4000.0"
    }, {
        "Id": 8,
        "Name": "Cedar Room",
        "Capicity": "1400.0"
    }, {
        "Id": 9,
        "Name": "Maple Room",
        "Capicity": "1200.0"
    }]
}

In the capacity column, it will show like 190.0 , 500.0, 5000.0 etc like Name column.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Srimanta
  • 61
  • 9

2 Answers2

0

I'm not familier with the Bryntum schedular component, but most of the time when you have problems like these it's because you didn't define the Capacity field in your model.

I saw you used the following model: Sch.model.Resource. Can it be that is only has the Name field and not Capacity? Your JSON response looks fine to me.

Johan Haest
  • 4,391
  • 28
  • 37
  • But I didnt understand how to define capacity? Could you please help me? – Srimanta Feb 27 '13 at 09:30
  • First of all I did not modify anything except App.js and PHPScheduler.js file. Even I did not understand the flow of this ext js. So I didnt understand how to show the Sch.model.Resource model. – Srimanta Feb 27 '13 at 09:40
  • Ok, I think you'll have to create your own model with a Capacity field in it. But as I sayd, I've never used Bryntum schedular so I'd mail their support first. – Johan Haest Feb 27 '13 at 09:41
0

In the sample JSON above, Capacity is spelled Capicity.

See if the same spelling needs can be used everywhere. Maybe then the data will resolve properly.

ZohoCoder
  • 385
  • 5
  • 15