on 07-29-2014 3:22 PM
Hi there,
I just ran into an issue when trying to place a sap.m.Table inside a sap.m.Page inside a sap.ui.core.UIComponent. Unfortunately the table is not visible (it is rendered somehow though ...). A small example can be found in this gist. Is there something I'm missing in using the UIComponent? It is done like this:
oApp = new sap.ui.core.ComponentContainer({
component: new sap.ui.core.UIComponent({
content: oPage})});
new sap.m.Shell({ app : oApp }).placeAt("content");
Thanks for your help!
M.
Hello Martin,
Did you add "sap.m" to your bootstrap?
Check below snippet.
<script id="sap-ui-bootstrap"
type="text/javascript"
src= "https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m,sap.ui.commons">
</script>
Please try using above snippet and let me know.
Hope this solves your issue.
Regards,
Suraj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
thanks for your suggestion but I already did this as you can see in the provided gist. As the link above contains the .git suffix, I attach the link again such that one can see the preview in the browser:
https://gist.github.com/a4b90fee335552139a00
M.
Hi Martin
1. I am not aware the sap.m.App is deprecated.
2. sap.ui.core.ComponentContainer is marked as experimental, so this may be an issue
3. sap.ui.core.UIComponent is abstract (see here) hence it cannot instantiate.
I think you can sap.m.App.
Thanks
-D
Hi Dennis,
thanks a lot! The aspect with the class being abstract is probably it. In the meantime I moved away from the mobile libraries on the project I'm working on. But I guess I will encounter them again soon and then your hint will definitively save some time!
The thing with the sap.m.App being deprecated was probably an overshot: I assumed it from the fact that it was not longer mentioned in the Best-Practices. However, the API says nothing like this, you are absolutely right!
M.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.