Css 工具栏组件内的内容元素不存在';行不通
我正在尝试构建一个表,该表的标题上有一个按钮。我是从这里来的 这是我的代码:Css 工具栏组件内的内容元素不存在';行不通,css,sapui5,Css,Sapui5,我正在尝试构建一个表,该表的标题上有一个按钮。我是从这里来的 这是我的代码: <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l="sap.ui.layout" xmlns:f="sap.ui.layout.form" xmlns:t="sap.ui.table" height="100%"
<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:t="sap.ui.table"
height="100%"
controllerName="xxxxx"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="CONFIGURACIÓN DE LA CUENTA" navButtonPress="onCancel" showNavButton="true">
<content>
<f:SimpleForm id="form_requerimiento_datos_generales" minWidth="1024"
maxContainerCols="2" editable="true" layout="ResponsiveGridLayout"
labelSpanL="4" labelSpanM="4"
emptySpanL="0" emptySpanM="0" columnsL="2" columnsM="2"
validateFieldGroup="onValidateFieldGroup">
<f:content>
<core:Title text="Suscripciones"/>
<t:Table
rows="{/Subscriptions?$filter=UserSystem eq '1'}"
selectionMode="None"
visibleRowCount="7">
<t:toolbar>
<content>
<Title id="title" text="Listado de Suscripciones" />
<ToolbarSpacer/>
<Button
icon="sap-icon://add"
tooltip="Agregar Suscripciones"
press="addSuscription"/>
</content>
</t:toolbar>
<t:columns>
<!--columns-->
</t:columns>
</t:Table>
</f:content>
</f:SimpleForm>
</content>
</Page>
</core:View>
我不知道为什么会出现这个错误。我认为这是代码的这一部分:
<t:toolbar>
<content>
<Title id="title" text="Listado de Suscripciones" />
<ToolbarSpacer/>
<Button
icon="sap-icon://add"
tooltip="Agregar Suscripciones"
press="addSuscription"/>
</content>
</t:toolbar>
我不知道为什么内容标签在工具栏标签内不被接受(在本例中,它是有效的)。当我取下页面的内容标签时。我没有收到错误消息
我想知道做什么来解决我的问题
谢谢你的帮助
更新1
我已经解决了我的问题,但现在我有另一个问题。我对表头的CSS有问题(与表体重叠):
标签
是聚合名称,它需要一个工具栏。
因此,理想情况下,
后面跟着一个sap.m.Toolbar
控件
至于它抛出的原因:sap/m/content
错误是因为,它希望在
之后有一个控件。另外,由于默认名称空间是sap.m
,因此它在默认名称空间中查找控件(在本例中,您指定了内容)。没有像sap.m.content
这样的控件。因此,这是一个错误
如果您检查您的指导源代码,您将看到它们在
聚合之后有一个
以下是更新的代码:
<t:toolbar>
<Toolbar>
<content>
<Title id="title" text="Listado de Suscripciones" />
<ToolbarSpacer/>
<Button
icon="sap-icon://add"
tooltip="Agregar Suscripciones"
press="addSuscription"/>
</content>
</Toolbar>
</t:toolbar>
将工具栏放在桌子前面并检查。谢谢您的帮助。现在,我对桌面headerhey mate的CSS有另一个问题,要使用它,我们应该在顶部包含任何类似cdn的内容吗?
<t:toolbar>
<Toolbar>
<content>
<Title id="title" text="Listado de Suscripciones" />
<ToolbarSpacer/>
<Button
icon="sap-icon://add"
tooltip="Agregar Suscripciones"
press="addSuscription"/>
</content>
</Toolbar>
</t:toolbar>