cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Rendering problem: sap.m.Table inside sap.m.Page inside UIComponent

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

former_member182862
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Answers (0)