sap.ui.table.Column只关注上次控件和表达式绑定不起作用

时间:2018-02-26 10:10:32

标签: sapui5

我在sap.ui.table.Table中有一个列。在此列中,我想根据值显示模板控件。如果我有DateTime类型,我想使用DatePickerDateTime类型DateTimePicker,依此类推。

现在我想在我的XMLView / Fragment中区别它,但它只检查我的上一个控件(DateTimePicker):

<table:template>
  <Input id="masterDataValueInput"
    value="{thingDetail>value}"
    placeholder="{path:'thingDetail>type', formatter:'.formatter.placeHolderFormatter'}"
    visible="{= ! ${path: 'thingDetail>properties'} &amp;&amp; ${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'} &amp;&amp; ${path: 'thingDetail>type', formatter: '.formatter.dateVisibility'}}"
    enabled="{appView>/isCurrentTenant}"
    change="handleChange"
  />
  <DateTimePicker id="masterDataValueDateTime"
    value="{thingDetail>value}"
    displayFormat="short"
    visible="{= ! ${path: 'thingDetail>properties'} &amp;&amp; ${path: 'thingDetail>type', formatter: '.formatter.datetimeVisibility'}}"
    enabled="{appView>/isCurrentTenant}"
    change="handleChange"
  />
</table:template>
  • 因此永远不会显示<Input><DatePicker>控件..
  • 我的formatter中的方法也从未被调用过。

0 个答案:

没有答案