Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sapui5 sap.m.ObjectListItem:需要在标题中保留空格(制表符)_Sapui5 - Fatal编程技术网

Sapui5 sap.m.ObjectListItem:需要在标题中保留空格(制表符)

Sapui5 sap.m.ObjectListItem:需要在标题中保留空格(制表符),sapui5,Sapui5,我正在使用sap.m.ObjectListItem。绑定时,我需要{Item}&{ComponentDesc}之间的制表符空间 例如,like\tObjectListItem仅用于一个值。在您的情况下,最好使用CustomListItem <CustomListItem> <HBox width="100%"> <VBox> <Label emphasized="true" text="{i18n>uBOMItem}: {I

我正在使用
sap.m.ObjectListItem
。绑定时,我需要
{Item}
&
{ComponentDesc}
之间的制表符空间


例如,like
\t

ObjectListItem
仅用于一个值。在您的情况下,最好使用
CustomListItem

<CustomListItem>
  <HBox width="100%">
    <VBox>
      <Label emphasized="true" text="{i18n>uBOMItem}: {Item}" />
    </VBox>
    <VBox class="sapUiSmallMarginBegin">
      <Label emphasized="true" text="Component: {ComponentDesc}" />
    </VBox>
    <VBox width="50%" justifyContent="End">
      <ObjectNumber number="{ComponentNo}" />
    </VBox>
  </HBox>
</CustomListItem>


在一个标签、文本或类似内容中输出模型中的两个数据绑定是不干净的。你应该分割输出。如果一个控件中有i18n标签和数据绑定,我会例外。

目前,
sap.m.ObjectListItem
不支持呈现标题空白。 我同意将多个标签(
“{i18n>uBOMItem}:”
“组件:”
)合并为一个标签是不干净的。
话虽如此,但是,如果确实需要这样做,则需要扩展ObjectListItem

例如:

在内部,ObjectListItem从
sap.m.Text
呈现其标题。文本控件有一个名为
renderWhiteSpace
的公共属性,我们可以使用它来呈现选项卡