Announcement

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

    Question about Timeline and DataPageSize

    Hi,

    we have a scheduling tab in our app that uses Timeline.

    We now have an issue where it is totally empty sometimes and we noticed that it's because the number of rows are above 200, and we set datapagesize to 200.

    I can actually not remember why i set it to 200... i will increase it for now, but i am wondering why it is empty just because number of rows is above 200.

    Also, what IS the datapagesize? Its not what i would have thought, since it results in the Timeline being completely empty. What is the recommended approach to handling large(r) data sets in the timeline?

    #2
    Can you show the other details (settings/criteria) you're using for your timeline?

    Comment


      #3
      Sure, see the constructor for my class that extends Timeline below.

      version 6.0-p20161207

      I have looked into it a bit more, and there IS something that seems strange to me:

      As you can see, i set the datapagesize to 200. This is what then is sent to the server as "limit". I then return exactly 200 rows, and this results in the schedule being empty! if the pagesize is 200 and i insert 200 rows, it's strange that it becomes empty.

      (i am happy to send you my entire class if you need it)

      Code:
      public ScheduleTimeline(final DataSource ds, final DataSource laneDs, boolean canEditEvents, String helpUrl) {
              super();
              setWidth100();
              setHeight100();
              this.laneNameField = laneNameField;
              this.laneDS = laneDS;
              this.onlyEnabled = onlyEnabled;
      
              
              Date begin = new Date();
              Date end = new Date();
              CalendarUtil.addMonthsToDate(end, 1);
              setStartDate(begin);
              setEndDate(end);
              setShowLaneRollOver(true);
              setShowQuickEventDialog(false);
      
      
              setWorkdays(workdays);
              setDisableWeekends(false);
              setCanEditEvents(canEditEvents);
      
              setCanEditLane(false);
              setShowEventDescriptions(true);
              setLaneNameField(ClientServerConstants.FIELD_REPORTERID);//this is what must match the "id" values for the lane data
              
              setDataPageSize(200);//this is the one!
      
              setStartDateField(CommonConstants.FIELD_INTIME);
              setEndDateField(CommonConstants.FIELD_OUTTIME);
              setNameField(ClientServerConstants.FIELD_LOCNAME);
              setShowEventDescriptions(true);
              setDescriptionField(CommonConstants.FIELD_NOTE);
              setMinLaneWidth(130);
              setTimeFormatter(TimeDisplayFormat.TOSHORTPADDED24HOURTIME);
      
              setHeaderLevels(getDayHeaderLevels());
              setLaneFields(new ListGridField[]{new ListGridField("title", CommonConstants.constants.reportUser(), CommonConstants.FIELD_WIDTH_REPORTERNAME)});
              setLaneEventPadding(2);
              setEventStyleName("EventWindow");
              loadLanes();
              setCanRemoveEvents(false);
      
              setDataSource(ds);
              setAutoFetchData(true);
          }

      Comment


        #4
        Hi, i did some more testing, and i have some additional, hopefully useful, information.

        I experimented with my server-side service and I tried to always set the "totalRows" in the DSResponse to twice the "limit" being sent in. If i do that, it doesn't matter how many rows there actually are in the DSResponse, if it's more than the datapagesize or not. If the "totalRows" in the DSResponse is larger than the "datapagesize" setting, the Timeline ends up empty all the time.
        '
        This kind of seems like a bug to me? Or perhaps i've misunderstood something.

        Comment

        Working...
        X