如何在XML视图中使用自定义控件?
我有一个名为foo.bar.MyControl
的控件,它扩展了sap.m.Button
。
我想在XML视图中使用该控件:
<core:View controllerName="foo.bar.controller.Root"
xmlns:commons="sap.ui.commons"
...>
<!-- what to type here ??? -->
</core:View>
答案 0 :(得分:4)
尝试以下
<core:View controllerName="foo.bar.controller.Root"
xmlns:foobar="foo.bar"
...>
<foobar:MyControl>
</foobar:MyControl>
</core:View>
命名空间反映了javascript命名空间,MyControl是构造函数。
最诚挚的问候, 托拜厄斯