Skip to Content
avatar image
Former Member

ui5 table shows same records

Hi All,

I'm facing an error while showing the data in ui5 table. We have two time related fields in the table where we have exposed via XSodata service. Problem is while displaying the data in the ui5 table all the time related columns are displaying the same time for eg (19:08 ,20:08 , 14:08 etc).ed which is shown in below screenshot.

When i check the data in my odata output url i'm getting the same data as we have in the table.

below is my output of the ui5 table which has issues in columns Start time and End time

Below is the metadata of the XSODATA service.

<EntityType Name="monload_serviceType">
<Key>
<PropertyRef Name="GENERATED_ID"/>
</Key>
<Property Name="GENERATED_ID" Type="Edm.String" Nullable="false" MaxLength="2147483647"/>
<Property Name="USERID" Type="Edm.String" MaxLength="10"/>
<Property Name="SOURCE" Type="Edm.String" MaxLength="10"/>
<Property Name="DATASET" Type="Edm.String" MaxLength="10"/>
<Property Name="DATE" Type="Edm.DateTime"/>
<Property Name="START_TIME" Type="Edm.DateTime" Nullable="false"/>
<Property Name="END_TIME" Type="Edm.DateTime"/>
<Property Name="STATUS" Type="Edm.String" MaxLength="20"/>
<Property Name="ERROR" Type="Edm.String" MaxLength="50"/>
</EntityType>

Code of data binding from View.js

template: new sap.ui.commons.TextView().bindProperty("text",{ path : "START_TIME" , type: new sap.ui.model.type.DateTime({pattern: "HH:MM:SS X"})});

template: new sap.ui.commons.TextView().bindProperty("text",{ path : "END_TIME" , type: new sap.ui.model.type.DateTime({pattern: "HH:MM:SS X"})}),

Please help with your valuable inputs.

Thanks,

Anurag

table-output.png (17.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 29, 2017 at 02:28 PM

    if your odata is wrong, nothing to do with the ui5

    where is your xs code

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I have already bind the table with odata model . Here it is.

      All other columns are coming correctly but which is having the time values those are not populating correctly.

      oTable.setModel(oModel);
         oTable.bindRows("/monload_service");