loadTimelineModel(modelDTO)
JavaScript API Reference/Ab.timeline.TimelineController object
loadTimelineModel(modelDTO)
Create the timeline Model object from the data transfer object (DTO). Do not display the timeline content.
Parameters
-
modelDTO
(object): Data object containing all timeline resources, events and time-marks. Typically received from the workflow rule.
Example
Load and display the timeline for specified date and time range:
var parameters
= {
'dateStart':'2006-05-31',
'timeStart':'08:00.00.000',
'timeEnd':'20:00.00.000'
};
var result = Workflow.runRuleAndReturnResult(
'AbSolutionsViewExamples-loadTimeline', parameters);
if (result.code == 'executed') {
var timelineDTO = result.data;
window.timeline.clear();
window.timeline.loadTimelineModel(timelineDTO);
window.timeline.refreshTimelineUI();
} else {
alert(result, 'AbSolutionsViewExamples-loadTimeline');
};