Announcement

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

    Timelane removeLane not working

    Testcase:
    Code:
    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());
    
            vlayout.addMember(calendar);
    
            IButton removeBtn = new IButton("Remove first lane");
    
            removeBtn.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    calendar.removeLane(calendar.getLanes()[0]);
                }
            });
            vlayout.setWidth100();
            vlayout.setHeight100();
            vlayout.addMember(removeBtn);
            vlayout.draw();
        }
    Click the button to remove a lane. Nothing happens.
    Using smartgwt 6.0-p20160804 power

    #2
    Isomorphic have you been able to reproduce this?
    I need this bug corrected, since I am actually developing on this, and I am waiting for continuing development

    Comment


      #3
      Yes, we can reproduce it and it's been fixed for builds dated August 12 and later.

      In the meantime, just use the other signature of removeLane(), passing getLanes()[0].getName().

      Comment


        #4
        This is still not working with the 21.09 build

        Comment


          #5
          You're right - GWT code was passing a Java object when it ought to have been a Javascript one - it's been fixed just now, for builds dated September 27 and later.

          Note that, as we mentioned, you can work around the problem in the meantime by just passing lane.getName() to the removeLane(String laneName) overload instead.

          Comment


            #6
            Now I am not able to save any new event with the nightly 27.09 power.
            See screenshot. It wants a date as an event name ?? Click image for larger version

Name:	Bildschirmfoto 2016-09-28 um 07.16.46.png
Views:	31
Size:	47.9 KB
ID:	240469

            Comment


              #7
              This is slightly bizarre and we're not seeing it with the sample you provided earlier in this thread, or with our own tests.

              Please show the code that produced that screenshot, including DS and data, and provide steps to reproduce.

              Also, please note which build you were using previously, which didn't show this odd behavior.
              Last edited by Isomorphic; 27 Sep 2016, 21:53.

              Comment


                #8
                I am not seeing this anymore, so I think there was a problem with my testcase. Anyway, if I see this again, I will let you know, thanks.

                Comment

                Working...
                X