Smart GWT 4.0p (SmartClient Version: v9.0p_2013-08-13/PowerEdition Deployment (built 2013-08-13))
We noticed a ciritcal bug since we use the new rendering option for timeline: OverlapSortSpecifiers.
If overlapSortSpecifiers is defined, then the event #2 can't be seen on the timeline grid (see screen shot "Missing #2 if OverlapSortSpecifiers is given.png")
If we do not specify these specifiers #2 event comes back (see screen shot "Event #2 is visible if OverlapSortSpecifiers is not defined.PNG")
Below is the source code to repeat.
Thank you for your help!
We noticed a ciritcal bug since we use the new rendering option for timeline: OverlapSortSpecifiers.
If overlapSortSpecifiers is defined, then the event #2 can't be seen on the timeline grid (see screen shot "Missing #2 if OverlapSortSpecifiers is given.png")
If we do not specify these specifiers #2 event comes back (see screen shot "Event #2 is visible if OverlapSortSpecifiers is not defined.PNG")
Below is the source code to repeat.
Thank you for your help!
Code:
import java.util.Date; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.data.SortSpecifier; import com.smartgwt.client.types.SortDirection; import com.smartgwt.client.types.TimeUnit; import com.smartgwt.client.widgets.calendar.CalendarEvent; import com.smartgwt.client.widgets.calendar.HeaderLevel; import com.smartgwt.client.widgets.calendar.Lane; import com.smartgwt.client.widgets.calendar.Timeline; public class TestDisappearingTimelineEvent implements EntryPoint { private static Date today = new Date(); private static int year = today.getYear(); private static int month = today.getMonth(); private static int day = today.getDate() - today.getDay(); @Override public void onModuleLoad() { Timeline timeline = new Timeline(); timeline.setCanResizeTimelineEvents(false); timeline.setCanEditLane(false); timeline.setShowEventDescriptions(false); timeline.setDefaultTimelineColumnSpan(1); timeline.setTimelineUnitsPerColumn(1); timeline.setColumnsPerPage(24); HeaderLevel hlHour = new HeaderLevel(TimeUnit.HOUR); hlHour.setHeaderWidth(60); HeaderLevel[] headerLevels = new HeaderLevel[]{ hlHour }; timeline.setHeaderLevels(headerLevels); SortSpecifier[] overlapSortSpecifiers = { new SortSpecifier("order", SortDirection.DESCENDING), new SortSpecifier("startDate", SortDirection.ASCENDING)}; timeline.setOverlapSortSpecifiers(overlapSortSpecifiers); timeline.setLanes(getLanes()); timeline.setData(getEvents()); Date startDate = new Date(year, month, day, 6, 0, 0); Date endDate = new Date(year, month, day, 16, 0, 0); timeline.setTimelineRange(startDate, endDate); timeline.draw(); } public static Lane[] getLanes() { Lane[] lanes = new Lane[]{ new Lane("ln 1", "ln 1"), new Lane("ln 2", "ln 2"), new Lane("ln 3", "ln 3"), new Lane("ln 4", "ln 4"), new Lane("ln 5", "ln 5") }; return lanes; } public static CalendarEvent[] getEvents() { CalendarEvent[] events = new CalendarEvent[14]; events[0] = new CalendarEvent(1, "#1", "", new Date(year, month, day, 7, 15, 0), new Date(year, month, day, 7, 45, 0), "ln 2"); events[0].setAttribute("order", 3); events[1] = new CalendarEvent(2, "#2", "", new Date(year, month, day, 8, 0, 0), new Date(year, month, day, 8, 15, 0), "ln 4"); events[1].setAttribute("order", 3); events[2] = new CalendarEvent(3, "#3", "", new Date(year, month, day, 8, 0, 0), new Date(year, month, day, 8, 30, 0), "ln 1"); events[2].setAttribute("order", 4); events[3] = new CalendarEvent(4, "#4", "", new Date(year, month, day, 9, 45, 0), new Date(year, month, day, 10, 15, 0), "ln 2"); events[3].setAttribute("order", 4); events[4] = new CalendarEvent(5, "#5", "", new Date(year, month, day, 13, 0, 0), new Date(year, month, day, 13, 15, 0), "ln 2"); events[4].setAttribute("order", 4); events[5] = new CalendarEvent(6, "#6", "", new Date(year, month, day, 13, 0, 0), new Date(year, month, day, 13, 30, 0), "ln 2"); events[5].setAttribute("order", 4); events[6] = new CalendarEvent(7, "#7", "", new Date(year, month, day, 10, 0, 0), new Date(year, month, day, 10, 15, 0), "ln 5"); events[6].setAttribute("order", 4); events[7] = new CalendarEvent(8, "#8", "", new Date(year, month, day, 8, 0, 0), new Date(year, month, day, 8, 30, 0), "ln 5"); events[7].setAttribute("order", 4); events[8] = new CalendarEvent(9, "#9", "", new Date(year, month, day, 14, 30, 0), new Date(year, month, day, 15, 0, 0), "ln 2"); events[8].setAttribute("order", 4); events[9] = new CalendarEvent(10, "#10", "", new Date(year, month, day, 6, 30, 0), new Date(year, month, day, 15, 0, 0), "ln 2"); events[9].setAttribute("order", 5); events[10] = new CalendarEvent(11, "#11", "", new Date(year, month, day, 6, 30, 0), new Date(year, month, day, 13, 0, 0), "ln 4"); events[10].setAttribute("order", 6); events[11] = new CalendarEvent(12, "#12", "", new Date(year, month, day, 13, 0, 0), new Date(year, month, day, 16, 0, 0), "ln 4"); events[11].setAttribute("order", 6); events[12] = new CalendarEvent(13, "#13", "", new Date(year, month, day, 6, 30, 0), new Date(year, month, day, 16, 0, 0), "ln 1"); events[12].setAttribute("order", 6); events[13] = new CalendarEvent(14, "#14", "", new Date(year, month, day, 6, 30, 0), new Date(year, month, day, 16, 0, 0), "ln 3"); events[13].setAttribute("order", 6); return events; } }
Comment