Our powerful JS Calendar component


Post by codevlabs »

Dear Support,

I refer to your latest release notes which mention that fetchOptions was depreciated.
CrudManager.transport.load.fetchOptions (v5.0.0)

I can confirm that FetchOptions was working fine in the following configuration
"@bryntum/core-angular-thin": "5.6.8",
"@bryntum/core-thin": "5.6.8",
"@bryntum/engine-thin": "5.6.8",
"@bryntum/grid-thin": "5.6.8",
"@bryntum/scheduler-angular-thin": "5.6.8",
"@bryntum/scheduler-thin": "5.6.8",
"@bryntum/calendar-angular-thin": "5.6.8",
"@bryntum/calendar-thin": "5.6.8",

But it stopped working in this configuration.
"@bryntum/core-angular-thin": "6.0.0-alpha-1",
"@bryntum/core-thin": "6.0.0-alpha-1",
"@bryntum/engine-thin": "6.0.0-alpha-1",
"@bryntum/grid-thin": "6.0.0-alpha-1",
"@bryntum/scheduler-angular-thin": "6.0.0-alpha-1",
"@bryntum/scheduler-thin": "6.0.0-alpha-1",
"@bryntum/calendar-angular-thin": "6.0.0-alpha-1",
"@bryntum/calendar-thin": "6.0.0-alpha-1",

Some questions please;

What was the main reason behind this deprecation?
Is there another way to pass options in the CrudManager data loading section?

We have tried multiple ways to satisfy the requirements of this request but so far we were unsuccessful. We are committed to increasing security but also need to work around a stable live environment.

Any insights such as best practice on this issue would be appreciated.


Post by mats »

If you check the sources of the 5.6.8, there's documentation with guidance on how to migrate your code. You simply move the options one level up:

@property {Object} [transport.load.fetchOptions] **DEPRECATED:** Any Fetch API options can be simply defined on
the upper configuration level:
```javascripttransport : {
    load : {
        url          : 'http://mycool-server.com/load.php',
        // HTTP request parameter used to pass serialized "load"-requests
        paramName    : 'data',
        // Fetch API options
        method       : 'GET',
        credentials  : 'include'
    },
    ...
}
```

If you can't get it working, please post your code here and we'll help out.


Post by codevlabs »

Hi Mats,

Is this it? https://bryntum.com/products/scheduler/docs/api/Scheduler/crud/transport/AjaxTransport

Quick question re docs as i'm still finding my way around. Any CrudManager docs found in Scheduler Docs is also applicable to Calendar right? I have assumed so until now.

The crudmanager code I was using was the following;

crudManager : {	
			validateResponse:true,		 
			transport : {
				load : {
					url : environment.baseURL + '/1/getCalendar.php?unallocYN=1',
					fetchOptions: { credentials: "omit" },
					headers: { Authorization: 'Bearer ' + this.constantsService.access_token }										
				},
				sync : {
					url : environment.baseURL + '/1/postCalendar.php',
					fetchOptions: { credentials: "omit" },
					headers: { Authorization: 'Bearer ' + this.constantsService.access_token }
				}
			},

I am assuming credentials went up a level and headers is still the same. Will upgrade again and test.


Post by codevlabs »

Works fine. thanks.


Post Reply