Announcement

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

    Timeline removeLanes() not working

    The events are not being removed correctly from the timeline. Using smartgwt 6.0p power 13.08.16
    Code:
    public class TestingModule implements EntryPoint {
    
        private int i = 0;
    
        public void onModuleLoad() {
    
            VLayout vlayout = new VLayout();
            final Timeline calendar = new Timeline();
            calendar.setHeight(451);
            calendar.setStartDate(new Date(112, 5, 2));
            calendar.setEndDate(new Date(112, 5, 22));
            calendar.setCanEditLane(true);
            calendar.setShowEventDescriptions(false);
    
            HeaderLevel[] headerLevels = new HeaderLevel[] { new HeaderLevel(TimeUnit.WEEK),
                    new HeaderLevel(TimeUnit.DAY) };
            calendar.setHeaderLevels(headerLevels);
            calendar.setLaneFields(new ListGridField[] { new ListGridField("title", "Developer", 120) });
            calendar.setLanes(TimelineLaneData.getRecords());
            calendar.setData(TimelineData.getRecords());
            calendar.setCanEditLane(false);
    
            vlayout.addMember(calendar);
    
            IButton removeBtn = new IButton("Remove first lane");
    
            removeBtn.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    Lane lane = calendar.getLanes()[i];
                    for (CalendarEvent e : calendar.getLaneEvents(lane)) {
                        SC.logWarn("Removing event: " + e.getName() + " " + e.getEventId());
                        calendar.removeEvent(e);
                    }
                    calendar.removeLane(lane.getName());
                    i++;
                }
            });
            vlayout.setWidth100();
            vlayout.setHeight100();
            vlayout.addMember(removeBtn);
            vlayout.draw();
        }
    
    }
    Click image for larger version

Name:	Bildschirmfoto 2016-08-19 um 11.44.59.png
Views:	39
Size:	171.3 KB
ID:	239778

    #2
    Isomorphic have you been able to reproduce the issue?

    Comment


      #3
      Yes - and it's been fixed for builds dated August 24 and later.

      Comment


        #4
        this works now, thanks

        Comment

        Working...
        X