Sapui5 矩阵布局中的文本字段
我想在矩阵布局中放置一个文本字段。请检查下面的代码,并建议如何检查XML代码错误?每次我都在设计XML代码。请告诉我如何克服这个问题Sapui5 矩阵布局中的文本字段,sapui5,Sapui5,我想在矩阵布局中放置一个文本字段。请检查下面的代码,并建议如何检查XML代码错误?每次我都在设计XML代码。请告诉我如何克服这个问题 <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l="sap.ui.commons.layout" controllerName="matrix.matrix" xmln
<core:View
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:l="sap.ui.commons.layout"
controllerName="matrix.matrix"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="ytftfhgff">
<content>
<l:MatrixLayout layoutFixed="true" columns="4" width="600px" widths="150px,150px,150px,150px">
<l:MatrixLayoutRow>
<l:MatrixLayoutCell colSpan="4">
<Text text="Its a heading" />
</l:MatrixLayoutCell>
</l:MatrixLayoutRow>
<l:MatrixLayoutRow>
<l:MatrixLayoutCell>
<Label text="First Name"/>
</l:MatrixLayoutCell>
<l:MatrixLayoutCell>
<TextField id="axscx" width="20em"></TextField>
</l:MatrixLayoutCell>
</l:MatrixLayoutRow>
</l:MatrixLayout>
</content>
</Page>
</core:View>
提前感谢,,
sriman.一般来说,XMLTemplateParser记录到控制台的错误应该是可以理解的,以便基本了解出了什么问题。你的情况很简单。默认名称空间设置为“sap.m”,即运行时尝试从该库加载TextField控件。这无法工作,因为sap.m没有TextField控件 您可以使用输入控件,即用输入替换文本字段。或者引入一个附加名称空间:
xmlns:commons="sap.ui.commons"
并按以下方式定义文本字段:
<commons:TextField id="axscx" width="20em"/>
我更喜欢使用输入字段。出现了什么错误?xmlns属性的值看起来可疑。仔细检查一下。