cancel
Showing results for 
Search instead for 
Did you mean: 

Why doesn't my timeline control show items after refreshing model?

Former Member
0 Kudos

Hello!

I have a Timeline control (sap.suite.ui.commons.Timeline). When I first attached the data model (data requested to server-side) to the timeline, it still appeared the timeline items. However, the problem is when user add an item or do something that makes affect to timeline, then all items will disappear although it's refreshed.

This issue occurred when I used fiori launchpad for my app's entry point.


Please help me, thank you so much!

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

your code....

Former Member
0 Kudos

Hi Jun,

Here's my view detail

<mvc:View
        controllerName="main.controller.Timeline"
        xmlns="sap.suite.ui.commons"
        xmlns:core="sap.ui.core"
        xmlns:mvc="sap.ui.core.mvc"
        xmlns:m="sap.m"
        height="100%">
    <m:OverflowToolbar id="idToolbar">
        <m:content>
            <m:Label text="Text Height"></m:Label>
            <m:Select id="idGenderSelector" change="textHeightChanged">
                <core:Item key="None" text="None"/>
                <core:Item key="3" text="3 Lines"/>
                <core:Item key="7" text="7 Lines"/>
                <core:Item key="150px" text="150 px"/>
            </m:Select>
            <m:Label text="Group By Type"></m:Label>
            <m:Select change="groupByChanged">
                <core:Item key="None" text="None"/>
                <core:Item key="Year" text="Year"/>
                <core:Item key="Month" text="Month"/>
                <core:Item key="Week" text="Week"/>
                <core:Item key="Day" text="Day"/>
            </m:Select>
            <m:Label text="Axis orientation"></m:Label>
            <m:Select change="orientationChanged">
                <core:Item key="Vertical" text="Vertical"/>
                <core:Item key="Horizontal" text="Horizontal"/>
            </m:Select>
            <m:Label text="Alignment"></m:Label>
            <m:Select id="idAlignment" change="alignmentChanged">
                <core:Item key="DoubleSided" text="Double sided"/>
                <core:Item id="idAlignmentFirst" key="Left" text="Left"/>
                <core:Item id="idAlignmentSecond" key="Right" text="Right"/>
            </m:Select>
            <m:CheckBox select="enableScrollSelected" text="enable scrollbar" selected="true"/>
        </m:content>
    </m:OverflowToolbar>
    <Timeline
            id="idTimeline"
            enableDoubleSided="true"
            enableBusyIndicator="true"
            groupBy="title"
            growingThreshhold="0"
            filterTitle="Title"
            sortOldestFirst="true"
            lazyLoading="true"
            select="onTimeLineItemSelected"
            content="{/status}">
        <content>
            <TimelineItem
                    id="idTemplateItem"
                    dateTime="{postDate}"
                    title="{title}"
                    userNameClickable="true"
                    status="Success"
                    text="{content}"
                    userName="{appUser>/id}"
                    filterValue="{title}">
            </TimelineItem>
        </content>
    </Timeline>
</mvc:View>

The issue above's solved after I'd removed line 'growingThreshhold="0"'. However, in my controller, I have:

this._timeline = this.getView().byId("idTimeline");
var sKey = oEvent.getParameter("selectedItem").getProperty("key");
this._timeline.setGroupByType(sKey);

When I activated this, an error occurred: "this._timeline.setGroupByType is not a function"