Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Problem with Timeline and large datasets

    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:

    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();
                }
            });

    #2
    Let us know if this is something that happens in the latest patched build. 2.3 years is just far too old to consider.

    Comment


      #3
      Yeah, i hear you... Will get on it. I'll get back to you.

      Comment


        #4
        OK, so i upgraded to "6.0-p20200304" I still have the same issue.

        I am setting the start and end dates of the timeline to today -> 4 weeks ahead. I have 130 rows in the database that matches.

        If i call setDataPageSize(200), all rows are fetched at once and displayed properly.

        If i call setDataPageSize(100), the first 100 rows are fetched from the server, but nothing is displayed in the timeline and there is no second request for the last 30.

        Comment


          #5
          Regarding this issue, i realized i asked basically the same question three years ago that you ended up not responding to :)

          https://forums.smartclient.com/forum...d-datapagesize

          It wasn't a super big issue for us back then, since we could set the datapagesize to a larger number, but we're making some new features that we think will make our clients use the timeline more, and this will be a bigger problem.

          Comment


            #6
            We're looking into it and will update here when we have more information.

            Comment

            Working...
            X