Announcement

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

    #16
    We'll look into why getCanvasAutoChild might be returning the wrong Java class here, but in the mean time, you can explicitly convert to a ListGrid instance in your code via something like
    Code:
    ListGrid timelineView = new ListGrid(timeline.getCanvasAutoChild("timelineView").getJsObj());

    Comment


      #17
      It works, thank you, but there are a few other problems.

      a) accessing headerLevel.getHeaderWidth() throws NPE
      b) is there any simple way to get the Lane column width?
      (wouldn't use the hard coded 75)
      c) using hard coded values for header width (because of a)) the calculation is perfect, but:
      c1) calculate minutes in the background click
      c2) event editor comes up with the standard hourly start time
      c3) then we can add the minutes in the CalendarEventAdded and display it correctly in our complex event editor, but it may confuse the users
      c4) is there any way to change the event before your event editor comes up?

      So, because of a), b) and c4) the best would be if you could add this feature using the eventSnapGap. Thank you.

      Comment


        #18
        a) Have you *set* it in your headerLevel? It may legitimately be null...

        b) Yes, use calendar.setLaneFields() and pass a field definition for the lane's "title" field, with a width set on it, instead of relying on the default labelColumn

        c) It's not clear what you mean by this, but it sounds like you're both leveraging backgroundClick() AND relying on the calendar to show the editor for the new event, right?

        If so, you ought to be able to just setCanCreateEvents(false) and instead show the event editor yourself from backgroundMouseDown().

        Sadly, there is no current public API for showing the Event Editor yourself. We'll look at this, as well as just having the dates passed to new events tied to the eventSnapGap
        Last edited by Isomorphic; 12 Jun 2013, 00:39.

        Comment


          #19
          Thank you for your answers.

          For c) we are going to wait for your solution, because wouldn't add more and more code (now we should figure out the start hour, and also should build a new small dialog (almost the same calendar has and it sounds like we would duplicate a lot of things you have already)).

          We are looking for the build June 12 but still can't see it. Do you have any idea when a new build can be tested? (Jun 9 the last 4.0d listed for me) Thanks.

          Comment


            #20
            In the meantime I was able to implement your suggested solution (the BackgroundMouseDownEvent.getStartDate() was helpful), but would go back to your solution once you guys will add eventSnapGap for the creating new events.

            Please update this thread if it will be added. Thank you.

            Comment


              #21
              This has been added, as of builds dated June 17 - to make use of it in your case, just setEventSnapGap(15) and then get rid of any backgroundClick/Mouse code you've added in the meantime.

              Comment


                #22
                Thank you very much! We got the perfect solution from you.

                Comment


                  #23
                  Hello,

                  Is it possible in calendar add event to show Edit Fields Form in the first window only. I don't want the user to move to second window on click of edit event.

                  And how can we add validation on the add event form fields.

                  Thanks in advance.

                  Comment

                  Working...
                  X