Это абсолютно то же самое.
<ObjectIdentifier text="{ path: 'some-path',
type: 'sap.ui.model.type.Date',
formatOptions: {source: {pattern: 'dd/MM/yyyy'}, style: 'long'}
}"
title="{ path: 'some-other-path',
type: 'sap.ui.model.type.Date',
formatOptions: {source: {pattern: 'dd/MM/yyyy'}, style: 'long'}
}" />
Есть некоторые предопределенные типы, доступные в пространстве имен sap.ui.model.type.
Использование в XMLViews всегда
{ path: 'some-path',
mode: 'sap.ui.model.BindingMode.OneWay' //See documentation of BindingMode for possible values
type: 'full.class.name or .propertyInController'
formatOptions: { .. } //object as described in the constructor documentation of the type
constraints: { .. } //object as described in the constructor documentation of the type
parameters: { .. } //object with additional binding parameters (most depending on the model type)
formatter: 'full.function.name or .functionInController'
}
Вы можете использовать либо formatter
или type
. Если вы используете type
, вы можете использовать formatOptions
и constraints
. mode
и parameters
всегда могут использоваться.
Если вы просто хотите поставить path
вы можете использовать сокращенную форму: text="{some-path}"
Для агрегации привязок (в отличие от привязки свойств) есть различные варианты: нет type
или formatter
, но вместо этого вы можете предоставить sorter
и filter
.