我在sap.ui.table.Table
中有一个列。在此列中,我想根据值显示模板控件。如果我有DateTime
类型,我想使用DatePicker
,DateTime
类型DateTimePicker
,依此类推。
现在我想在我的XMLView / Fragment中区别它,但它只检查我的上一个控件(DateTimePicker):
<table:template>
<Input id="masterDataValueInput"
value="{thingDetail>value}"
placeholder="{path:'thingDetail>type', formatter:'.formatter.placeHolderFormatter'}"
visible="{= ! ${path: 'thingDetail>properties'} && ${path: 'thingDetail>type', formatter: '.formatter.inputVisibility'}}"
enabled="{appView>/isCurrentTenant}"
type="{path:'thingDetail>type', formatter:'.formatter.inputTypeFormatter'}"
/>
<DatePicker id="masterDataValueDate"
value="{thingDetail>value}"
displayFormat="short"
visible="{= ! ${path: 'thingDetail>properties'} && ${path: 'thingDetail>type', formatter: '.formatter.dateVisibility'}}"
enabled="{appView>/isCurrentTenant}"
change="handleChange"
/>
<DateTimePicker id="masterDataValueDateTime"
value="{thingDetail>value}"
displayFormat="short"
visible="{= ! ${path: 'thingDetail>properties'} && ${path: 'thingDetail>type', formatter: '.formatter.datetimeVisibility'}}"
enabled="{appView>/isCurrentTenant}"
change="handleChange"
/>
</table:template>
<Input>
和<DatePicker>
控件.. formatter
中的方法也从未被调用过。