Announcement

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

    Trigger a re-calculation of EventCustomizer in a Timeline

    Hello!

    Usecase:
    I have a timeline that has users for lanes, and various records for events. I have various formatting rules related to the events based on the data in the records.

    I would like to basically have the eventcustomizer re-evaluated for every event in the timeline, (and have it redraw of course) when some stuff changes outside the timeline.

    I am now using
    Code:
    timeline.getSelectedView().rebuild();
    , and while that does work, it also triggers a re-fetch from the server, which i'm trying to avoid (might be several thousand rows). I know that the data hasn't changed on the server, so i don't want to re-fetch it.

    Is there a way to accomplish this?

    Cheers

    #2
    There are two ways to do this, but neither was doc'd for SmartGWT:

    1) rebuild() has a param, refreshData, which can be passed as false - this is still more expensive than the alternative, which is

    2) there's a method, view.refreshEvents(), which basically does exactly what you want, but wasn't public

    We've exposed both for tomorrow's builds, dated January 13 or later (may even make today's build, in this case) - if you want to test the fix in the meantime, and if you know JSNI, you can use that to call rebuild(false) or refreshEvents() in JS.
    Last edited by Isomorphic; 11 Jan 2022, 23:35.

    Comment


      #3
      That's great!

      For context, the use cases are among these:
      -Users can filter out events that are not in the weekend, or some other application-specific setting outside of the events themselves.
      -Users can choose a different color for recurring events
      etc.

      Comment


        #4
        Hi there, i've tried over the last two days to get the nightly via maven to no avail. So tried some more days, and from what i can see, the last build i can get via Maven for 13.0d is from 2022-01-01. Just wanted to give a heads up in case there's something wrong the the file server.

        Comment


          #5
          Hello, i'll answer my own question above i guess.

          I did find a build for 13.1 from the 17:th, but still there's no build for 13.0d since January 1. Is it that when you start on a new point release (13.1d), you stop releasing nightlies for the previous point release?

          Regarding the refreshEvents(), i can confirm that it's there now and that it works majestically for me. Thanks.

          Comment


            #6
            Hi mathias,

            since beginning of the year 13.0p is out. I have a "Distill Web Monitor" 1-hour check on https://www.smartclient.com/builds/SmartGWT/12.0p/LGPL (you can choose another version) so that I get notified in my browser if there is a new version out.

            Best regards
            Blama

            Comment


              #7
              Haha i suppose i don't visit smartclient.com often enough :) Had totally missed that, i blame it on the holidays.

              Thanks for the heads-up mate.

              Comment


                #8
                Hi mathias,

                I also get the SmartClient newsletter I think whenever a new blog post comes out. I'm not sure where to sign up for this ( Isomorphic ?), but here there is a "Notify me about Isomorphic Software product releases, events, and news." box. Would also not have noticed quickly otherwise.

                Best regards
                Blama

                Comment


                  #9
                  Thanks, smart.
                  Last edited by mathias; 20 Jan 2022, 01:08.

                  Comment

                  Working...
                  X