I am stuck with a problem and hope to find somebody with a working solution.
The code (below) it working perfect in my JS-View. It retrieves the time from the sap netweaver gateway and displays it in the textview of a table. The source pattern needs to be exately like this in the js-view: pattern: "'PT'hh'H'mm'M'ss'S'" , e.g. PT11H25M16S
JS-View:
template: new sap.ui.commons.TextView().bindProperty("text", "Uploadtime", new sap.ui.model.type.Time({
source: {pattern: "'PT'hh'H'mm'M'ss'S'"},
pattern: "HH:mm:ss"}))
I am migrating this view to XML-view. Here now comes the problem. The same coding in XML view is not possible due to inverted comma, quotation mark issues.
XML-View:
text = "{path:'Uploadtime',type:'sap.ui.model.type.Time',formatOptions:{ source : { pattern : "'PT'hh'H'mm'M'ss'S'" }, pattern : 'HH:mm:ss'}}"
Unfortunately I have no idea left how to format it correctly to get it working.
A possible workaround would be using a formatter function in the controller. But this should also be possible with type and formatOptions in the xml view.