Announcement

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

    setTimelineRange causes error

    I just upgraded to SmartClient Version: v10.0p_2015-07-30/Pro Deployment (built 2015-07-30)

    I get an error when trying to set the range of my timeline.
    Code:
    Date endDate = DateUtil.getAbsoluteDate(RelativeDate.TODAY);
    CalendarUtil.addDaysToDate(endDate, TimelineUtils.daysDuration); // adding 28 days
    timeline.setTimelineRange(DateUtil.getAbsoluteDate(RelativeDate.TODAY), endDate);
    Stack Trace:
    Code:
    exceptionMessage=
    (TypeError) : Cannot read property 'frozen' of null,
    stackTrace=
    com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'frozen' of null
    at Unknown.wrap_1_g$(Exceptions.java:36)
    at Unknown.setTimelineRange_1_g$(Calendar.java:6507)
    at Unknown.execute_204_g$(ResourceOverviewWidget.java:434)
    at Unknown.anonymous(Calendar.java:8502)
    at Unknown.apply_0_g$(Impl.java:247)
    at Unknown.entry0_0_g$(Impl.java:300)
    at Unknown.anonymous(Impl.java:72)
    at Unknown.anonymous(SmartGwtEntryPoint.java:364)

    From developer console:
    Code:
    16:30:44.650:XRP5[E0]:WARN:Log:TypeError: Cannot read property 'frozen' of null
    Stack from error.stack:
    	TimelineView.isLabelCol(<no args: exited>) on [TimelineView ID:isc_Timeline_0_timelineView] @ ISC_Calendar.js:346:491
    	TimelineView.getBaseStyle(<no args: exited>) on [TimelineView ID:isc_Timeline_0_timelineView] @ ISC_Calendar.js:348:159
    	TimelineView.getCellStyle(<no args: exited>) on [TimelineView ID:isc_Timeline_0_timelineView] @ ISC_Calendar.js:346:806
    	[o]GridBody.eval(<no args: exited>) on [GridBody ID:isc_Timeline_0_timelineView_body] @ [no file]:4:115
    	GridBody.updateCellStyle(<no args: exited>) on [GridBody ID:isc_Timeline_0_timelineView_body] @ ISC_Grids.js:578:220
    	[a][c]Class.invokeSuper(<no args: exited>) on [GridBody ID:isc_Timeline_0_timelineView_body] @ ISC_Core.js:281:162
    	GridBody.updateCellStyle(<no args: exited>) on [GridBody ID:isc_Timeline_0_timelineView_body] @ ISC_Grids.js:830:1196
    	GridBody.setRowStyle(<no args: exited>) on [GridBody ID:isc_Timeline_0_timelineView_body] @ ISC_Grids.js:615:27
    	Array.map(<no args: exited>) @ ISC_Core.js:449:193
    	TimelineView.hiliteRecord(<no args: exited>) on [TimelineView ID:isc_Timeline_0_timelineView] @ ISC_Grids.js:1742:154

    #2
    Okay so I think it happens because it gets called before the timeline is done drawing.

    If I call it via a button click after the timeline is drawn, it works fine.

    I see that setEndDate says to use setTimelineRange after initial draw but the docs for setTimelineRange do not mention this.

    Anyways, instead I have tried to set the timeline end date via Calendar.setEndDate() but it does nothing and the timeline still defaults to the 20 columns.

    Am I doing something wrong or how do I set the timeline end date on the initial draw?

    Comment


      #3
      This sounds like a bug, and we'll take a look in the coming days.

      In the meantime, setting Calendar.defaultTimelineColumnSpan to 28 should fix it.

      Comment


        #4
        Thanks, that worked.

        Comment


          #5
          After some testing, the only way we can get the endDate to be ignored is by *not* setting a startDate. So, this code works for us:

          Code:
          Timeline tl = new Timeline();
          Date startDate = DateUtil.getAbsoluteDate(RelativeDate.TODAY);
          // if you don't call this, you'll get defaultTimelineColumnSpan columns (20)
          tl.setStartDate(startDate);
          Date endDate = DateUtil.getAbsoluteDate(RelativeDate.TODAY);
          CalendarUtil.addDaysToDate(endDate, 28);
          tl.setEndDate(endDate);
          tl.draw();

          Comment


            #6
            This has stopped working after I updated to SmartClient Version: v10.0p_2015-09-19/Pro Deployment (built 2015-09-19).

            I have defaultTimelineColumnSpan set to 28 and the code you posted above but my timeline only draws with 15 days (see attached)

            Timeline:
            Code:
            timeline = new Timeline();
            timeline.setWidth100();
            timeline.setEventSnapGap(1440); // 60 * 24
            timeline.setDisableWeekends(false);
            timeline.setShowWeekends(false);
            timeline.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATE);
            timeline.setShowEventDescriptions(false);
            timeline.setCanCreateEvents(false);
            timeline.setEventLaneFieldTitle("Person");
            timeline.setShowControlsBar(false);
            timeline.setShowQuickEventDialog(false);
            timeline.setCanRemoveEvents(false);
            timeline.setLaneEventPadding(3);
            timeline.setOverlapSortSpecifiers(new SortSpecifier("sortOrder", SortDirection.ASCENDING));
            timeline.setLaneFields(new ListGridField("title", "People", 210));
            timeline.setLanes(lanes);
            timeline.setDataSource(ds);
            timeline.setAutoFetchData(true);
            timeline.setCanAcceptDrop(true);
            timeline.setUseEventCanvasRolloverControls(false);
            Canvas properties = new Canvas();
            properties.setHoverWidth(500);
            timeline.setAutoChildProperties("eventCanvas", properties);
            timeline.setShowLaneRollOver(true);
            timeline.setDateStyleCustomizer(new DateStyleCustomizer() {
            &#194;&#160;&#194;&#160; &#194;&#160;@Override
            &#194;&#160;&#194;&#160; &#194;&#160;public String getDateStyle(Date date, int rowNum, int colNum, CalendarView calendarView) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;// If we are currently showing the day view, set a different style for weekend days.
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(timeline.getTimelineGranularity() == TimeUnit.DAY)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;{
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;for (Integer weekendDay : DateUtil.getWeekendDays()) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(date.getDay() == weekendDay)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return "calendarResourcePlanningWorkdayDisabled";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return null;
            &#194;&#160;&#194;&#160; &#194;&#160;}
            });
            timeline.setEventHeaderHTMLCustomizer(new EventHeaderHTMLCustomizer() {
            &#194;&#160;&#194;&#160; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;@Override
            &#194;&#160;&#194;&#160; &#194;&#160;public String getEventHeaderHTML(CalendarEvent calendarEvent, CalendarView calendarView) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(calendarEvent.getStyleName().equals("eventWindowHeader-project") || calendarEvent.getStyleName().equals("eventWindowHeader-absence"))
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;{
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;boolean isBelowThreshold = calendarEvent.getAttribute("brightness") != null && calendarEvent.getAttributeAsDouble("brightness") < brightnessThreshold;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String imgUrl = isBelowThreshold ? "[SKIN]/actions/edit_resource.png" : "[SKIN]/actions/edit_resource_black.png";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String img = Canvas.imgHTML(imgUrl, 17, 18);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String changedImg = img.substring(0, img.length()-1) + "style='cursor: pointer;'>";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if (calendarEvent.getStyleName().equals("eventWindowHeader-project")) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String color = isBelowThreshold ? "#ffffff" : "#5a5a5a";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return "<table width='100%' height='100%' cellspacing='0' cellpadding='0' style='background-color: " + calendarEvent.getAttributeAsString("background-color") + "; color:" + color + ";'><tbody><tr><td valign='middle' align='middle' >" + calendarEvent.getName() + "&nbsp;&nbsp;" + changedImg + "</div></td></tr></tbody></table>";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return "<table width='100%' height='100%' cellspacing='0' cellpadding='0'><tbody><tr><td valign='middle' align='middle' >" + calendarEvent.getName() + "&nbsp;&nbsp;" + changedImg + "</div></td></tr></tbody></table>";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;else
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return "<table width='100%' height='100%' cellspacing='0' cellpadding='0'><tbody><tr><td valign='middle' align='middle' >" + calendarEvent.getName() + "</td></tr></tbody></table>";
            &#194;&#160;&#194;&#160; &#194;&#160;}
            });
            timeline.addEventClickHandler(new EventClickHandler() {
            &#194;&#160; &#194;&#160; @Override
            &#194;&#160; &#194;&#160; public void onEventClick(CalendarEventClick calendarEventClick) {
            &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160; &#194;&#160;if(calendarEventClick.getEvent().getAttributeAsBoolean("canEdit"))
            &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160; &#194;&#160;{
            &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; openEventEditModal(calendarEventClick.getEvent());
            &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; calendarEventClick.cancel();
            &#194;&#160; &#194;&#160; }
            });
            
            timeline.setEventCanvasHoverHTMLCustomizer(new EventCanvasHoverHTMLCustomizer() {
            &#194;&#160; &#194;&#160; @Override
            &#194;&#160; &#194;&#160; public String getHoverHTML(CalendarEvent calendarEvent, EventCanvas eventWindow) {
            &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; DateTimeFormat dtf = DateTimeFormat.getFormat("d/M, yyyy");
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;Date editedEndDate = (Date) calendarEvent.getEndDate().clone();
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;CalendarUtil.addDaysToDate(editedEndDate, -1);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String hoverHtml = dtf.format(calendarEvent.getStartDate()) + " - " + dtf.format(editedEndDate) + "<br>";
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;hoverHtml += calendarEvent.getName() + "<br>";
            &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; hoverHtml += calendarEvent.getDescription();
            &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; return hoverHtml;
            &#194;&#160; &#194;&#160; }
            });
            timeline.addDropHandler(getTimelineDrophandler());
            timeline.setHeaderLevels(TimelineUtils.getDayViewHeaderLevels());
            timeline.setDefaultTimelineColumnSpan(28);
            
            Date startDate = DateUtil.getAbsoluteDate(RelativeDate.TODAY);
            // if you don't call this, you'll get defaultTimelineColumnSpan columns (20)
            timeline.setStartDate(startDate);
            Date endDate = DateUtil.getAbsoluteDate(RelativeDate.TODAY);
            CalendarUtil.addDaysToDate(endDate, 28);
            timeline.setEndDate(endDate);
            
            timeline.addEventChangedHandler(new EventChangedHandler() {
            &#194;&#160;&#194;&#160; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;@Override
            &#194;&#160;&#194;&#160; &#194;&#160;public void onEventChanged(CalendarEventChangedEvent event) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(event.getEvent().getAttribute("changedFromLane") != null)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateLaneClientSide(timeline.getLane(event.getEvent().getLane()),timeline.getLane(event.getEvent().getAttribute("changedFromLane")),event.getEvent(),null,null,true);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;else
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateLaneClientSide(timeline.getLane(event.getEvent().getLane()),null,event.getEvent(),null,null,true);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateProjectInList(event.getEvent().getAttributeAsInt("projectId"));
            &#194;&#160;&#194;&#160; &#194;&#160;}
            });
            timeline.addEventAddedHandler(new EventAddedHandler() {
            &#194;&#160;&#194;&#160; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;@Override
            &#194;&#160;&#194;&#160; &#194;&#160;public void onEventAdded(CalendarEventAdded event) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateLaneClientSide(timeline.getLane(event.getEvent().getLane()),null,null,null,event.getEvent(),true);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateProjectInList(event.getEvent().getAttributeAsInt("projectId"));
            &#194;&#160;&#194;&#160; &#194;&#160;}
            });
            timeline.addEventRemovedHandler(new EventRemovedHandler() {
            &#194;&#160;&#194;&#160; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;@Override
            &#194;&#160;&#194;&#160; &#194;&#160;public void onEventRemoved(CalendarEventRemoved event) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateLaneClientSide(timeline.getLane(event.getEvent().getLane()),null,null,event.getEvent(),null,true);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;updateProjectInList(event.getEvent().getAttributeAsInt("projectId"));
            &#194;&#160;&#194;&#160; &#194;&#160;}
            });
            // ShowLaneCustomizer works with the filter to exclude lanes
            timeline.setShowLaneCustomizer(new ShowLaneCustomizer() { &#194;&#160;
            &#194;&#160; &#194;&#160; @Override &#194;&#160;
            &#194;&#160; &#194;&#160; public boolean shouldShowLane(Lane lane, CalendarView calendarView) {
            &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160; &#194;&#160;if(lane != null)
            &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160; &#194;&#160;{
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;// Employee Name
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String employeeName = filterEmployeeValue; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if (employeeName != null && employeeName != "") { &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;String laneName = lane.getAttribute("employee");
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;if (laneName.toLowerCase().contains(employeeName.toLowerCase()) == false) { &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;return false; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;// Role
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if (filterRoleValue != null && filterRoleValue.length > 0) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;Integer laneRole = lane.getAttributeAsInt("roleId");
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;boolean found = false;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;for (String roleId : filterRoleValue) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if (laneRole.equals(Integer.parseInt(roleId))) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;found = true;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;break;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;if(!found)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return false;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;// Team
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(filterTeamValue != null && filterTeamValue.length > 0)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;{
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;int[] laneTeams = lane.getAttributeAsIntArray("teams");
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;if(laneTeams == null)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return false;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;boolean found = false;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;for (String teamName : filterTeamValue) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;int filterTeamId = Integer.parseInt(teamName);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;for (int teamId : laneTeams) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if (filterTeamId == teamId) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;found = true;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;break;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(found)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;break;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;if(!found)
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return false;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;// Project
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;String projectName = (String)filterProjectValue;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if (projectName != null && projectName != "") {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;for (CalendarEvent event : timeline.getLaneEvents(lane)) {
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(event.getAttributeAsBoolean("isClientEvent"))
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;continue;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;if(event.getName().toLowerCase().contains(projectName.toLowerCase()))
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return executeDefault(lane, calendarView);
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;return false;
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160;&#194;&#160; &#194;&#160;&#194;&#160;&#194;&#160; &#194;&#160;}
            &#194;&#160; &#194;&#160; &#194;&#160;&#194;&#160; &#194;&#160;return executeDefault(lane, calendarView);
            &#194;&#160;&#194;&#160; &#194;&#160;}
            });
            Last edited by Niels_EMP; 21 Sep 2015, 03:15.

            Comment


              #7
              It seems that the forums still has some formatting issues.

              I uploaded the timeline code as a txt here.
              Attached Files

              Comment


                #8
                After some more investigation I discovered that this only happens when&#194;&#160;timeline.setShowWeekends is false.

                Comment


                  #9
                  We can't run this code - it's missing a bunch of variable declarations, DS and a couple of custom methods.

                  If you can re-post the code, in a runnable state, we can take a look.

                  Comment


                    #10
                    Sorry, here is a simple test-case.

                    &#194;&#160;
                    Attached Files

                    Comment


                      #11
                      Ok, we see this sample only rendering 15 columns - we'll update here when we've had a look into it

                      Comment


                        #12
                        This one is also fixed for tomorrow's builds.

                        Having tested both options just now, you should be able to set *either* a 28-day period via startDate and endDate, *or* defaultTimelineColumnSpan:28, and the results should be identical.

                        Since you are also hiding weekends, you will only actually see 20 columns rendered (28 days minus 4 weekends) - if you spot anything thart feels wrong in this area, let us know and we'll consider what, if anything, to do about it.

                        Comment

                        Working...
                        X