Hi, using currently using 6.0-p20171202 (i know it's old!)
We're about to start using Timeline with larger datasets, so i've been testing and i am seeing some strange behavior.
Lets say we have 180 events within a given datetime interval.
If i set the "datapagesize" to more than 180, all of them are loaded, and displayed in the Timeline. (We have autofetch turned on).
However, if i set the datapagesize to, say, 100, i can see one request on the server (offet 0, limit 100). I then return the first 100, and the "totalrows" in the dsresponse is 180 as expected.
What happens in the client is that nothing at all is shown in the timeline, and no more requests are issues to the server.
if i then increase the datapagesize to 200 and reload the page, everything is displayed properly.
Can you tell me if i am missing something, or doing something wrong? This is super strange to me.
Cheers
For reference, find code where we initialize our Timeline below:
We're about to start using Timeline with larger datasets, so i've been testing and i am seeing some strange behavior.
Lets say we have 180 events within a given datetime interval.
If i set the "datapagesize" to more than 180, all of them are loaded, and displayed in the Timeline. (We have autofetch turned on).
However, if i set the datapagesize to, say, 100, i can see one request on the server (offet 0, limit 100). I then return the first 100, and the "totalrows" in the dsresponse is 180 as expected.
What happens in the client is that nothing at all is shown in the timeline, and no more requests are issues to the server.
if i then increase the datapagesize to 200 and reload the page, everything is displayed properly.
Can you tell me if i am missing something, or doing something wrong? This is super strange to me.
Cheers
For reference, find code where we initialize our Timeline below:
Code:
public MyScheduleTimeline(final DataSource ds, final DataSource laneDs, boolean canEditEvents, String userIdRestriction) { super(laneDs, ClientServerConstants.FIELD_FULLNAME, true); eventBinder.bindEventHandlers(this, MyCommonConstants.EVENT_BUS); setDataSource(ds); setAutoFetchData(false); setDataPageSize(100); this.userIdRestriction = userIdRestriction; Date begin = new Date(); Date end = new Date(); CalendarUtil.addMonthsToDate(end, 1); setStartDate(begin); setEndDate(end); setShowLaneRollOver(true); setShowQuickEventDialog(false); sinkEvents(Event.ONCONTEXTMENU); setEventBodyHTMLCustomizer(new EventBodyHTMLCustomizer() { @Override public String getEventBodyHTML(CalendarEvent calendarEvent, CalendarView calendarView) { return timeFormat.format(calendarEvent.getAttributeAsDate(ClientServerConstants.FIELD_INTIME)) + " - " + timeFormat.format(calendarEvent.getAttributeAsDate(ClientServerConstants.FIELD_OUTTIME)); } }); setEventHeaderHTMLCustomizer(new EventHeaderHTMLCustomizer() { @Override public String getEventHeaderHTML(CalendarEvent calendarEvent, CalendarView calendarView) { calendarEvent.setHeaderBackgroundColor((calendarEvent.getAttribute(ClientServerConstants.FIELD_REPID) != null) ? NubaCommonConstants.calendarRepeatColor : CommonConstants.calendarDefaultColor); return calendarEvent.getAttribute(ClientServerConstants.FIELD_LOCNAME); } }); setWorkdays(workdays); setDisableWeekends(false); setCanEditEvents(canEditEvents); setCanEditLane(true); setShowEventDescriptions(true); setLaneNameField(ClientServerConstants.FIELD_REPORTERID); setStartDateField(ClientServerConstants.FIELD_INTIME); setEndDateField(ClientServerConstants.FIELD_OUTTIME); setNameField(ClientServerConstants.FIELD_LOCNAME); setShowEventDescriptions(true); setDescriptionField(ClientServerConstants.FIELD_NOTE); setMinLaneWidth(130); setTimeFormatter(TimeDisplayFormat.TOSHORTPADDED24HOURTIME); setHeaderLevels(getDayHeaderLevels()); setLaneEventPadding(2); setEventStyleName("eventWindow"); loadLanes(); setCanRemoveEvents(false); addEventResizeMoveHandler(event -> { if (!checkMove(event.getEvent())) { event.cancel(); } }); addEventRepositionMoveHandler(event -> { if(!checkMove(event.getEvent())){ event.cancel(); } });
Comment