Announcement

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

    Timeline override methods not called

    Hi,

    I am on v9.0p_2013-10-27/Pro Deployment (built 2013-10-27)
    but checked with the latest v9.0p_2014-02-05/Pro Deployment (2014-02-05) and I think the problem is the same:

    Overriding Calendar.getDateCSSText() in java doesn't get called from JavaScript.
    The same for some more methods in Calendar, e.g. getDateStyle().

    I think they are missing in Calendar.onInit_Calendar. Can you confirm, as if that's the case, I'll try to implement that in my own subclass, as upgrading to a new SmartGWT build might not happen soon for us.


    TIA,

    #2
    You're right, they're not implemented as proper override points in onInit_Calendar - this is true in 9.0/4.0 and 9.1/4.1.

    Both of the ones you mention, and some others, are implemented in 10.0, but as Customizers, rather than override points.

    If you want to show us a list of the ones you're interested in that are doc'd but non-functional, we'll make sure they make it into upcoming builds in some form.

    Comment


      #3
      Hi,

      I'm evaluating the Timeline for some new functionality, so I'm slowly checking the available API and will report issues, but here are a few already:


      1) One other method that I didn't find in SmartGWT:
      @method headerLevel.titleFormatter()
      We Europeans get confused from the American Date style 3/2 or 2/3. So I want to customize the "day" titles in the HeaderLevels to show e.g. "Mo 3 Feb" instead of "2/3".



      2) There's a bug on setFirstDayOfWeek(1) together with setHeaderLevels(new HeaderLevel(TimeUnit.WEEK), new HeaderLevel(TimeUnit.DAY)): it renders one day without a WEEK header.
      (not checked with latest build)



      3) I don't like that the same value from CalendarEvent.NAME is showing up in the Event's Hover Tooltip as such. But I think there's a HoverCustomizer function already to override that.



      4) Previous/Next Event on Row buttons
      I'll see if I can achieve this myself. Instead of randomly clicking the previous/next "scroll by page" buttons, it would be more interesting to automatically jump to another event if they are far apart.


      5) Docs mistake on com.smartgwt.client.widgets.calendar.Calendar.setHeaderLevels(HeaderLevel...) ? It says "IllegalStateException this property cannot be changed after the component has been created", but also "If this method is called after the component has been drawn/initialized:".
      So can we change the view on the fly between WEEK+DAY views & QUARTER, or does that mean a total recreate of the Calendar & refetch data etc?


      6) public ListGrid getTimelineView()
      what do these various methods do that return a ListGrid ?

      Comment


        #4
        Firstly, note that a bunch of fixes and additions have been made to Calendar/Timeline code, specifically since the beginning of last November, when you're build is from.

        So you'll need to take the latest from smartclient.com anyway, if only to avoid wasted time on stuff that's already fixed.

        On your points:

        1) Yes, so do some of *us* Europeans :) We'll expose this.

        2) Not reproducible with 4.1 and is likely already fixed in latest 4.0, but we'll check.

        3) Yes, you can setEventHoverHTMLCustomizer() - but not in the build you have, you need one from this year

        4) 5.0 has a moveToEvent(CalendarEvent) API (it has a great many new APIs) - but you can do it yourself in 4.0 by just calling timeline.setChosenDate(event.getStartDate())

        5) 5.0 has a setResolution() API that does this in one step. In 4.0, you don't have to go as far as destroying the Timeline, but you'll probably have to call setHeaderLevels() and setTimelineRange()

        6) These return the Calendar's ListGrid AutoChildren - the instances that render the bodies of the various calendar views. However - we don't advise getting too involved with these components directly - 5.0 introduces a concrete CalendarView class that makes life a lot easier in terms of configuring specific details of each grid view.

        Comment


          #5
          To clarify our answer to point 5) - setHeaderLevels() is indeed supported after init - we've updated the doc

          Comment


            #6
            Just to follow up, note that your points 1) and 2) are now fixed in the framework and available in nightly builds dated February 15 and later.

            Comment

            Working...
            X