Announcement

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

    QUESTION: Timeline Sorting

    We are using an updated vesrion of SmartGWT 12, and we have a timeline similar to the one in the showcase (https://www.smartclient.com/smartgwt...bound_timeline)

    In the timeline there is a name for each lane and an hidden field with the timestamp of last update.
    Our screen uses RealtimeMessaging to receive updates on the events to display in the timeline.

    We would like to have the timeline sorted by "lastUpdate desc, name", and this sorting to be maintained whenever we update the values in the timeline through the RealtimeMessaging.

    There doesn't seems to be a clean and reliable way to achieve that, do you have any suggestion?

    #2
    Can you describe what you're doing a bit more clearly? Specifically, what data are you receiving from RealtimeMessaging? Data for events themselves? Or does it include a new set of lane-data (with updated last used time), which you then apply to the Timeline via setLanes() or similar?

    If so, when RealtimeMessaging returns your lane-data, you can just call timeline.getTimelineView().setSort(yourSortSpec).

    If that doesn't do what you need, please provide more information/sample code that shows what your code does when new data arrives.
    Last edited by Isomorphic; 12 Sep 2018, 22:20.

    Comment

    Working...
    X