cancel
Showing results for 
Search instead for 
Did you mean: 

TileContainer and weird behaviour together with App and Page

Former Member
0 Kudos

Hi,

I'm having some weird behaviour with TileContainer which I cannot explain.

Below are three examples that ought to work the same. However, only alternative 2 actually works

//Alternative 1: Doesn't work (shows no tiles)

var App = new sap.m.App({ id:"App"});

App.placeAt("content");

var Page = new sap.m.Page({title:"Home",id:"Page"});

App.addPage(Page);

var oContainer = new sap.m.TileContainer({});

Page.addContent(oContainer);

var T1 = new sap.m.StandardTile({title:"T1"});

oContainer.addTile(T1);

var T2 = new sap.m.StandardTile({title:"T2"});

oContainer.addTile(T2);

//Alternative 2: Works (shows the two tiles as expected)

var T1 = new sap.m.StandardTile({title:"T1"});

var oContainer = new sap.m.TileContainer("tilecontainer", {tiles:[T1]});

new sap.m.App({

                                  pages: [

                                            new sap.m.Page({

                                                      title: "Home",

                                                      content: [ oContainer ]

                                            })

                                  ]

                        }).placeAt("content");

var T2 = new sap.m.StandardTile({title:"T2"});

oContainer.addTile(T2);

//Alternative 3: Doesn't work (shows no tiles)

var T1 = new sap.m.StandardTile({title:"T1"});

var oContainer = new sap.m.TileContainer("tilecontainer", {tiles:[T1]});

var MyPage= new sap.m.Page({

          title: "Home",

          content: [ oContainer ]

});

new sap.m.App({

                                  pages: [

                                            MyPage

                                  ]

                        }).placeAt("content");

var T2 = new sap.m.StandardTile({title:"T2"});

oContainer.addTile(T2);

Does any one have an explanation for this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Can you please let me know your suggestions if any on the post:

"I want to have the Graphs to be displayed on the tiles of the Fiori Launch Pad(Similar to KPI Modeler-HANA).Hana is not there in the landscape.

As a workaround i am planning to use the sap.m.Tile Container create the Tile and add the MaKit Graph control which fetches the data from the OData periodically to the Tile.

I will customize the code of the Standard Fiori Launch Pad page code/Catalog code to have the above created Tile included so that all the FioriLaunchPad capabilities will apply to this tile also(like Authorizations/User Assignment).

Please let me know if there are any alternatives/changes to the above."

ThanksInAdvance,

RajendraVarma.

Former Member
0 Kudos

Hello Dagfinn Parnas

I am also having same issue.

I am adding TileContainer on sap.m.Page which is giving me error no method getTileGroup.

and if i return TileContainer i am only able to see tiles but not other content on page.

The code snippet 2 doesnt works for me.

I am only able to see the title bar

Your help is appreciated.

Thanks and Regards.

former_member91307
Contributor
0 Kudos

Hi Dagfinn, Hi Roshan,

add the property 'enableScrolling: false' to page control

Please find below example with changed code

http://jsbin.com/uxokuc/18/edit

Thanks and Regards, Venktesh

Former Member
0 Kudos

Hello Venkatesh IIango,

Thanks for the help.

Can we customize the size of the tile.

If yes can you guide me in it.

Thanks and Regards.

former_member91307
Contributor
0 Kudos

Hi Roshan,

This can be achieved with CSS with 'addStyleClass' method of a UI5 control.

Please find the updated code here

http://jsbin.com/uxokuc/26/edit

Hope this is what you require.

Thanks and Regards, Venkatesh

fabian_krger
Participant
0 Kudos

Whats very interesting here is the fact that it makes a difference if you preload the whole sap.m library or just the required components via jQuery.sap.require():

http://jsbin.com/uxokuc/658/edit

Without preload of the whole library

1) The height setting has no effect - probably a priority thing - with

.customTile{

          height: 400px !important;

         

        }

it works fine.

But 2) and much more important:

If you don't preload the whole library, you can't press the tile! It doesn't get blue when you click it and it also doesn't fire the press event. You can only use the attachBrowserEvent which is not recommended:

http://jsbin.com/uxokuc/660/edit