I’ve been doing some tests with the scheduler component, and I find it incredibly useful. I am currently attempting to use it in an application for which I do not have much access. I would like to be able to load options dynamically from the db, but I can’t seem to figure out how.
Currently, I am attempting to do this:
var employees = scheduler.serverList(“employees”);
scheduler.createTimelineView({
section_autoheight: false,
name: “timeline”,
x_unit: “day”,
x_date: “%d %M”,
x_step: 1,
x_size: 7,
x_start: 0,
y_unit: employees,
y_property: “employee”,
render: “tree”,
folder_events_available: true,
dy:35
});
…
scheduler.load(["?activity=GetData&type=Events", “?activity=GetData&type=Employees”]);
The first load returns the events (this works), the second is supposed to load the employees, but this isn’t working. I can’t use any of the java/jsp/c#/php connectors, I’m basically making my own connector, but I can’t seem to get it to work.
So this is a great start. Is there any way to do it with multiple calls, by chance? Or would I simply use the multi-data-source extension, and they will all get combined?
Unfortunately only one-level options can be loaded in such way, not hierarchical ones.
You can load the set of options by separate ajax call, as json or any other format, and later, use scheduler.updateCollection method to refresh collection with new values.