on 08-29-2017 2:45 PM
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
if your odata is wrong, nothing to do with the ui5
where is your xs code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in XSodata file i have just written a single line to expose the data .
service{
"T_DL_MON_UI5" as "monload_service" keys generate local "GENERATED_ID";
}
Correct me if I'm wrong with the XSodata definiation.
Below is the example of one property where you can see dates are coming correctly. Kindly suggest where i need to correct.
<m:properties>
<d:GENERATED_ID m:type="Edm.String">48571820155014911</d:GENERATED_ID>
<d:USERID m:type="Edm.String">1101</d:USERID>
<d:SOURCE m:type="Edm.String">EFR</d:SOURCE>
<d:DATASET m:type="Edm.String">ACTUAL</d:DATASET>
<d:DATE m:type="Edm.DateTime">2017-08-29T00:00:00.0000000</d:DATE>
<d:START_TIME m:type="Edm.DateTime">2017-08-29T13:18:06.0000000</d:START_TIME>
<d:END_TIME m:type="Edm.DateTime">2017-08-29T13:59:54.0000000</d:END_TIME>
<d:STATUS m:type="Edm.String">Completed</d:STATUS>
<d:ERROR m:type="Edm.String"/>
</m:properties>
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.